Red Hat’s Podman walkthrough connects container basics to a durable service
The guide follows one workload through ports, persistent storage, Compose updates and user-level systemd startup.
A new Red Hat Developer walkthrough uses one Podman workload to explain the parts that turn a disposable container into a service that survives updates and reboots. The article starts with a single podman run command, then adds the storage, declarative configuration and user-level systemd behavior that introductory examples often leave out.
Start small, but account for state
The example runs Uptime Kuma in detached mode and publishes port 3001 from the container to the host. That is enough to demonstrate image naming and port mapping, but not enough to preserve application data: removing and recreating the container would discard anything held only in its writable layer.
The updated command therefore mounts a host directory at /app/data. On SELinux-enabled systems such as Fedora and Red Hat Enterprise Linux, the mount includes the :z suffix so the directory receives a label suitable for container access. The guide also makes an operationally important point: adding a mount later does not copy existing container data into it.
Updating the command-line workload remains explicit. Stop and remove the old container, pull the replacement image and recreate the container with the same name, port, restart policy and volume mapping.
Move the run configuration into source control
The next step expresses the same workload in podman-compose.yml. The image, name, port, restart policy and persistent volume become declarative configuration that can be reviewed and versioned with the application. Updating then becomes a pull followed by podman-compose up -d --force-recreate.
This is not an argument that every Podman deployment needs Compose. It is a useful dividing line: a one-off test can remain a command, while a workload whose configuration must be repeated belongs in a file.
Make daemonless containers survive a reboot
Podman does not depend on a central background daemon, so a user container does not automatically start when the host boots. The walkthrough enables lingering for the user and then enables podman-restart.service in that user’s systemd instance. Containers configured with an always restart policy can then return on boot without becoming root-owned services.
For larger or more structured deployments, the article points readers toward Quadlet, which represents Podman workloads directly as systemd units, as well as Podman Desktop, Cockpit and Ansible automation.
The practical value of the walkthrough is its sequence. It keeps the first command understandable while showing exactly where persistence, reproducibility and host lifecycle management enter the design. Developers can use the same progression for a local service before deciding whether the workload belongs in Quadlet, automation or an OpenShift deployment.
sources
- Getting started with containers using Podmandevelopers.redhat.com
comments · 0