1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add -p when running the container

Without it, docker was not mapping/exposing the private port

Docker version 0.6.5, build 3ff8459
This commit is contained in:
Marc Kuo 2013-11-05 20:48:16 -08:00
parent 6113e1d62d
commit 3108f0526e

View file

@ -176,11 +176,11 @@ Run the image
+++++++++++++
Running your image with ``-d`` runs the container in detached mode, leaving the
container running in the background. Run the image you previously built:
container running in the background. The ``-p`` flag redirects a public port to a private port in the container. Run the image you previously built:
.. code-block:: bash
sudo docker run -d <your username>/centos-node-hello
sudo docker run -p 49160:8080 -d <your username>/centos-node-hello
Print the output of your app: