Skip to content

Docker & Podman: Services (systemd)

Docker & Podman commands for services (systemd) (tags: #systemd).

Index
1 items

Podman: Generate a systemd unit for a container

Safe

Writes container-<name>.service so systemd can manage the container.

podman generate systemd --new --files --name <container>
What each part does
  1. podman generate systemdwrite a systemd unit for a container (newer Podman prefers Quadlet files)
  2. --newthe unit creates a fresh container on start and removes it on stop
  3. --fileswrite .service files to the current directory instead of stdout
  4. --name <container>use the container name (not ID) in the unit

My note Deprecated in favour of Quadlet (.container files in ~/.config/containers/systemd/) on Podman 4.4+.

Also known as: podman systemd · quadlet

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…