본문 바로가기
도커/docker 정리

docker.sock 권한 오류

by eclipse7727 2022. 7. 12.

github action으로 ci/cd 재구성 해야해서 하는 도중 docker.sock 권한 오류를 만났다.

 

두 번째 겪는 일이기에 다시 찾는 일 없도록 기록해둔다.

 

Got permission denied while trying to connect to the Docker daemon socket

sudo chmod 666 /var/run/docker.sock

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.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

sudo usermod -aG docker ${USER}

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

sudo chmod 666 /var/run/docker.sock

containers/create: dial unix /var/run/docker.sock: connect: permission denied

sudo setfacl --modify user::rw /var/run/docker.sock

Server: ERROR: Got permission denied while trying to connect to the Docker daemon socket

sudo newgroup docker
sudo chmod 666 /var/run/docker.sock
sudo usermod -aG docker ${USER}

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/auth: dial unix /var/run/docker.sock: connect: permission denied

docker permission for linux ec2

 

반응형

댓글