본문 바로가기

Docker

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

728x90
반응형
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied

에러가 날 경우

 

sudo /usr/sbin/groupadd -f docker
sudo /usr/sbin/usermod -aG docker `user`
sudo chown root:docker /var/run/docker.sock

docker.sock권한을 변경하여 다른 사용자도 접근할 수 있도록 한다.

728x90
반응형