Skip to content

feat: accept the long-form volumes type: image mount#77

Merged
lesnik512 merged 5 commits into
mainfrom
image-mount-type
Jul 17, 2026
Merged

feat: accept the long-form volumes type: image mount#77
lesnik512 merged 5 commits into
mainfrom
image-mount-type

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Adds type: image as a fourth long-form volume type — mounting an image's rootfs at target, emitted as podman run --mount type=image,source=<ref>,target=<path>[,subpath=<abs>]. Closes the last podman-expressible long-form volume gap (the image deferred-parser item in deferred.md).

Design: planning/changes/2026-07-17.03-image-mount-type.md.

Measured behaviors (docker v5.1.2 + podman 6.0.1)

  • source required — the image reference; podman refuses a sourceless image mount (must set source and destination), Docker allows it optional → a rule-two narrowing (like bind).
  • read_only accepted but not emitted — image mounts are inherently read-only; podman rejects both readonly and rw options, so no ro is emitted (Docker accepts and ignores read_only).
  • image: {subpath} must be absolute — podman requires an absolute image subpath (bin → "must be an absolute path"), unlike a volume subpath (relative, resolved against the volume root). A ${VAR} subpath is carved out. Volume subpath handling is unchanged.
  • The image source is an image ref, not a path → no project_dir resolution; a mismatched sub-map is refused.

Verification

  • 1401 tests @ 100% coverage; just lint-ci, just check-planning clean.
  • Conformance: a type: image corpus doc is both-accept (dedicated assertion).
  • Integration test passed on real podman 6.0.1 — an image's rootfs mounts into the container (test -e /img/bin/busybox).
  • The final review measured each option against live podman and caught the relative-subpath false green (docker accepts, podman rejects at run time), fixed here as a rule-two narrowing.

🤖 Generated with Claude Code

@lesnik512
lesnik512 merged commit 64292f3 into main Jul 17, 2026
8 checks passed
@lesnik512
lesnik512 deleted the image-mount-type branch July 17, 2026 12:51
lesnik512 added a commit that referenced this pull request Jul 17, 2026
Curates planning/releases/0.3.1.md for the two commits since 0.3.0: #77 (type: image mount -- source required, read_only inert, subpath absolute) and #76 (README refresh for 0.3.0 parity + breadth).
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