From 3108f0526ef25596c7f6f545b07c95d90e966a7d Mon Sep 17 00:00:00 2001 From: Marc Kuo Date: Tue, 5 Nov 2013 20:48:16 -0800 Subject: [PATCH] Add -p when running the container Without it, docker was not mapping/exposing the private port Docker version 0.6.5, build 3ff8459 --- docs/sources/examples/nodejs_web_app.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/examples/nodejs_web_app.rst b/docs/sources/examples/nodejs_web_app.rst index 19b10f6cbb..68c073da7b 100644 --- a/docs/sources/examples/nodejs_web_app.rst +++ b/docs/sources/examples/nodejs_web_app.rst @@ -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 /centos-node-hello + sudo docker run -p 49160:8080 -d /centos-node-hello Print the output of your app: