Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit e4fcda3

Browse files
committed
cri: append envs from image config to empty slice to avoid env lost
Signed-off-by: Justin Terry (SF) <[email protected]> (cherry picked from commit containerd/containerd@06e4e09) Signed-off-by: Shengjing Zhu <[email protected]>
1 parent f9bcbb7 commit e4fcda3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/server/container_create_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint3
5252

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

0 commit comments

Comments
 (0)