gentle-flower-25372
02/28/2024, 3:52 PMdocker run hello-world
without root. Why can't I get docker builds to work as an unprivileged user when running pants package
? I tried searching in Slack and couldn't find threads that matched this issue.
15:50:32.76 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
ProcessExecutionFailure: Process 'Building docker image docker:latest' failed with exit code 1.
stdout:
stderr:
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
$ ls -lsa /var/run/docker.sock
0 srw-rw---- 1 root docker 0 Feb 28 00:15 /var/run/docker.sock
gentle-flower-25372
02/28/2024, 4:03 PMuse_buildx
and deleting ~/.cache/pants
fixed the problem.
[docker]
use_buildx = true
boundless-ambulance-11161
10/16/2024, 12:38 AMuse_buildx = true
and deleted the cache -> this solved the error message I had but I had a new error
Then I removed the use_buildx = true
and it worked.
So it is probable that buildx
had nothing to do with it, and the solution to my problem was just removing the cache