make podman play use ENVs from image

fixes #8608.

Signed-off-by: Christopher J. Ruwe <cjr@cruwe.de>
This commit is contained in:
Christopher J. Ruwe
2020-12-09 09:09:01 +01:00
parent dd295f297b
commit b13ae2b6dc

View File

@ -148,6 +148,11 @@ func ToSpecGen(ctx context.Context, containerYAML v1.Container, iid string, newI
// Environment Variables
envs := map[string]string{}
for _, env := range imageData.Config.Env {
keyval := strings.Split(env, "=")
envs[keyval[0]] = keyval[1]
}
for _, env := range containerYAML.Env {
value := envVarValue(env, configMaps)