use os.Environ() to set exec command's env
because `LoadContainerEnvironment` is already run, os.Environ() will return the correct environment variables for the exec command (i.e. removed duplicated envs, set HOME for user etc...) Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
This commit is contained in:
parent
1c5d836b05
commit
f61288fe37
|
@ -111,7 +111,7 @@ func FinalizeSetns(container *libcontainer.Config, args []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := system.Execv(args[0], args[0:], container.Env); err != nil {
|
if err := system.Execv(args[0], args[0:], os.Environ()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue