I am trying to connect to a docker image, for that, i tried those commands:
export CR_PAT=<your token access>
echo $CR_PAT | docker login ghcr.io --password-stdin -u <your username>
I used as username my Github username and as result, i got:
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
so to fix it, i tried to give permissions for all users using the following command:
sudo chmod 777 /var/run/docker.sock
and when i retype
echo $CR_PAT | docker login ghcr.io --password-stdin -u <your username>
the terminal didn't return any answer!! it's blocked ..
any help please??
Thanks.
Copyright Notice:Content Author:「DrT」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/69739714/got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket-at-uni