Expand description
Quadlet export: translate a parsed compose file into Podman systemd units. Translate a parsed compose file into Podman Quadlet unit files.
Quadlet is Podman’s systemd integration: declarative .container,
.network and .volume units placed under
~/.config/containers/systemd/ that a systemd generator turns into
services, so systemd owns the lifecycle (boot, restart, dependencies)
instead of a long-running podup process.
This is an additive export path, not a replacement for the runner. It maps the common compose fields and warns — loudly, never silently — for every field that is set but has no Quadlet equivalent yet, so generated units never quietly drop configuration.
Structs§
- Quadlet
Output - The result of a generation run: the units plus any warnings about set but unmapped fields.
- Quadlet
Unit - A single generated unit file: its name and full contents.
Functions§
- generate
- Translate a compose file into Quadlet units for the given project name,
resolving relative build contexts against the current directory (the common
case: running from the project directory). Use
generate_atto resolve them against an explicit base directory instead. - generate_
at - As
generate, but resolves a service’s relativebuild:context againstbase_dir(the compose file’s directory) rather than the current directory. The systemd generator runs a.buildunit with no cwd, so a unit written for it must carry an absoluteSetWorkingDirectory; pass the compose base here. - write_
units - Write
unitsintodir, creating it if needed, and return the paths written in order. Defense in depth: refuse any unit whose file name is not a plain path component. The library already sanitizes stems, but a write target must never contain a separator,.or..that could escapedir. Shared bygenerate quadlet -oandautostart --mode quadlet, so both place units through the identical safety check.