Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/podman/common/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,9 @@ func AutocompleteCgroupMode(_ *cobra.Command, _ []string, _ string) ([]string, c
}

// AutocompleteImageVolume - Autocomplete image volume options.
// -> "bind", "tmpfs", "ignore"
// -> "anonymous", "tmpfs", "ignore"
func AutocompleteImageVolume(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
imageVolumes := []string{"bind", "tmpfs", "ignore"}
imageVolumes := []string{"anonymous", "tmpfs", "ignore"}
return imageVolumes, cobra.ShellCompDirectiveNoFileComp
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/podman/common/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
imageVolumeFlagName := "image-volume"
createFlags.String(
imageVolumeFlagName, cf.ImageVolume,
`Tells podman how to handle the builtin image volumes ("bind"|"tmpfs"|"ignore")`,
`Tells podman how to handle the builtin image volumes ("anonymous"|"tmpfs"|"ignore")`,
)
_ = cmd.RegisterFlagCompletionFunc(imageVolumeFlagName, AutocompleteImageVolume)

Expand Down
4 changes: 4 additions & 0 deletions cmd/podman/containers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ func CreateInit(c *cobra.Command, vals entities.ContainerCreateOptions, isInfra
logrus.Warnf("The --kernel-memory flag is no longer supported. This flag is a noop.")
}

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")
}

if cliVals.LogDriver == define.PassthroughLogging {
if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) {
return vals, errors.New("the '--log-driver passthrough' option cannot be used on a TTY. If you really want it, use '--log-driver passthrough-tty'")
Expand Down
8 changes: 5 additions & 3 deletions docs/source/markdown/options/image-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<< if is_quadlet >>
### `ImageVolume=mode`
<< else >>
#### **--image-volume**=**bind** | *tmpfs* | *ignore*
#### **--image-volume**=**anonymous** | *tmpfs* | *ignore*
<< endif >>

Tells Podman how to handle the builtin image volumes. Default is **bind**.
Tells Podman how to handle the builtin image volumes. Default is **anonymous**.

- **bind**: An anonymous named volume is created and mounted into the container.
- **anonymous**: An anonymous named volume is created and mounted into the container.
- **tmpfs**: The volume is mounted onto the container as a tmpfs, which allows the users to create
content that disappears when the container is stopped.
- **ignore**: All volumes are just ignored and no action is taken.

In the past, a **bind** option was accepted as well. This is deprecated, and currently aliased to **anonymous**.
3 changes: 2 additions & 1 deletion docs/source/markdown/podman-systemd.unit.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,8 @@ Special Cases:

### `ImageVolume=`

Tells Podman how to handle the builtin image volumes. Default is **bind**.
Tells Podman how to handle the builtin image volumes. Default is **anonymous**.
In the past, a **bind** option was accepted as well. This is deprecated, and currently aliased to **anonymous**.
Equivalent to the Podman `--image-volume` option.

### `IP=`
Expand Down
Loading