You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(all credit for this goes out to @serious-angel / Lore in the #docker channel on Libera.Chat, who discovered this bug and was ready to file an issue before I stole their thunder! 🙇 ❤️ 🙈)
The basic gist is that specifying an ARG more than once appropriately overwrites the previous value, but the "history" entries in the resulting image end up with one copy of the value for every "reset".
FROM busybox
ARG foo=bar
RUN echo $foo # prints "bar"ARG foo=baz
RUN echo $foo # prints "baz"ARG foo=
RUN echo $foo # prints the empty string
I made a builder named master from a build against commit c9a17ff (current master branch tip), and verified it's still an issue there:
(all credit for this goes out to @serious-angel /
Lore
in the#docker
channel on Libera.Chat, who discovered this bug and was ready to file an issue before I stole their thunder! 🙇 ❤️ 🙈)The basic gist is that specifying an
ARG
more than once appropriately overwrites the previous value, but the "history" entries in the resulting image end up with one copy of the value for every "reset".I made a builder named
master
from a build against commit c9a17ff (currentmaster
branch tip), and verified it's still an issue there:And then what I got:
(note
RUN |3 foo= foo= foo=
,RUN |2 foo=baz foo=baz
,RUN |1 foo=bar
)Vs what I expected (output simulated by hand, please forgive errors 😂):
And the diff, to be extra clear:
The text was updated successfully, but these errors were encountered: