diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-03 14:18:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 14:18:28 +0100 |
commit | 34baea814ba6af58e7f7b65622fd0fb7b838fbf7 (patch) | |
tree | 0ac13e0869ade22faf212a0cf2602ac832d90820 /pkg/spec | |
parent | 1641ee61802ad5e13a9ddf0a20099fe31f73768d (diff) | |
parent | ad8e0e5e49a96146d52cfa41945afbe973ba30af (diff) | |
download | podman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.tar.gz podman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.tar.bz2 podman-34baea814ba6af58e7f7b65622fd0fb7b838fbf7.zip |
Merge pull request #5367 from vrothberg/ENVFIX
consolidate env handling into pkg/env
Diffstat (limited to 'pkg/spec')
-rw-r--r-- | pkg/spec/spec.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index a4ae22efd..77f8bc657 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -7,6 +7,7 @@ import ( libpodconfig "github.com/containers/libpod/libpod/config" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/cgroups" + "github.com/containers/libpod/pkg/env" "github.com/containers/libpod/pkg/rootless" "github.com/containers/libpod/pkg/sysinfo" "github.com/docker/go-units" @@ -150,7 +151,6 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM for key, val := range config.Annotations { g.AddAnnotation(key, val) } - g.AddProcessEnv("container", "podman") addedResources := false @@ -292,6 +292,9 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM } } + // Make sure to always set the default variables unless overridden in the + // config. + config.Env = env.Join(env.DefaultEnvVariables, config.Env) for name, val := range config.Env { g.AddProcessEnv(name, val) } |