Open breun opened 2 years ago
You are correct, dmp doesn't support Docker contexts, but does it work if you set the environment variable DOCKER_HOST to "unix:///Users/nbreunese/.colima/default/docker.sock" (or alternatively the <dockerHost>
plugin configuration variable) ?
Setting DOCKER_HOST
like that indeed works, thanks! It would still be nice if docker-maven-plugin
would add support for Docker contexts, but I can use this as a workaround for now.
Description
I'm using Colima to run Docker containers on macOS and pulling and running images via the
docker
CLI tool works just fine. Colima created and activated a Docker context with a socket in$HOME/.colima/default/docker.sock
:It seems that
docker-maven-plugin
does not find or use this Docker context, because when I run a Maven project which usesdocker-maven-plugin
I get the following error:According to the Global Configuration section in the documentation,
docker-maven-plugin
checks/var/run/docker.sock
on macOS, but I don't see mention of support for Docker contexts. Doesdocker-maven-plugin
support Docker contexts? If not, could this be added? If it does, it does not seem to work for me. In that case, is there a way to specify a local Docker socket via theDOCKER_HOST
environment variable?Info
mvn -v
) : 3.8.6❯ docker version Client: Version: 20.10.14 API version: 1.41 Go version: go1.18.1 Git commit: 0a7772e Built: Tue May 03 01:09:34 2022 OS/Arch: darwin/amd64 Context: colima Experimental: true
Server: Engine: Version: 20.10.11 API version: 1.41 (minimum version 1.12) Go version: go1.16.15 Git commit: 847da184ad5048b27f5bdf9d53d070f731b43180 Built: Wed Apr 13 23:41:08 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.5.8 GitCommit: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71 runc: Version: 1.0.0-rc95 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 docker-init: Version: 0.19.0 GitCommit: