1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
FROM alpine
ENV a=b
ENV c=d
# E and G are passed in on the command-line, and we haven't overridden them yet, so the command will get the CLI values.
RUN echo a=$a c=$c E=$E G=$G
ENV E=E G=G
# We just set E and G, and that will override values passed at the command line thanks to imagebuilder's handling of ENV instructions.
RUN echo a=$a c=$c E=$E G=$G
FROM 0
ENV w=x
ENV y=z
# I and K are passed in on the command-line, and we haven't overridden them yet, so the command will get the CLI values.
RUN echo w=$w y=$y I=$I K=$K
ENV I=I K=K
# We just set I and K, and that will override values passed at the command line thanks to imagebuilder's handling of ENV instructions.
RUN echo w=$w y=$y I=$I K=$K
|