Created
August 8, 2018 21:34
-
-
Save pbabbott/5a3b867da50dd5c1fc680fb6c968d233 to your computer and use it in GitHub Desktop.
Example dockerfile for a node app
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 node:9 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package.json ./ | |
COPY yarn.lock ./ | |
RUN yarn install | |
# Bundle app source | |
COPY . . | |
EXPOSE 3000 | |
CMD [ "npm", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment