aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-29 08:52:14 +0200
committerGitHub <noreply@github.com>2020-04-29 08:52:14 +0200
commit4e21d09f98d3b6af37f2d6118cd8914674b56ab1 (patch)
tree69dcbc4ab34589faacf294d7a0adf09bc38d67a5 /pkg
parentbf4efc1953467907ae7d75d5f3ef3cd41505ee24 (diff)
parente84beeaf94014f6440e0b23f53ba0d1e4015186f (diff)
downloadpodman-4e21d09f98d3b6af37f2d6118cd8914674b56ab1.tar.gz
podman-4e21d09f98d3b6af37f2d6118cd8914674b56ab1.tar.bz2
podman-4e21d09f98d3b6af37f2d6118cd8914674b56ab1.zip
Merge pull request #6029 from rhatdan/env
User specified environment happen after other environments are set
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/spec.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 7ee2df890..a62344640 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -326,10 +326,6 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
}
defaultEnv = env.Join(env.DefaultEnvVariables, defaultEnv)
}
- config.Env = env.Join(defaultEnv, config.Env)
- for name, val := range config.Env {
- g.AddProcessEnv(name, val)
- }
if err := addRlimits(config, &g); err != nil {
return nil, err
@@ -360,6 +356,11 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
if err := config.Cgroup.ConfigureGenerator(&g); err != nil {
return nil, err
}
+
+ config.Env = env.Join(defaultEnv, config.Env)
+ for name, val := range config.Env {
+ g.AddProcessEnv(name, val)
+ }
configSpec := g.Config
// If the container image specifies an label with a