Last active
August 29, 2015 14:07
-
-
Save caike/71838e541a072f5f9b24 to your computer and use it in GitHub Desktop.
This Dockerfile pulls application files from a URL, using the `ADD` method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DOCKER-VERSION 1.2.0 | |
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 | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/app.js /tmp/app.js | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/package.json /tmp/package.json | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/npm-shrinkwrap.json /tmp/npm-shrinkwrap.json | |
RUN cd /tmp && npm install | |
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app | |
WORKDIR /opt/app | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/app.js /opt/app/app.js | |
EXPOSE 8080 | |
CMD ["node", "app.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment