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
It's okay to put quotes around the individual keys and values of a key-value pair in ARG, ENV, and LABEL. They should of course be stripped out from the actual value.
FROM alpine
ARG"aaa"="bbb"ENV"ccc"="ddd"LABEL"eee"="fff"RUN echo $aaa
RUN echo $ccc
$ docker build .
Sending build context to Docker daemon 1.693MB
Step 1/6 : FROM alpine
---> 3fd9065eaf02
Step 2/6 : ARG "aaa"="bbb"
---> Running in 20b77196bad8
Removing intermediate container 20b77196bad8
---> 9e77ad80e9ed
Step 3/6 : ENV "ccc"="ddd"
---> Running in e2568271365b
Removing intermediate container e2568271365b
---> e19436f8431a
Step 4/6 : LABEL "eee"="fff"
---> Running in a0ee3aa9549e
Removing intermediate container a0ee3aa9549e
---> 71cf3db4566e
Step 5/6 : RUN echo $aaa
---> Running in 6bb97ff8336b
bbb
Removing intermediate container 6bb97ff8336b
---> 1c08388d111c
Step 6/6 : RUN echo $ccc
---> Running in 656632f6b97f
ddd
Removing intermediate container 656632f6b97f
---> a351391c8188
Successfully built a351391c8188
However, the quotes seem to be confusing the parser and it's causing the value to not be calculated correctly. The name is also not being stripped of the quotes.
It's okay to put quotes around the individual keys and values of a key-value pair in
ARG
,ENV
, andLABEL
. They should of course be stripped out from the actual value.However, the quotes seem to be confusing the parser and it's causing the value to not be calculated correctly. The name is also not being stripped of the quotes.
The text was updated successfully, but these errors were encountered: