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
@owtaylor what is the benefit of using heredoc vs RUN cmd1 && cmd2 && cmdN? I agree that we need to support legitimate RUN options, but when it comes to heredoc I'm confused, does it serve a particular purpose in a Dockerfile or is it just a syntactic sugar?
RUN <<EOF mkdir -p /etc/foo cp -aR /src/foo /etc/foo EOF
gets turned into:
RUN . /cachi2/cachi2.env && <<EOF mkdir -p /etc/foo cp -aR /src/foo /etc/foo EOF
which is weirdly not a syntax error, but a no-op. The right transformation would be something like:
RUN . /cachi2/cachi2.env && /bin/sh <<EOF mkdir -p /etc/foo cp -aR /src/foo /etc/foo EOF
Once you consider
RUN --mount=type=bin,src=/a,dest=/b <<EOF
wedging this into the current code gets a little tricky.The text was updated successfully, but these errors were encountered: