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"}
|
||||
}
|
||||
|
||||
ulimitHost := []string{"--ulimit", "host"}
|
||||
|
||||
var usernsArg string
|
||||
if currentUser.Uid == "0" {
|
||||
usernsArg = "host"
|
||||
|
@ -417,11 +415,7 @@ func createContainer(container, image, release, authFile string, showCommandToEn
|
|||
"--pid", "host",
|
||||
"--privileged",
|
||||
"--security-opt", "label=disable",
|
||||
}...)
|
||||
|
||||
createArgs = append(createArgs, ulimitHost...)
|
||||
|
||||
createArgs = append(createArgs, []string{
|
||||
"--ulimit", "host",
|
||||
"--userns", usernsArg,
|
||||
"--user", "root:root",
|
||||
"--volume", "/:/run/host:rslave",
|
||||
|
|
Loading…
Reference in a new issue