title: Jenkins hangs when I try to run a container.inside() method
body: <p>I've set up a pipeline, it's sole purpose is to build an image and then execute a simple command inside it. </p>
  
  <p>I'm able to build the container, however, I'm not able to execute any commands inside of it. When I execute a 'sh' step, it just hangs indefinitely.</p>
  
  <p>If I run a <code>container.run()</code> method or a <code>container.withRun</code>, the step executes but not actually inside the container.</p>
  
  <p>Obviously, I'm doing something wrong here - could anybody advise the correct way to do this? I just want to be able to execute steps inside of the container, or alternatively - execute a command inside the container and then read the results of that operation back into Jenkins.</p>
  
  <pre><code>node {
      String baseName = "salimfadhley/python_hello_world_server"
      String buildTag = "${baseName}:${env.BUILD_ID}".toString()
      def customImage
  
      stage('Build') {
          checkout scm
          customImage = docker.build(buildTag)
      }
  
      stage('Test') {
          customImage.inside('--entrypoint=/bin/bash') {
              sh "pwd"
          }
      }
  
  }
  </code></pre>
  
  <p>The Jenkins log output ends like this:</p>
  
  <pre><code>[Pipeline] withDockerContainer
  Jenkins seems to be running inside container ded46c77c61f36b31ea0cd8a067b20ebf97c71daa36c9c18a0c83d784f5791c5
  $ docker run -t -d -u 0:0 --entrypoint=/bin/bash -w /var/jenkins_home/jobs/python-hello-world-server/branches/master/workspace --volumes-from ded46c77c61f36b31ea0cd8a067b20ebf97c71daa36c9c18a0c83d784f5791c5 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** salimfadhley/python_hello_world_server:88 cat
  $ docker top f5cd987963e5ea7c89cd70ddc6b2025d2bdab0ae1705c0b7a560fadc9aba0728 -eo pid,comm
  ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
  Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
  [Pipeline] {
  [Pipeline] echo
  Hello Inside!
  [Pipeline] sh
  process apparently never started in /var/jenkins_home/jobs/python-hello-world-server/branches/master/workspace@tmp/durable-50fcbb38
  [Pipeline] }
  $ docker stop --time=1 f5cd987963e5ea7c89cd70ddc6b2025d2bdab0ae1705c0b7a560fadc9aba0728
  $ docker rm -f f5cd987963e5ea7c89cd70ddc6b2025d2bdab0ae1705c0b7a560fadc9aba0728
  [Pipeline] // withDockerContainer
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: script returned exit code -2
  Finished: FAILURE
  </code></pre>
  
  <p>The Dockerfile looks like this:</p>
  
  <pre><code>FROM salimfadhley/testpython:latest
  COPY . /project
  COPY src /src
  RUN python -m pip install --upgrade pip setuptools
  RUN python -m pip install -e /project/src
  WORKDIR /project
  #ENTRYPOINT ["/bin/bash"]
  ENTRYPOINT ["uvicorn", "--port=80", "--host=0.0.0.0", "helloworld.main:app"]
  EXPOSE 8080
  </code></pre>
  
  <p>So, to summarize: Can I fix this pipeline so that it actually allows me to run processes inside the container?</p>