SHELL

The Dockerfile instruction that changes which shell runs the shell form of later RUN, CMD and ENTRYPOINT instructions.

In more detail

The default on Linux is ["/bin/sh", "-c"]. A common use is SHELL ["/bin/bash", "-o", "pipefail", "-c"] so a failure in the middle of a pipe fails the build instead of being hidden.

Example

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Related terms

Taught in

References