Skip to content

Commit

Permalink
Merge pull request #6028 from rhatdan/old
Browse files Browse the repository at this point in the history
User specified environment after other environments are set
  • Loading branch information
openshift-merge-robot authored May 1, 2020
2 parents b5af022 + cc4a1ea commit e9b1785
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e9b1785

Please sign in to comment.