Merge pull request #2567 from mck-/patch-1
Add -p when running the container (node example) Upstream-commit: 38f1838e821822037f334dc4aee1da9a3c76c53c Component: engine
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user