summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 20d976c0b..7a3b26c85 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -16,11 +16,11 @@ import (
ann "github.com/containers/libpod/pkg/annotations"
"github.com/containers/libpod/pkg/apparmor"
"github.com/containers/libpod/pkg/inspect"
+ "github.com/containers/libpod/pkg/namespaces"
"github.com/containers/libpod/pkg/rootless"
cc "github.com/containers/libpod/pkg/spec"
"github.com/containers/libpod/pkg/util"
libpodVersion "github.com/containers/libpod/version"
- "github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/signal"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
@@ -456,7 +456,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if !c.IsSet("pid") && pod != nil && pod.SharesPID() {
pidModeStr = cc.POD
}
- pidMode := container.PidMode(pidModeStr)
+ pidMode := namespaces.PidMode(pidModeStr)
if !cc.Valid(string(pidMode), pidMode) {
return nil, errors.Errorf("--pid %q is not valid", c.String("pid"))
}
@@ -465,7 +465,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if !c.IsSet("userns") && pod != nil && pod.SharesUser() {
usernsModeStr = cc.POD
}
- usernsMode := container.UsernsMode(usernsModeStr)
+ usernsMode := namespaces.UsernsMode(usernsModeStr)
if !cc.Valid(string(usernsMode), usernsMode) {
return nil, errors.Errorf("--userns %q is not valid", c.String("userns"))
}
@@ -474,7 +474,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if !c.IsSet("uts") && pod != nil && pod.SharesUTS() {
utsModeStr = cc.POD
}
- utsMode := container.UTSMode(utsModeStr)
+ utsMode := namespaces.UTSMode(utsModeStr)
if !cc.Valid(string(utsMode), utsMode) {
return nil, errors.Errorf("--uts %q is not valid", c.String("uts"))
}
@@ -483,7 +483,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if !c.IsSet("ipc") && pod != nil && pod.SharesIPC() {
ipcModeStr = cc.POD
}
- ipcMode := container.IpcMode(ipcModeStr)
+ ipcMode := namespaces.IpcMode(ipcModeStr)
if !cc.Valid(string(ipcMode), ipcMode) {
return nil, errors.Errorf("--ipc %q is not valid", ipcMode)
}
@@ -492,7 +492,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
netModeStr = cc.POD
}
// Make sure if network is set to container namespace, port binding is not also being asked for
- netMode := container.NetworkMode(netModeStr)
+ netMode := namespaces.NetworkMode(netModeStr)
if netMode.IsContainer() || cc.IsPod(netModeStr) {
if len(c.StringSlice("publish")) > 0 || c.Bool("publish-all") {
return nil, errors.Errorf("cannot set port bindings on an existing container network namespace")