feat: support named volumes#14
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accepts named volumes: the top-level
volumes:key (ignored, mirrors top-levelnetworks) 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, -vdocs), nopodman volume createstep 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.mdupdated in this PR, including a follow-up note (from independent review) that a non-defaultdriver/driver_optsorexternal: truehas 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-ciclean.