title: Docker container accessible to localhost when container is runned manually but not when runned by a jenkinsfile
body: <p>im running a spring boot app on a container exposed on <strong>PORT:8084</strong> .
  the image is pushed to docker hub then i have this script on Jenkinsfile that runs the image on a container :</p>
  <pre><code>stage('Deploying the image into a container'){
          steps {
              echo &quot;Installing the app &quot;
              sh 'docker run $imagename:$BUILD_NUMBER -p 8084:8084 -d --name $dockerImage  '
          }
      }
  </code></pre>
  <p>the app is not accessible on 'localhost:8084' the container is up and when running <code>docker-ps</code> :</p>
  <pre><code>33f8cb4d98e6   28609002/time_sheet_dev_ops:38   &quot;java -jar time_shee…&quot;   29 minutes ago   Up 3 seconds   8084/tcp   focused_merkle
  </code></pre>
  <p>but when i run the image manually in my terminal , the app is accessible :</p>
  <pre><code>docker run -d -p 8084:8084 imagename
  </code></pre>
  <p>when running <code>docker ps</code> :</p>
  <pre><code>50715adaa50c   28609002/time_sheet_dev_ops:latest   &quot;java -jar time_shee…&quot;   8 seconds ago   Up 7 seconds   0.0.0.0:8084-&gt;8084/tcp, :::8084-&gt;8084/tcp   distracted_shamir
  </code></pre>
  <p>the only difference is in port output, i tried adding <code>-b 0.0.0.0</code> to the run command , also tried accessing the app via '127.0.0.1:8084' and many other solutions yet nothing seems to make it work whithin the CI/CD pipeline</p>