Skip to content

build: Fix quoting and environment variable duplication

Instead of always appending the image config environment variables,
search for an existing entry by name and replace the value. This
avoiding creating duplicate entries. Note this may not change the
effective environment at runtime as posterior environment variables
would likely override anterior ones, but it's more efficient and
congruent with how the dockerfile frontend is implemented upstream.

Additionally, to match how the dockerfile frontend is implemented, don't
quote the values of environment variable entries. Since environment
variables can't have quotes or an equal sign in the name, quoting is
superfluous.

Merge request reports