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

前端 未结 8 1930
[愿得一人]
[愿得一人] 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:58

    I met the issue at bamboo-agent, but I assume the same holds for jenkins.

    Add the user running maven to the docker group. Then restart docker AND the service running maven. Group changes are not loaded while the services are running. So in my case:

    sudo groupadd docker # if it does not exist
    sudo usermod -a -G docker bamboo-user
    sudo systemctl restart docker.service
    sudo systemctl restart bamboo-agent.service
    

提交回复
热议问题