title: Docker build: returned a non-zero code: 1, when test is failed
body: <p>When I run Docker build with my  project Docker+Selenium+Pytest in Jenkins CI with tests that end with the SUСCESS status - the build is pushed and the results are published to reports, and if at least one test fails - the build fails and the results are not published</p>
  <p>Build Error: <code>The command 'pytest test_page.py -s -v --alluredir=reports/allure-results' returned a non-zero code: 1</code></p>
  <p>Maybe my instructions for Docker are incorrectly configured.
  My DockerFile</p>
  <pre><code>FROM python:latest  as python3
  FROM selenium/standalone-chrome
  USER root
  WORKDIR /my-projest
  ADD . /my-projest
  RUN pip3 install --no-cache-dir --user -r requirements.txt
  RUN sudo pip3 install pytest
  RUN [&quot;pytest&quot;, &quot;test_page.py&quot;, &quot;-s&quot;, &quot;-v&quot;, &quot;--alluredir=reports/allure-results&quot;]
  </code></pre>
  <p>and SHELL Command</p>
  <pre><code>echo &quot;Build docker image and run container&quot;
  docker build -t $IMAGE_NAME .
  docker run -d --name $CONTAINER_NAME $IMAGE_NAME
  
  echo &quot;Copy allure-results into Jenkins container&quot;
  rm -rf reports; mkdir reports;
  
  docker cp $CONTAINER_NAME:my-project/reports/allure-results reports
  </code></pre>