title: docker runs image on wrong port
body: <p>I have a spring boot application and I created dockerfile like this one :</p>
  
  <pre><code>FROM java:8
  EXPOSE 80
  ADD /target/test-server.jar test-server.jar
  ENTRYPOINT ["java","-jar","test-server.jar"]
  </code></pre>
  
  <p>Next I follow these steps :</p>
  
  <ol>
  <li><p><code>docker build -t test-server .</code></p></li>
  <li><p><code>docker run -p 8888:80 -t test-server</code></p></li>
  </ol>
  
  <p>and it works but on port 8080 , which is default to tomcat. I want it to run on 8888</p>
  
  <p>Results from docker ps</p>
  
  <pre><code>3debfb5a9084        test-server       "java -jar test-ser"   About a minute ago   Up About a minute   0.0.0.0:8888-&gt;80/tcp   thirsty_euclid
  </code></pre>
  
  <p>Btw, why it shows test-ser rather than test-server ?</p>
  
  <p>Generally, I want to be able to run this server on few different ports</p>
  
  <p>Result from command </p>
  
  <pre><code>nmap -A -p8080,8888 localhost
  </code></pre>
  
  <p>is</p>
  
  <pre><code>Starting Nmap 7.12 ( https://nmap.org ) at 2016-12-05 20:49 CET
  Nmap scan report for localhost (127.0.0.1)
  Host is up (0.000059s latency).
  PORT     STATE  SERVICE    VERSION
  8080/tcp closed http-proxy
  8888/tcp open   tcpwrapped
  
  Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
  Nmap done: 1 IP address (1 host up) scanned in 5.45 seconds
  </code></pre>