diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-08 20:02:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 20:02:42 +0200 |
commit | b2e8915baa22098fbde39b73ad0f18326ec2842b (patch) | |
tree | 46602b322a8a10d1697d8f6c14027db3109c9164 /cmd/podman | |
parent | 428246d4e48a5b3ac1c499fed8d82276195a4ec9 (diff) | |
parent | 7989e422b404c2fe182dac5154fbfe218c561b93 (diff) | |
download | podman-b2e8915baa22098fbde39b73ad0f18326ec2842b.tar.gz podman-b2e8915baa22098fbde39b73ad0f18326ec2842b.tar.bz2 podman-b2e8915baa22098fbde39b73ad0f18326ec2842b.zip |
Merge pull request #6144 from mheon/fix_pod_create_noinfra
Fix `podman pod create --infra=false`
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/pods/create.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index f97fa836a..e24cdef98 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -16,6 +16,7 @@ import ( "github.com/containers/libpod/pkg/specgen" "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -81,6 +82,7 @@ func create(cmd *cobra.Command, args []string) error { } if !createOptions.Infra { + logrus.Debugf("Not creating an infra container") if cmd.Flag("infra-command").Changed { return errors.New("cannot set infra-command without an infra container") } @@ -114,6 +116,7 @@ func create(cmd *cobra.Command, args []string) error { if err != nil { return err } + createOptions.Net.Network = specgen.Namespace{} if cmd.Flag("network").Changed { netInput, err := cmd.Flags().GetString("network") if err != nil { @@ -132,6 +135,7 @@ func create(cmd *cobra.Command, args []string) error { n.NSMode = specgen.Bridge createOptions.Net.CNINetworks = strings.Split(netInput, ",") } + createOptions.Net.Network = n } if len(createOptions.Net.PublishPorts) > 0 { if !createOptions.Infra { |