diff options
author | baude <bbaude@redhat.com> | 2018-01-22 09:17:51 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-22 17:09:11 +0000 |
commit | e1c67e6c8579931f44ec61f847f536a8f68202db (patch) | |
tree | 8afb243ad165bb0775b439ed555111e615c64ebc /libpod | |
parent | 5c3e4cfa62452b9cd5c2c08bf081ab524ded1cb4 (diff) | |
download | podman-e1c67e6c8579931f44ec61f847f536a8f68202db.tar.gz podman-e1c67e6c8579931f44ec61f847f536a8f68202db.tar.bz2 podman-e1c67e6c8579931f44ec61f847f536a8f68202db.zip |
Expose ports from image
When an image has a port to expose, we need to expose it. User's input overrides the
image's port information.
Also, enable port information in ps so we can see which random port is assigned.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #249
Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_inspect.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 0bb45cedd..78dd00c16 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -4,7 +4,6 @@ import ( "github.com/cri-o/ocicni/pkg/ocicni" "github.com/projectatomic/libpod/libpod/driver" "github.com/sirupsen/logrus" - "github.com/ulule/deepcopier" ) func (c *Container) getContainerInspectData(size bool, driverData *driver.Data) (*ContainerInspectData, error) { @@ -77,7 +76,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *driver.Data) // Copy port mappings into network settings if config.PortMappings != nil { - deepcopier.Copy(config.PortMappings).To(data.NetworkSettings.Ports) + data.NetworkSettings.Ports = config.PortMappings } // Get information on the container's network namespace (if present) |