diff options
author | baude <bbaude@redhat.com> | 2018-01-02 13:25:42 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-31 21:47:07 +0000 |
commit | 2dfd048545d1def4b805a785f7259fc8f1fca22e (patch) | |
tree | 8213c16da538a0106590daf85e116af6c9c0c5f5 /cmd | |
parent | 7f6a141839212c0d4d50324a726c5477817c8887 (diff) | |
download | podman-2dfd048545d1def4b805a785f7259fc8f1fca22e.tar.gz podman-2dfd048545d1def4b805a785f7259fc8f1fca22e.tar.bz2 podman-2dfd048545d1def4b805a785f7259fc8f1fca22e.zip |
Implment network == none
When network == none, the container should only have a
loopback interface and that's it.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #176
Approved by: baude
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/spec.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go index d18da79ea..0b5a3c3e3 100644 --- a/cmd/podman/spec.go +++ b/cmd/podman/spec.go @@ -572,7 +572,8 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er return nil, errors.Wrapf(err, "container %q not found", c.NetMode.ConnectedContainer()) } options = append(options, libpod.WithNetNSFrom(connectedCtr)) - } else if !c.NetMode.IsHost() { + } else if !c.NetMode.IsHost() && !c.NetMode.IsNone() { + options = append(options, libpod.WithNetNS([]ocicni.PortMapping{})) options = append(options, libpod.WithNetNS(portBindings)) } |