diff --git a/integration/dockerfiles/Dockerfile_test_env b/integration/dockerfiles/Dockerfile_test_env index b0f68c297..5083a8907 100644 --- a/integration/dockerfiles/Dockerfile_test_env +++ b/integration/dockerfiles/Dockerfile_test_env @@ -1,6 +1,7 @@ FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 ENV hey hey ENV PATH /usr/local +ENV testmultipleeq="this=is a=test string=with a=lot of=equals" ENV hey hello ENV first=foo second=foo2 ENV third $second:/third diff --git a/pkg/util/command_util.go b/pkg/util/command_util.go index 57ff0f0d9..545b374da 100644 --- a/pkg/util/command_util.go +++ b/pkg/util/command_util.go @@ -245,7 +245,7 @@ func UpdateConfigEnv(newEnvs []instructions.KeyValuePair, config *v1.Config, rep // First, convert config.Env array to []instruction.KeyValuePair var kvps []instructions.KeyValuePair for _, env := range config.Env { - entry := strings.Split(env, "=") + entry := strings.SplitN(env, "=", 2) kvps = append(kvps, instructions.KeyValuePair{ Key: entry[0], Value: entry[1],