carlossg / docker-maven

Official Docker image with Maven
Apache License 2.0
524 stars 423 forks source link

No <dockerHost> given, no DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' #334

Closed javierscope closed 1 year ago

javierscope commented 1 year ago

I'm using gitlab-ci.yml to build a docker image:

default: image: maven:3.8-openjdk-11

I'm able to execute mvn clean package, but when job executes mvn deploy or mvn docker:build I get next error:

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.39.1:build (default) on project simurai-orchestrator: Execution default of goal io.fabric8:docker-maven-plugin:0.39.1:build failed: No 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]

What I'm missing?

carlossg commented 1 year ago

configuration is needed to build docker images from within a docker image, there are many tutorials out there