title: Stop/fail docker build if tests fail
body: <p>My aim is to force the docker build to fail if the Unittests have not all passed. I'm using the following line in my DockerFile:</p>
  
  <p><code>RUN python3 -m unittest discover test</code></p>
  
  <p>My unit tests are in classes in the test directory. The tests are run, but a failed test does not result in a failed build. </p>
  
  <p>I know that a non-zero exit code is how to stop a build, but that does not seem to occur using this command.</p>