diff --git a/execdriver/lxc/driver.go b/execdriver/lxc/driver.go index 2a6663117a..5999d5bab5 100644 --- a/execdriver/lxc/driver.go +++ b/execdriver/lxc/driver.go @@ -111,6 +111,9 @@ func (d *driver) Run(c *execdriver.Process, startCallback execdriver.StartCallba params = append(params, "-w", c.WorkingDir) } + params = append(params, "--", c.Entrypoint) + params = append(params, c.Arguments...) + if d.sharedRoot { // lxc-start really needs / to be non-shared, or all kinds of stuff break // when lxc-start unmount things and those unmounts propagate to the main @@ -127,9 +130,6 @@ func (d *driver) Run(c *execdriver.Process, startCallback execdriver.StartCallba } } - params = append(params, "--", c.Entrypoint) - params = append(params, c.Arguments...) - var ( name = params[0] arg = params[1:]