Run a Podman container as a systemd service.
IntermediateScenarioRuntimes: containerd, OCI, rootless and Podman
Answer
Situation read → Replace Docker's restart policy with systemd.
What I'd do → Use Quadlet. Create ~/.config/containers/systemd/web.container:
[Container]
Image=docker.io/library/nginx:1.27
PublishPort=8080:80
[Service]
Restart=always
[Install]
WantedBy=default.target
systemctl --user daemon-reload && systemctl --user start web.service
Why → podman generate systemd is deprecated in favor of Quadlet.
Interview tip → Run loginctl enable-linger for boot-time user services.
More on Runtimes: containerd, OCI, rootless and Podman
Explain the path from `docker run` to a running process.IntermediateKubernetes removed dockershim. What does that mean for your Docker-built images?BeginnerRun rootless Docker for developers on a shared Linux box.IntermediatePodman vs Docker: when would you pick Podman?IntermediateWhat is the OCI and which specs does it define?BeginnerCompare `runc`, `crun`, `gVisor` and `Kata`.Advanced