diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/common.go | 7 | ||||
-rw-r--r-- | cmd/podman/create.go | 6 |
2 files changed, 1 insertions, 12 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 635869609..63c41d01c 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -270,12 +270,7 @@ var createFlags = []cli.Flag{ Usage: "Assign a name to the container", }, cli.StringFlag{ - Name: "net", - Usage: "Connect a container to a network (alias for --network)", - Value: "bridge", - }, - cli.StringFlag{ - Name: "network", + Name: "net, network", Usage: "Connect a container to a network", Value: "bridge", }, diff --git a/cmd/podman/create.go b/cmd/podman/create.go index a751d32aa..89a8baf6d 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -424,12 +424,6 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim return nil, errors.Wrapf(err, "unable to translate --shm-size") } // Network - // Both --network and --net have default values of 'bridge' - // --net only overrides --network when --network is not explicitly - // set and --net is. - if c.IsSet("network") && c.IsSet("net") { - return nil, errors.Errorf("cannot use --network and --net together. use only --network instead") - } netMode := container.NetworkMode(c.String("network")) // Make sure if network is set to container namespace, port binding is not also being asked for if netMode.IsContainer() { |