I'm trying to run the buildpacksio/pack
Docker image on either Linux or Windows. I found How to fix docker: Got permission denied issue, but it doesn't seem to fix my issue.
For all Linux/Windows and Mac the instructions on the pack install page state:
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD:/workspace -w /workspace \
buildpacksio/pack build <my-image> --builder <builder-image>
In Windows (Docker 20.10.5, Windows SP with WSL2 installed, but no configuration by me, I would not know how) and Linux (Docker 20.10.x, Ubuntu 20.04) the instruction results in:
ERROR: failed to build: failed to fetch builder image 'index.docker.io/paketobuildpacks/builder:base': 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.38/images/create?fromImage=paketobuildpacks%2Fbuilder&tag=base": dial unix /var/run/docker.sock: connect: permission denied
On Linux the /var/run/docker.sock
file has mode 660 and is owned by root:docker
. The user (not root) running the image is also in the group docker
. On Windows I wouldn't know how to check the location.
The builder image is pulled:
docker image list
REPOSITORY TAG IMAGE ID CREATED SIZE
buildpacksio/pack latest 9bb3b78ef9fb 41 years ago 39.7MB
paketobuildpacks/builder base b774b8bfa6d0 41 years ago 663MB
The builder suggest
instruction for the buildpacksio/pack
image works correctly.
My question is: How should I interpret (and preferably fix) the error?