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
When a RUN block contains a pipeline, not having set pipefail results in:
/ER0001/ Set the SHELL option -o(-eo for Alpine image) pipefail before RUN with a pipe in
... whilst having set pipefail (correctly) by default gives:
/SC2039/ In POSIX sh, set option pipefail is undefined.
I'm not sure of a good solution to this since docker/podman/buildah use the container's sh rather than a bundled standardised version - the -s option can be set on the command-line, but is there a directive which sets this and can be used inline in a file.
Also, using set -o pipefail at the top of a block containing a pipeline doesn't quell the warning when the pipeline (for which pipefail is now active) is encountered - in fact, all of these generate ER0001:
RUN set -o pipefail ; \
... \
cmd1 | cmd2
RUN set -o pipefail && \
... \
cmd1 | cmd2
RUN ... \
set -o pipefail ; cmd1 | cmd2
RUN ... \
set -o pipefail && cmd1 | cmd2
... so I'm unsure as to what syntax can be used to avoid triggering this error.
The text was updated successfully, but these errors were encountered:
When a
RUN
block contains a pipeline, not having setpipefail
results in:... whilst having set
pipefail
(correctly) by default gives:I'm not sure of a good solution to this since docker/podman/buildah use the container's
sh
rather than a bundled standardised version - the-s
option can be set on the command-line, but is there a directive which sets this and can be used inline in a file.Also, using
set -o pipefail
at the top of a block containing a pipeline doesn't quell the warning when the pipeline (for whichpipefail
is now active) is encountered - in fact, all of these generateER0001
:... so I'm unsure as to what syntax can be used to avoid triggering this error.
The text was updated successfully, but these errors were encountered: