summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-05-24 13:49:01 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-05-26 14:16:26 -0400
commitfb163976f4d46bbcbd793bd7a07a2c688d7924b5 (patch)
tree782e2a981d65cbad129df62ab541145394e83883 /cmd/podman/common
parent5f097c371f6ea13829b70a0a508464e57027bc8b (diff)
downloadpodman-fb163976f4d46bbcbd793bd7a07a2c688d7924b5.tar.gz
podman-fb163976f4d46bbcbd793bd7a07a2c688d7924b5.tar.bz2
podman-fb163976f4d46bbcbd793bd7a07a2c688d7924b5.zip
Support setting image_volume_mode in containers.conf
Fixes: https://github.com/containers/podman/issues/14230 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go5
-rw-r--r--cmd/podman/common/default.go3
2 files changed, 2 insertions, 6 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index d28becc8a..886c10cb5 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -255,9 +255,8 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
_ = cmd.RegisterFlagCompletionFunc(hostUserFlagName, completion.AutocompleteNone)
imageVolumeFlagName := "image-volume"
- createFlags.StringVar(
- &cf.ImageVolume,
- imageVolumeFlagName, DefaultImageVolume,
+ createFlags.String(
+ imageVolumeFlagName, containerConfig.Engine.ImageVolumeMode,
`Tells podman how to handle the builtin image volumes ("bind"|"tmpfs"|"ignore")`,
)
_ = cmd.RegisterFlagCompletionFunc(imageVolumeFlagName, AutocompleteImageVolume)
diff --git a/cmd/podman/common/default.go b/cmd/podman/common/default.go
index 7caec50ff..6f78d3d29 100644
--- a/cmd/podman/common/default.go
+++ b/cmd/podman/common/default.go
@@ -5,9 +5,6 @@ import (
)
var (
-
- // DefaultImageVolume default value
- DefaultImageVolume = "bind"
// Pull in configured json library
json = registry.JSONLibrary()
)