switch to rootless podman

This commit is contained in:
zenfyr 2026-01-04 01:01:59 +07:00
commit c20ce4fd6c
Signed by: melontini
SSH key fingerprint: SHA256:TtcIcnTnoAB5mqHofsaOxIgiMzfVBxej1AXT7DQdrTE

View file

@ -1,19 +1,21 @@
[Unit] [Unit]
Description=Docker-in-Podman Description=Rootless Podman-in-Podman
[Container] [Container]
Image=docker.io/library/docker:dind Image=quay.io/podman/stable
ContainerName=dind ContainerName=dind
AutoUpdate=registry AutoUpdate=registry
Environment=DOCKER_HOST=unix:///var/run/docker.sock
SecurityLabelDisable=true SecurityLabelDisable=true
PodmanArgs=--privileged --cgroupns=host Unmask=ALL
HealthCmd=docker info || exit 1 AddDevice=/dev/fuse
HealthCmd=podman info || exit 1
HealthInterval=5s HealthInterval=5s
HealthTimeout=3s HealthTimeout=3s
HealthRetries=5 HealthRetries=5
Volume=dind.volume:/var/lib/docker:Z User=podman
Volume=/var/run/dind:/var/run:z Volume=dind.volume:/home/podman/.local/share/containers:Z
Volume=/var/run/dind:/var/run/1000:z
Exec=sh -c "podman system service --time=0 unix:///var/run/1000/docker.sock & PID=$!; while [ ! -S /var/run/1000/docker.sock ]; do sleep 0.1; kill -0 $PID 2>/dev/null || exit 1; done && chmod 0666 /var/run/1000/docker.sock && wait $PID"
[Service] [Service]
Restart=always Restart=always