Merge pull request #5054 from jterry75/fix_env_windows

cri: append envs from image config to empty slice to avoid env lost
This commit is contained in:
Phil Estes 2021-02-18 20:40:44 -05:00 committed by GitHub
commit e58be59cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())
}