Skip to content

docs: fix --image-volume default and accepted values#28980

Open
stefan8 wants to merge 1 commit into
podman-container-tools:mainfrom
stefan8:fix/image-volume-default-anonymous
Open

docs: fix --image-volume default and accepted values#28980
stefan8 wants to merge 1 commit into
podman-container-tools:mainfrom
stefan8:fix/image-volume-default-anonymous

Conversation

@stefan8

@stefan8 stefan8 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

--image-volume is documented and auto-completed as bind, but the canonical values are anonymous | tmpfs | ignore (default anonymous); bind is only a deprecated alias. This shows anonymous in the docs, --help and completion, and notes that bind still works. No behavior change.

Checklist

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all commits (git commit -s).
  • Referenced issues using Fixes: #27674 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

The documentation, the `podman create/run` CLI help string, and the
shell completion all presented "bind" as the primary/default value for
--image-volume. That is wrong: the canonical accepted values are
anonymous | tmpfs | ignore (pkg/specgen/container_validate.go), and the
default is "anonymous" (pkg/specgen/specgen.go). "bind" is only a
deprecated alias that the code still maps to "anonymous"
(pkg/specgenutil/specgen.go, pkg/specgen/generate/kube/kube.go).

Present "anonymous" as the primary value and default everywhere, keep a
short note that "bind" remains accepted as a deprecated alias, and fix
the completion slice so it suggests the real canonical values.

Fixes: podman-container-tools#27674

Signed-off-by: Grzegorz Szczepanczyk <g.szczepanczyk@getprintbox.com>
@stefan8 stefan8 force-pushed the fix/image-volume-default-anonymous branch from 0b23030 to eb173b2 Compare June 19, 2026 09:47
@Honny1 Honny1 added the No New Tests Allow PR to proceed without adding regression tests label Jun 22, 2026

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

PTAL @podman-container-tools/podman-reviewers @podman-container-tools/podman-maintainers

@inknos inknos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would make sense to add in CreateInit a deprecation notice such as this?

if c.Flag("image-volume") != nil && c.Flag("image-volume").Changed && c.Flag("image-volume").Value.String() == "bind" {
    logrus.Warnf("The --image-volume=bind value is deprecated, use --image-volume=anonymous instead")
}

content that disappears when the container is stopped.
- **ignore**: All volumes are just ignored and no action is taken.

**bind** is still accepted as a deprecated alias for **anonymous**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In the past, a bind option was accepted as well. This is deprecated, and currently aliased to anonymous"

@mheon

mheon commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

One nit on docs wording, and I'd like to see the notice suggested by @inknos - otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants