How to append multi-lines to file in a dockerfile?
That should do the trick:
RUN echo $'first line \n\second line \n\third line' > /etc/nginx/nginx.conf
Basically it's wrapped in a $''
and uses \n\
for new lines.
That should do the trick:
RUN echo $'first line \n\second line \n\third line' > /etc/nginx/nginx.conf
Basically it's wrapped in a $''
and uses \n\
for new lines.