Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

后端 未结 30 1856
孤独总比滥情好
孤独总比滥情好 2020-11-27 09:00

I am new to docker. I just tried to use docker in my local machine(Ubuntu 16.04) with Jenkins.

I configured a new job with below pipeline script.



        
30条回答
  •  一个人的身影
    2020-11-27 10:02

    In my case, it was not only necessary add jenkins user to docker group, but make that group the primary group of the jenkins user.

    # usermod -g docker jenkins
    # usermod -a -G jenkins jenkins
    

    Don't forget to reconnect the jenkins slave node or restart the jenkins server, depend on your case.

提交回复
热议问题