mirror of https://github.com/containers/podman.git
Merge pull request #2308 from giuseppe/pod-create-allow-rootless
pod: drop invalid check for rootless
This commit is contained in:
commit
acf2e91373
|
|
@ -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"
|
||||
|
|
@ -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 != "" {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue