From f61288fe37b9a4e555925dc15d68b750f5ff9bd3 Mon Sep 17 00:00:00 2001 From: "Daniel, Dao Quang Minh" Date: Fri, 14 Nov 2014 12:49:21 -0500 Subject: [PATCH] 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 (github: dqminh) --- namespaces/execin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/namespaces/execin.go b/namespaces/execin.go index 7dea9187..430dc72f 100644 --- a/namespaces/execin.go +++ b/namespaces/execin.go @@ -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 }