Dockerfile build – possible to ignore error?

Sure. Docker is just responding to the error codes returned by the RUN shell scripts in the Dockerfile. If your Dockerfile has something like:

RUN make

You could replace that with:

RUN make; exit 0

This will always return a 0 (success) exit code. The disadvantage here is that your image will appear to build successfully even if there are actual errors in the build process.

Leave a Comment