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 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..c18bfeb 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`: @@ -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