You may have to do a Docker sidecar running the docker daemon and pass over the docker socket, or you *might* be able to do docker-outside-of-docker.
Some relevant tickets: https://github.com/fabric8io/docker-maven-plugin/issues/1005 https://github.com/fabric8io/docker-maven-plugin/issues/863 I have zero maven+docker experience so this is the most advice I can offer. Good luck, Joan On 2020-01-10 5:33, Thomas Bouron wrote: > Hi there. > > I have a question regarding the current Jenkins setup which I hope some of > you will have the answer. > > Apache Brooklyn is currently built on Jenkins within a docker container. > The pipeline is setup so it first builds an image and then use it to run > maven + tests. > > Brooklyn provides different distribution packages: tarball, deb and rpm. We > are currently trying to add a docker image to the mix. I created a PR for > this (https://github.com/apache/brooklyn-dist/pull/148) which update the > `Jenkinsfile` to pass the docker socket to the docker container. But the > build fails with the following error message: > > ``` > Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:remove > (cleanup) on project karaf-docker-image: Execution cleanup of goal > io.fabric8:docker-maven-plugin:0.31.0:remove 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 > ``` > > Note that doing the same thing on my local machine work, but not on Apache > Jenkins. Any idea how I can fix this? I created a Jira ticket for INFRA ( > https://issues.apache.org/jira/browse/INFRA-19523) but they told me to ask > on this list instead, hence this mail. > > Thank you. > Best. >
