Astro CLI with podman

astro dev start
Error: error creating docker-compose project: Got 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?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.project%3Dastro-dev_97fb46%22%3Atrue

I already set:
astro config set -g container.binary podman

This seems to work for me:

$ sudo systemctl edit podman.socket

to create /etc/systemd/system/podman.socket.d/override.conf, where I put

[Socket]
SocketMode=0666

and then I deleted

$ sudo rm -rf /run/podman

so that the directory got recreated with the right permissions, and then

$ sudo systemctl daemon-reload
$ sudo systemctl restart podman.socket

To make podman use that socket, i did

$ export CONTAINER_HOST=unix://run/podman/podman.sock

edit: I guess that you could put this into the config instead

[Socket]
SocketGroup=docker

which should work also, because default mode is 0660 and this would set the docker group on the socket, which you initially wanted.

1 Like