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

后端 未结 30 1835
孤独总比滥情好
孤独总比滥情好 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 09:51

    My first solutions was:

    usermod -aG docker jenkins
    usermod -aG root jenkins
    chmod 664 /var/run/docker.sock
    

    But none of them work for me, I tried:

    chmod 777 /var/run/docker.sock
    

    That works, but I don't know if it is the right call.

提交回复
热议问题