What is happening when docker-maven plugin tries to build image?

前端 未结 8 1929
[愿得一人]
[愿得一人] 2021-02-12 20:40

I am running Jenkins in a docker container and Jenkins tries to run my maven build. As part of the build, the docker maven plugin instructs it to build a docker image.

8条回答
  •  遇见更好的自我
    2021-02-12 20:55

    This can be resolved by adding DOCKER_HOST environment variable in Jenkins.

    Setup your docker daemon like this:

    [/etc/sysconfig/docker]
    OPTIONS="-H tcp://127.0.0.1:4243"
    

    Jenkins Jobs (Inject environment variables):

    DOCKER_HOST=tcp://127.0.0.1:4243
    

提交回复
热议问题