summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod_infra_linux.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-11-19 13:20:56 -0600
committerbaude <bbaude@redhat.com>2018-11-20 09:49:34 -0600
commit690c52a113124efcedccb84e44198e7602f064ec (patch)
tree9a11d0ad045ae8f72354a80ede4068f0a9cbbeab /libpod/runtime_pod_infra_linux.go
parent4eecc8cf70728d733aa8d1c948093d9ae4a334df (diff)
downloadpodman-690c52a113124efcedccb84e44198e7602f064ec.tar.gz
podman-690c52a113124efcedccb84e44198e7602f064ec.tar.bz2
podman-690c52a113124efcedccb84e44198e7602f064ec.zip
Allow users to expose ports from the pod to the host
we need to allow users to expose ports to the host for the purposes of networking, like a webserver. the port exposure must be done at the time the pod is created. strictly speaking, the port exposure occurs on the infra container. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/runtime_pod_infra_linux.go')
-rw-r--r--libpod/runtime_pod_infra_linux.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index fea79e994..450a2fb32 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -7,7 +7,6 @@ import (
"github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/rootless"
- "github.com/cri-o/ocicni/pkg/ocicni"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
)
@@ -50,9 +49,8 @@ func (r *Runtime) makeInfraContainer(ctx context.Context, p *Pod, imgName, imgID
options = append(options, withIsInfra())
// Since user namespace sharing is not implemented, we only need to check if it's rootless
- portMappings := make([]ocicni.PortMapping, 0)
networks := make([]string, 0)
- options = append(options, WithNetNS(portMappings, isRootless, networks))
+ options = append(options, WithNetNS(p.config.InfraContainer.PortBindings, isRootless, networks))
return r.newContainer(ctx, g.Config, options...)
}