Skip to content

Instantly share code, notes, and snippets.

@x86nick
Forked from abn/heredoc-dockerfile.snip
Created September 7, 2018 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x86nick/82c19fbc34666ea852c675353c961931 to your computer and use it in GitHub Desktop.
Save x86nick/82c19fbc34666ea852c675353c961931 to your computer and use it in GitHub Desktop.
Dockerfile alternatives for heredoc
#printf
RUN printf '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
#echo
RUN echo -e '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment