When I run docker build . when my docker file is
FROM node:8
RUN echo -e '{
"a" : "b"
}'
I get
Error response from daemon: Dockerfile parse error line 3: unknown instruction: "A":
Is there a way to do this multiline? I have 10 variable json file I want to enter manually like this, to override some variables.
I have also tried echo -e and printf
You can use \n\ this will keep the file in structure as well, as sometime new line is required in some config file while with \ this it will print in a single line.
FROM node:8
RUN echo '{ \n\
"a" : "b", \n\
"c" : "d", \n\
"e" : "f" \n\
}'

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With