User Tools

Site Tools


computing:podman

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
computing:podman [2026/03/30 04:00] – created oemb1905computing:podman [2026/10/10 01:41] (current) – oemb1905
Line 1: Line 1:
-yo+-------------------------------------------
  
- --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/03/30 04:00//+  * **podman** 
 +  * **Jonathan Haack** 
 +  * **Haack's Networking** 
 +  * **webmaster@haacksnetworking.org** 
 + 
 +------------------------------------------- 
 + 
 +//Podman// 
 + 
 +------------------------------------------- 
 +~~NOTOC~~ 
 + 
 +==== Introduction ==== 
 +Rootless Podman runs as user ''worker'' (uid 1001). Lingering is enabled. Graph root is ''/home/worker/podman-local''. Cgroup manager is ''systemd''. Units come from Quadlet files in ''~/.config/containers/systemd/''. Do not use ''podman generate systemd''. 
 + 
 +^ Item ^ Value ^ 
 +| User | ''worker'' | 
 +| Linger | yes | 
 +| Graph root | ''/home/worker/podman-local'' | 
 +| Cgroup manager | systemd | 
 +| Quadlets | ''~/.config/containers/systemd/*.container'' | 
 +| Version | 5.8.6 | 
 + 
 +==== 1. User and linger ==== 
 +<code> 
 +adduser --system --group --home /home/worker worker 
 +loginctl enable-linger worker 
 +</code> 
 + 
 +Verify: 
 + 
 +<code> 
 +loginctl show-user worker -p Linger 
 +id worker 
 +</code> 
 + 
 +Expect ''Linger=yes''. 
 + 
 +==== 2. Install ==== 
 +<code> 
 +apt install -y podman podman-compose 
 +</code> 
 + 
 +Confirm as ''worker'': 
 + 
 +<code> 
 +podman version 
 +podman info --format '{{.Host.Security.Rootless}} {{.Host.CgroupManager}} {{.Store.GraphRoot}}' 
 +</code> 
 + 
 +Expect ''true systemd /home/worker/podman-local''. 
 + 
 +==== 3. Session bus ==== 
 +User units need the session bus. As ''worker'': 
 + 
 +<code> 
 +export XDG_RUNTIME_DIR=/run/user/$(id -u) 
 +export DBUS_SESSION_BUS_ADDRESS=unix:path=${XDG_RUNTIME_DIR}/bus 
 +</code> 
 + 
 +Do not use ''sudo -u worker''. That drops the session bus. Use ''su - worker'' or run as ''worker'' directly. 
 + 
 +==== 4. Quadlets ==== 
 +Units live in ''~/.config/containers/systemd/''. Example structure: 
 + 
 +<code> 
 +mkdir -p ~/.config/containers/systemd 
 +</code> 
 + 
 +A ''.container'' file has ''[Container]'', ''[Service]'', and ''[Install]''. ''WantedBy=default.target'' starts it. Do not ''systemctl --user enable'' a Quadlet unit. Do not ''podman generate systemd''. 
 + 
 +After creating or editing a ''.container'' file: 
 + 
 +<code> 
 +systemctl --user daemon-reload 
 +systemctl --user reset-failed container-NAME.service 
 +systemctl --user start container-NAME.service 
 +</code> 
 + 
 +==== 5. Verify ==== 
 +<code> 
 +systemctl --user is-active container-*.service 
 +podman ps -a 
 +podman info --format '{{.Host.Security.Rootless}} {{.Store.GraphRoot}}' 
 +ls -la ~/.config/containers/systemd/ 
 +</code> 
 + 
 +Expect rootless true, graph root ''/home/worker/podman-local'', and the Quadlet files present. Also, the directory for podman is on the host and uses virtiofs. This keeps the configs and container data accessible by the host. If you need help on setting up virtiofs mounts and configuring the VM, head to [[https://wiki.haacksnetworking.org/doku.php?id=computing:virtmanagerhell|Virt Manager Hell]]. 
 + 
 +==== Facts ==== 
 +  * R 
 +  *  
 + 
 + 
 + --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/10/10 01:39//
computing/podman.1774843247.txt.gz · Last modified: by oemb1905