Skip to content

Instantly share code, notes, and snippets.

@mmaz
Forked from abn/heredoc-dockerfile.snip
Last active August 29, 2015 14:23

Revisions

  1. Mark Mazumder renamed this gist Jun 16, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Mark Mazumder revised this gist Jun 15, 2015. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions heredoc-dockerfile.snip
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,11 @@
    #printf
    RUN printf '#!/bin/bash\n\
    echo hello world from line 1\n\
    echo hello world from line 2'\
    >> /tmp/hello
    echo hello world from line 2\n'\
    > /tmp/hello
    ## or you can use >>

    RUN cat /tmp/hello

    #echo
    RUN echo -e '#!/bin/bash\n\
  3. @abn abn revised this gist Oct 9, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions heredoc-dockerfile.snip
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    #printf
    RUN printf '#!/bin/bash\n \
    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 \
    RUN echo -e '#!/bin/bash\n\
    echo hello world from line 1\n\
    echo hello world from line 2'\
    >> /tmp/hello
  4. @abn abn revised this gist Oct 9, 2014. 1 changed file with 10 additions and 3 deletions.
    13 changes: 10 additions & 3 deletions heredoc-dockerfile.snip
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,11 @@
    RUN printf '#!/bin/bash\
    \necho hello world from line 1\
    \necho hello world from line 2'\
    #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
  5. @abn abn created this gist Oct 8, 2014.
    4 changes: 4 additions & 0 deletions heredoc-dockerfile.snip
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    RUN printf '#!/bin/bash\
    \necho hello world from line 1\
    \necho hello world from line 2'\
    >> /tmp/hello