catthehacker / docker_images

Docker images
MIT License
212 stars 75 forks source link

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

Closed yaronxmcyber closed 11 months ago

yaronxmcyber commented 11 months ago

Hey, I get this error when using ubuntu:full-22.04 and similar images along with docker.

 docker run -v /var/run/docker.sock:/var/run/docker.sock --rm -it catthehacker/ubuntu:full-22.04 /bin/sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
$ docker ps
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
$ 

While regular ubuntu and other containers works just fine. Does anyone have any idea why? Thanks!

yaronxmcyber commented 11 months ago

Nevermind, this was solved by using


        - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

step.