Expand description
podup — docker-compose → Podman translator library.
Provides parsing, variable substitution, topological ordering, and an async engine that drives container lifecycle via Podman’s native libpod REST API over a Unix socket or Windows named pipe.
Re-exports§
pub use compose::collect_diagnostics;pub use compose::parse_file;pub use compose::parse_file_with_env_files;pub use compose::parse_files_with_env_files;pub use compose::parse_files_with_env_files_interp;pub use compose::parse_str;pub use compose::parse_str_raw;pub use compose::resolve_levels;pub use compose::resolve_order;pub use compose::validate_config;
Modules§
- compose
- Compose-file parsing,
extends:/include:resolution, and topological service ordering. Compose file parsing,extends:resolution,include:merging, and topological service ordering. - env_
file env_file:loading: KEY=VALUE pairs from a service’s declared files.env_file:loading for services.- podman
- Podman socket connection helpers. Podman socket connection helpers.
- ports
- Port-mapping parser for the docker-compose
ports:format variants. Port mapping parser. - quadlet
- Quadlet export: translate a parsed compose file into Podman systemd units. Translate a parsed compose file into Podman Quadlet unit files.
- size
- Memory and CPU value parsers shared by the engine and tests. Memory and CPU value parsers shared by the engine and tests.
- substitute
- Docker Compose
${VAR}/$VARsubstitution over raw YAML before parsing. Docker Compose variable substitution. - ui
- Terminal colour/styling, honouring
--ansi,NO_COLOR, and TTY detection. Terminal styling — the single place that decides whether to colour output and holds the palette, so colour stays consistent and always honours--ansi,NO_COLOR, and whether the target stream is a TTY. - update
- Secure self-update for the
podupbinary (signature-verified release fetch). Secure self-update for thepodupbinary.
Structs§
- Build
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through.docker compose build-style CLI overrides. Each augments (never weakens) the per-servicebuild:config: a flag forces the behaviour on even when the compose file leaves it off. - Client
- The libpod
Client, surfaced for callers that talk to Podman directly. Podman libpod REST API client. - Commit
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::commit_with_options, mirroringdocker compose commit(-m/--message,-a/--author,-p/--pause,-c/--change). Kept off the frozencommitsignature so the 1.0 library API stays stable. - CpOptions
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::cp_with_options, mirroringdocker compose cpflags. - Engine
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Handle through which all Podman operations for a project are dispatched. - Events
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::stream_events, mirroringdocker compose events(--since,--until,--filter). - Exec
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::exec, mirroringdocker compose execflags. - Images
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::images_with_options. - Logs
Display - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Prefix-display options forEngine::logs_with_display(docker compose logs --no-color/--no-log-prefix). Kept off the frozenLogsOptionsstruct so the 1.0 library API stays stable. - Logs
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::logs_with_options, mirroringdocker compose logs. - LsOptions
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forlist_projects(docker compose ls). - Project
Lock - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Guard holding a held project lock. Dropping it releases the lock (the OS drops theflockwhen the underlying file descriptor is closed). - PsFilter
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Service/status/name filters forEngine::ps_filtered(docker compose ps--services,[SERVICE...],--status,--filter). Kept off the frozenPsOptionsstruct so the 1.0 library API stays stable. - PsOptions
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::ps_with_options, mirroringdocker compose ps. - Pull
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::pull_services_with_options, mirroringdocker compose pullflags. The--policyoverride is carried on the engine (seeEngine::with_up_overrides), not here. - Push
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::push, mirroringdocker compose push(plus a Podman--tls-verifyescape hatch for insecure/local registries). - RunOptions
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::run. - RunOverrides
- The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Extradocker compose runflag overrides threaded through the engine builder (Engine::with_run_overrides). These are CLI-only refinements of aruninvocation; they live here rather than on the frozenRunOptionspublic struct so the 1.0 library API stays stable, mirroring how theupimage-acquisition overrides are carried on the engine. - Stats
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::stats_with_options, mirroringdocker compose statsand the table-shaping flags the other list commands expose. Kept off the frozenEngine::statssignature so the 1.0 library API stays stable. - Volumes
Options - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Options forEngine::list_volumes, mirroringdocker compose volumes.
Enums§
- Compose
Error - The crate’s error type and
Resultalias, surfaced so callers handle one error enum across parsing and engine calls. All errors produced by podup.
Functions§
- is_
safe_ project_ name - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Whethernameis safe to use as a single path component and container name prefix. Matches docker-compose’s project-name rule^[a-z0-9][a-z0-9_-]*$: non-empty, bounded, lowercase ASCII letters/digits/-/_only, and a first character that is a letter or digit. This rejects a leading separator (-rf,--all,_x— a latent flag-injection vector for forwarding paths), uppercase, dots (.,.., hidden directories,bad.trailing-dot names), and all-separator names. - list_
projects - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. List podup projects on the host (docker compose ls). Groups everypodup.project-labelled container by project; by default shows only projects with at least one running container (allincludes stopped ones). For the--filter name=/status=predicates uselist_projects_filtered. - list_
projects_ filtered - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. List podup projects (docker compose ls) narrowed by--filterpredicates (name=<NAME>,status=<running|exited>). Thefiltersslice is kept off the frozenLsOptionsstruct so the 1.0 library API stays stable. - resolve_
image_ digests - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Return a copy offilewith every serviceimage:rewritten to its registry digest (repo@sha256:...), matchingdocker compose config --resolve-image-digests. An image with no registry digest in local storage (e.g. built locally, or never pulled) is left unchanged with a warning. - retain_
active_ profiles - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Remove services excluded by the active profile set, in place. - retain_
active_ profiles_ with_ targets - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Likeretain_active_profiles, but also keeps any service named intargetseven when its profile is inactive: naming a service on the command line activates its profile (docker compose), so per-service subcommands (start,stop,build,push,pull, …) can still address it. - validate_
stop_ timeout - The lifecycle
Engineand its per-command option/override types, plus the project-name/listing helpers — the surface a CLI drives compose operations through. Validate a CLI-t/--timeoutvalue at the trust boundary.
Type Aliases§
- Result
- The crate’s error type and
Resultalias, surfaced so callers handle one error enum across parsing and engine calls. Convenience alias forstd::result::Result<T, ComposeError>.