The first port(9000) : the Docker host (you can use this port to access to your container) to access to the container from the outside. the second port(8080) : is the port used by your application. Example : I want to run tomcat server in a docker container, the default port of tomcat is 8080 and I want to expose my docker on port 9000 so I have to write : docker run -p 9000:8080 --name myTomcat..