diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index 5cc4505ff24c..41ead6014a4e 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -62,6 +62,10 @@ func init() { flags := createCommand.Flags() flags.SetInterspersed(false) common.DefineCreateDefaults(&infraOptions) + // these settings are not applicable to pod create since they are per-container + // and they will end up being duplicated for each container in the pod. + infraOptions.Volume = nil + infraOptions.Mount = nil common.DefineCreateFlags(createCommand, &infraOptions, entities.InfraMode) common.DefineNetFlags(createCommand) diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index c8ef3a80c488..12e41efecf0d 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -71,6 +71,24 @@ function teardown() { } +@test "podman pod create - custom volumes" { + skip_if_remote "CONTAINERS_CONF_OVERRIDE only affects server side" + image="i.do/not/exist:image" + tmpdir=$PODMAN_TMPDIR/pod-test + mkdir -p $tmpdir + containersconf=$tmpdir/containers.conf + cat >$containersconf <