summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/create.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index 3c2c8a3bc..735dfa78c 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -166,10 +166,11 @@ func create(cmd *cobra.Command, args []string) error {
defer errorhandling.SyncQuiet(podIDFD)
}
- createOptions.Net, err = common.NetFlagsToNetOptions(cmd)
+ createOptions.Net, err = common.NetFlagsToNetOptions(cmd, createOptions.Infra)
if err != nil {
return err
}
+
if len(createOptions.Net.PublishPorts) > 0 {
if !createOptions.Infra {
return errors.Errorf("you must have an infra container to publish port bindings to the host")