I have the following config:
virtualisation.podman = {
enable = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
And the following local files:
~/services/compose.yaml
services:
caddy:
build: .
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./conf:/etc/caddy
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
cap_add:
- CAP_NET_BIND_SERVICE
volumes:
caddy_data:
caddy_config:
~/services/Dockerfile
ARG VERSION=2.11
FROM caddy:${VERSION}-builder-alpine AS builder
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
xcaddy build \
--with github.com/lucaslorentz/caddy-docker-proxy/v2
FROM caddy:${VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
CMD ["caddy", "docker-proxy"]
Now if I do podman compose up, I’m getting the following error message:
[caddy] | Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
After looking what might be wrong I saw that the podman service shut down:
Jan 26 07:46:10 pc podman[8418]: time="2026-01-26T07:46:10+01:00" level=info msg="Received shutdown.Stop(), terminating!" PID=8418
Jan 26 07:46:10 pc systemd[1]: podman.service: Deactivated successfully.
Even if I restart the service with sudo systemctl restart podman.service it will shutdown after some seconds. None of those work for more than some seconds:
sudo systemctl restart podman.servicesudo systemctl restart podman.socketsystemctl --user restart podman.servicesystemctl --user restart podman.socket
I assume it has something to do with https://forums.rockylinux.org/t/podman-gets-shutdown-when-it-starts/17576/2.
I couldn’t find a way to stop the auto-deactivation of the socket. How can I do that?