cmd/create: Simplify code
Fallout from 8e80dd5db1
https://github.com/containers/toolbox/pull/1256
This commit is contained in:
parent
aeae18920b
commit
fb15655ace
1 changed files with 1 additions and 7 deletions
|
@ -254,8 +254,6 @@ func createContainer(container, image, release, authFile string, showCommandToEn
|
||||||
devPtsMount = []string{"--mount", "type=devpts,destination=/dev/pts"}
|
devPtsMount = []string{"--mount", "type=devpts,destination=/dev/pts"}
|
||||||
}
|
}
|
||||||
|
|
||||||
ulimitHost := []string{"--ulimit", "host"}
|
|
||||||
|
|
||||||
var usernsArg string
|
var usernsArg string
|
||||||
if currentUser.Uid == "0" {
|
if currentUser.Uid == "0" {
|
||||||
usernsArg = "host"
|
usernsArg = "host"
|
||||||
|
@ -417,11 +415,7 @@ func createContainer(container, image, release, authFile string, showCommandToEn
|
||||||
"--pid", "host",
|
"--pid", "host",
|
||||||
"--privileged",
|
"--privileged",
|
||||||
"--security-opt", "label=disable",
|
"--security-opt", "label=disable",
|
||||||
}...)
|
"--ulimit", "host",
|
||||||
|
|
||||||
createArgs = append(createArgs, ulimitHost...)
|
|
||||||
|
|
||||||
createArgs = append(createArgs, []string{
|
|
||||||
"--userns", usernsArg,
|
"--userns", usernsArg,
|
||||||
"--user", "root:root",
|
"--user", "root:root",
|
||||||
"--volume", "/:/run/host:rslave",
|
"--volume", "/:/run/host:rslave",
|
||||||
|
|
Loading…
Reference in a new issue