summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-01-11 16:47:23 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-01-19 20:45:07 +0100
commitf182946bef84d2766c4ff9faef171cf69afacb97 (patch)
treea9087f6aca07fdb819fc256069186827194d1407 /pkg
parent6f8e569ae2e7cdaecfb98d548c28b16603302455 (diff)
downloadpodman-f182946bef84d2766c4ff9faef171cf69afacb97.tar.gz
podman-f182946bef84d2766c4ff9faef171cf69afacb97.tar.bz2
podman-f182946bef84d2766c4ff9faef171cf69afacb97.zip
rootless: support port redirection from the host
add support for ports redirection from the host. It needs slirp4netns v0.3.0-alpha.1. Closes: https://github.com/containers/libpod/issues/2081 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/createconfig.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 632d60b55..344f4afb9 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -422,11 +422,7 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime, pod *l
}
options = append(options, libpod.WithNetNSFrom(connectedCtr))
} else if !c.NetMode.IsHost() && !c.NetMode.IsNone() {
- isRootless := rootless.IsRootless()
postConfigureNetNS := c.NetMode.IsSlirp4netns() || (len(c.IDMappings.UIDMap) > 0 || len(c.IDMappings.GIDMap) > 0) && !c.UsernsMode.IsHost()
- if isRootless && len(portBindings) > 0 {
- return nil, errors.New("port bindings are not yet supported by rootless containers")
- }
options = append(options, libpod.WithNetNS(portBindings, postConfigureNetNS, string(c.NetMode), networks))
}