From fb15655ace3183106629e3a7ec6889242d8623e7 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 7 Mar 2023 17:20:50 +0100 Subject: [PATCH] cmd/create: Simplify code Fallout from 8e80dd5db1e6f40b827a564c16823fd0dad083f0 https://github.com/containers/toolbox/pull/1256 --- src/cmd/create.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/cmd/create.go b/src/cmd/create.go index 3fb4715..2c22994 100644 --- a/src/cmd/create.go +++ b/src/cmd/create.go @@ -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",