Created
June 19, 2015 17:50
-
-
Save Tmeister/42ed9a8d08ad9fed9e21 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
FROM dockerfile/nodejs | |
MAINTAINER Enrique Chavez <[email protected]> | |
# use changes to package.json to force Docker not to use the cache | |
# when we change our application's nodejs dependencies: | |
ADD package.json /tmp/package.json | |
RUN cd /tmp && npm install | |
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/ | |
# From here we load our application's code in, therefore the previous docker | |
# "layer" thats been cached will be used if possible | |
WORKDIR /opt/app | |
ADD . /opt/app | |
EXPOSE 8080 | |
CMD ["npm", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment