Skip to content

Commit

Permalink
Merge pull request containers#2308 from giuseppe/pod-create-allow-roo…
Browse files Browse the repository at this point in the history
…tless

pod: drop invalid check for rootless
  • Loading branch information
openshift-merge-robot authored Feb 11, 2019
2 parents 6d7d90e + 41967e2 commit acf2e91
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions cmd/podman/pod_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/rootless"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -82,9 +81,6 @@ func podCreateCmd(c *cliconfig.PodCreateValues) error {
if !c.Infra {
return errors.Errorf("you must have an infra container to publish port bindings to the host")
}
if rootless.IsRootless() {
return errors.Errorf("rootless networking does not allow port binding to the host")
}
}

if !c.Infra && c.Flag("share").Changed && c.Share != "none" && c.Share != "" {
Expand Down
1 change: 0 additions & 1 deletion libpod/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
cmd.Env = append(cmd.Env, fmt.Sprintf("_LIBPOD_USERNS_CONFIGURED=%s", os.Getenv("_LIBPOD_USERNS_CONFIGURED")))
cmd.Env = append(cmd.Env, fmt.Sprintf("_LIBPOD_ROOTLESS_UID=%s", os.Getenv("_LIBPOD_ROOTLESS_UID")))
cmd.Env = append(cmd.Env, fmt.Sprintf("HOME=%s", os.Getenv("HOME")))
cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir))

if r.reservePorts && !ctr.config.NetMode.IsSlirp4netns() {
ports, err := bindPorts(ctr.config.PortMappings)
Expand Down

0 comments on commit acf2e91

Please sign in to comment.