Inspectopedia Help

Missing continuation character for ''RUN'' command

Reports missing continuation characters in RUN command.

In the shell form of RUN command you should use a '\' (backslash) to continue a single RUN instruction onto the next line. Otherwise, Docker build will fail.


# the command below will fail RUN /bin/bash -c 'source $HOME/.bashrc; echo $HOME'
RUN /bin/bash -c 'source $HOME/.bashrc; \ echo $HOME'
Last modified: 12 March 2024