How to fix docker: Got permission denied issue

前端 未结 19 1134
醉话见心
醉话见心 2020-11-28 00:15

I installed Docker in my machine where I have Ubuntu OS. After than I installed docker, when I run

sudo docker run hello-world

All it\'s ok

19条回答
  •  死守一世寂寞
    2020-11-28 00:57

    1. Add current user to docker group
    sudo usermod -aG docker $USER
    
    1. Change the permissions of docker socket to be able to connect to the docker daemon /var/run/docker.sock
    sudo chmod 666 /var/run/docker.sock
    

提交回复
热议问题