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:
parent
164cd807a1
commit
041fafc763
|
@ -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...)
|
||||
|
|
Loading…
Reference in New Issue