Skip to content

Commit e58be59

Browse files
authored
Merge pull request #5054 from jterry75/fix_env_windows
cri: append envs from image config to empty slice to avoid env lost
2 parents c32ccdf + 06e4e09 commit e58be59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cri/server/container_create_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (c *criService) containerSpec(
6262

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

0 commit comments

Comments
 (0)