diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-07-26 16:21:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 16:21:40 +0200 |
commit | 7f0fab10d1c43a7605da9c47900e0ae7a2120c11 (patch) | |
tree | 56723e57c6de54cfdd118d55937eeebf8a158a24 /cmd | |
parent | a298909decc9091da8cc134e6eb2f38a70635a30 (diff) | |
parent | 27679d80b897b80c10553db0e2048a19ca17737d (diff) | |
download | podman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.tar.gz podman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.tar.bz2 podman-7f0fab10d1c43a7605da9c47900e0ae7a2120c11.zip |
Merge pull request #15059 from cdoern/infra
pod create --share none should not create infra
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/pods/create.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index aea8a7229..4f1f66ad6 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -134,6 +134,12 @@ func create(cmd *cobra.Command, args []string) error { imageName = infraImage } img := imageName + + if !cmd.Flag("infra").Changed && (share == "none" || share == "") { + // we do not want an infra container when not sharing namespaces + createOptions.Infra = false + } + if !createOptions.Infra { if cmd.Flag("no-hosts").Changed { return fmt.Errorf("cannot specify --no-hosts without an infra container") |