diff options
author | baude <bbaude@redhat.com> | 2018-01-04 12:59:33 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-20 18:51:21 +0000 |
commit | 946b4ced544e5988a971da12c7e34a684ab0e39d (patch) | |
tree | 026fa6619b6b98a9cf08ec66b8cd6dd27a714736 /libpod | |
parent | 67f06cf1cfda17387bd094f671672c6b51b2c5cd (diff) | |
download | podman-946b4ced544e5988a971da12c7e34a684ab0e39d.tar.gz podman-946b4ced544e5988a971da12c7e34a684ab0e39d.tar.bz2 podman-946b4ced544e5988a971da12c7e34a684ab0e39d.zip |
Enable port bindings
Set up nbetworking ports for the following use cases:
* bind the same port between host and container
* bind a specific host port to a different container port
* bind a random host port to a specific container port
Signed-off-by: baude <bbaude@redhat.com>
Closes: #214
Approved by: baude
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/networking.go | 1 | ||||
-rw-r--r-- | libpod/options.go | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/libpod/networking.go b/libpod/networking.go index 41bd65d25..40756cf88 100644 --- a/libpod/networking.go +++ b/libpod/networking.go @@ -35,7 +35,6 @@ func (r *Runtime) createNetNS(ctr *Container) (err error) { }() logrus.Debugf("Made network namespace at %s for container %s", ctrNS.Path(), ctr.ID()) - podNetwork := getPodNetwork(ctr.ID(), ctr.Name(), ctrNS.Path(), ctr.config.PortMappings) _, err = r.netPlugin.SetUpPod(podNetwork) diff --git a/libpod/options.go b/libpod/options.go index 63a72628f..f82cb20c4 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -584,7 +584,7 @@ func WithNetNS(portMappings []ocicni.PortMapping) CtrCreateOption { } ctr.config.CreateNetNS = true - copy(ctr.config.PortMappings, portMappings) + ctr.config.PortMappings = portMappings return nil } |