Set the SHELL option -o pipefail before a RUN instruction containing a pipe. Without pipefail, errors in piped commands might be masked. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check.
pipefail flag per stage, resetting it on each FROM instruction.SHELL instruction is encountered:pwsh, powershell, or cmd, set pipefail to true (no requirement).pipefail to true only if the shell name is one of /bin/bash, /bin/zsh, /bin/ash, bash, zsh, or ash and the instruction includes -o pipefail; otherwise set it to false.RUN instruction:pipefail is false and the command contains a | character, emit DL4006.RUN with the message Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check.(c) 2025 Asymmetric Effort, LLC. scaldwell@asymmetric-effort.com
