Im running into a weird problem trying to `package...
# general
f
Im running into a weird problem trying to
package
a
docker_image
target within a github action. It's telling me that it cant connect to docker:
Copy code
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
Whats weird is that if in the same step i do
docker build .
to the same dockerfile pants points to in
docker_image
, it works properly and builds all layers except the ones using the pants context (i.e
foo.bar/main.pex
)
c
Hmm, I don't use GHA with docker, but I wonder if they've set up rootless docker (or some other docker-in-docker setup). That would mean they've got the docker socket set up somewhere else (probably
/run/user/$UID/docker.sock
). Normally that works by setting the envvar DOCKER_HOST . But pants tries to clean the environment to prevent other stuff from leaking in. Try setting the envvar passthrough like [here](https://www.pantsbuild.org/docs/docker#docker-configuration)
1