Dockerfile build – possible to ignore error?

I’ve got a Dockerfile. When building the image, the build fails on this error:

automake: error: no '' found for any configure output
Error build: The command [/bin/sh -c aclocal && autoconf && automake -a] returned a non-zero code: 1

which in reality is harmless. The library builds fine, but Docker stops the build once it receives this error. Is there any way I can instruct Docker to just ignore this?

  • Is there a way to remove a name from a Docker container?
  • Openshift node fails to start
  • Docker public registry push fails: Repository does not exist
  • Docker container memory usage
  • How to email from WordPress in Docker container?
  • Docker doesn't save data in host mounted volume
  • How to install features in WSO2 using a shell script
  • Cant produce-to OR consume-from kafka broker running inside a container
  • How to properly set up dockerized django app with SSL handling using self-signed certificate and mod_wsgi-express?
  • write in shared volumes docker
  • Changing the localhost Docker listens on
  • “Installing Docker: FAILED” Error on setup with Meteor-Up and Debian 7 wheezy
  • 2 Solutions collect form web for “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.

    This might be of interest to those, whose potential errors in their images are not harmless enough to go unnoticed/logged. (Also, not enough rep. to comment, so here as an answer.)

    As pointed out, the disadvantage of RUN make; exit 0 is you don’t get to know, if your build failed. Hence, rather use something like:

    make test 2>&1 > /where/ever/make.log || echo "There were failing tests!"

    Like this, you get notified via the docker image build process log, and you can see what exactly went bad during make (or whatsoever else execution, this is not restricted to make).

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.