Skip to content

feat: support named volumes#14

Merged
lesnik512 merged 3 commits into
mainfrom
feat/named-volumes
Jul 8, 2026
Merged

feat: support named volumes#14
lesnik512 merged 3 commits into
mainfrom
feat/named-volumes

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Accepts named volumes: the top-level volumes: key (ignored, mirrors top-level networks) and service-level named-volume references (e.g. pgdata:/var/lib/postgresql/data), previously hard errors. A named-volume reference is emitted verbatim as -v <name>:<target> — podman creates it implicitly on first reference (verified against podman's --volume, -v docs), no podman volume create step needed.

Unblocks real compose files using named volumes for data persistence (e.g. Postgres) without editing the compose file.

Design: planning/changes/2026-07-08.04-named-volumes.md. architecture/supported-subset.md updated in this PR, including a follow-up note (from independent review) that a non-default driver/driver_opts or external: true has no effect — podman always creates the volume implicitly with default options.

Independently reviewed (opus): ready to merge, no Critical/Important findings; one Minor doc-wording issue addressed.

Tests

just test-ci — 95 passed, 100% line coverage. just lint-ci clean.

lesnik512 added 3 commits July 8, 2026 18:01
A colon-containing service volume whose source is a bare identifier (not
.-or-/-prefixed) is a Compose named volume, e.g. calutrondb:/var/lib/....
Previously rejected as unsupported; now accepted and emitted verbatim as
'-v <name>:<target>' -- podman creates the named volume implicitly on first
reference, matching plain 'podman run -v' semantics (confirmed against
podman's --volume docs). The top-level volumes: block (driver/options) is
accepted and ignored, mirroring the existing top-level networks treatment,
since implicit creation with default options needs nothing read from it.
Per reviewer feedback: the top-level volumes: block's driver/driver_opts and
external:true are never read, so a non-default driver or an external volume
that should already exist has no effect -- podman always creates the volume
implicitly with default options.
@lesnik512 lesnik512 merged commit 8ffe031 into main Jul 8, 2026
6 checks passed
@lesnik512 lesnik512 deleted the feat/named-volumes branch July 8, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant