Skip to content

Commit

Permalink
cri: append envs from image config to empty slice to avoid env lost
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Terry (SF) <juterry@microsoft.com>
  • Loading branch information
jterry75 committed Feb 19, 2021
1 parent c32ccdf commit 06e4e09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cri/server/container_create_windows.go
Expand Up @@ -62,7 +62,7 @@ func (c *criService) containerSpec(

// Apply envs from image config first, so that envs from container config
// can override them.
env := imageConfig.Env
env := append([]string{}, imageConfig.Env...)
for _, e := range config.GetEnvs() {
env = append(env, e.GetKey()+"="+e.GetValue())
}
Expand Down

0 comments on commit 06e4e09

Please sign in to comment.