docker-java-sample
docker-java-sample copied to clipboard
Fails with "no DOCKER_HOST" error
With: mvn package -Pdocker
Got the following after running an unchanged clone:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27.216 s [INFO] Finished at: 2019-05-21T17:54:32-07:00 [INFO] Final Memory: 27M/198M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.20.1:build (docker:build) on project helloworld: Execution docker:build of goal io.fabric8:docker-maven-plugin:0.20.1:build failed: No <dockerHost> given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no external provider like Docker machine configured -> [Help 1]
On ubuntu 16 using docker 18.0.9: $ sudo docker version Client: Version: 18.09.6 API version: 1.39 Go version: go1.10.8 Git commit: 481bc77 Built: Sat May 4 02:35:27 2019 OS/Arch: linux/amd64 Experimental: false
Server: Docker Engine - Community Engine: Version: 18.09.6 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: 481bc77 Built: Sat May 4 01:59:36 2019 OS/Arch: linux/amd64 Experimental: false
Running with sudo fixes the issue:
sudo mvn package -Pdocker
Perhaps the documentation should be clearer? I think this is only an issue on linux.