mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 22:37:14 +08:00
DefaultCreateCommand supports command w/ flags
namespaces.DefaultCreateCommand prepends the user-supplied command to execute with "--", so that "nsinit init" does not attempt to interpret it. Docker-DCO-1.1-Signed-off-by: Bernerd Schaefer <bj.schaefer@gmail.com> (github: bernerdschaefer)
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ func DefaultCreateCommand(container *libcontainer.Config, console, rootfs, dataP
|
||||
}
|
||||
*/
|
||||
|
||||
command := exec.Command(init, append([]string{"init"}, args...)...)
|
||||
command := exec.Command(init, append([]string{"init", "--"}, args...)...)
|
||||
// make sure the process is executed inside the context of the rootfs
|
||||
command.Dir = rootfs
|
||||
command.Env = append(os.Environ(), env...)
|
||||
|
||||
Reference in New Issue
Block a user