Skip to content

Commit 06e4e09

Browse files
committed
cri: append envs from image config to empty slice to avoid env lost
Signed-off-by: Justin Terry (SF) <[email protected]>
1 parent c32ccdf commit 06e4e09

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)