From 83b8537d9141d4a1baae1346b7f9c8359c073c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djibril=20Kon=C3=A9?= Date: Thu, 13 Mar 2014 11:57:56 +0100 Subject: [PATCH 1/3] Redirect port 8080 from container to host 49160 --- Makefile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a5f614e..d17ec63 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ run: node index.js run-container: - docker run -d gasi/centos-node-hello + docker run -p 49160:8080 -d gasi/centos-node-hello test: curl localhost diff --git a/README.md b/README.md index d7edb94..eaae83e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Node.js Hello World on CentOS using [docker][]. - Run app: make run-container - # docker run -d gasi/centos-node-hello + # docker run -p 49160:8080 -d gasi/centos-node-hello - Install `curl`: From bcc7da5b9a5cb4001055c2f97d1c26c0b77da3c9 Mon Sep 17 00:00:00 2001 From: alambike Date: Thu, 7 Aug 2014 04:50:59 +0200 Subject: [PATCH 2/3] Update Dockerfile - Corrected centos6 tag name - Added -q to yum install, to avoid https://github.com/docker/docker-py/issues/229 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cd525a..c29e149 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,12 @@ # 2. Checkout source: git@github.com:gasi/docker-node-hello.git # 3. Build container: docker build . -FROM centos:6.4 +FROM centos:centos6 # Enable EPEL for Node.js RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm # Install Node.js and npm -RUN yum install -y npm +RUN yum install -y -q npm # App ADD . /src From 534450e715286e7088c546670cfc7360e8208e0c Mon Sep 17 00:00:00 2001 From: Yongzhi Pan Date: Mon, 19 Jan 2015 15:38:50 +0800 Subject: [PATCH 3/3] Add usage of port mapping for Boot2docker. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index eaae83e..c18bfeb 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,10 @@ Node.js Hello World on CentOS using [docker][]. # curl localhost:49163 It should print `Hello World` to the console. + + If you use Boot2Docker on OS X, the port is actually mapped to the Docker host VM, and you should use the following command: + + curl $(boot2docker ip): ## Acknowledgements