docs: fix --image-volume default and accepted values#28980
Open
stefan8 wants to merge 1 commit into
Open
Conversation
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>
0b23030 to
eb173b2
Compare
Honny1
reviewed
Jun 22, 2026
Honny1
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks!
PTAL @podman-container-tools/podman-reviewers @podman-container-tools/podman-maintainers
inknos
reviewed
Jun 22, 2026
inknos
left a comment
Contributor
There was a problem hiding this comment.
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")
}
mheon
reviewed
Jun 23, 2026
| 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**. |
Contributor
There was a problem hiding this comment.
"In the past, a bind option was accepted as well. This is deprecated, and currently aliased to anonymous"
Contributor
|
One nit on docs wording, and I'd like to see the notice suggested by @inknos - otherwise LGTM |
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.
--image-volumeis documented and auto-completed asbind, but the canonical values areanonymous | tmpfs | ignore(defaultanonymous);bindis only a deprecated alias. This showsanonymousin the docs,--helpand completion, and notes thatbindstill works. No behavior change.Checklist
git commit -s).Fixes: #27674in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?