Created
July 10, 2018 13:22
-
-
Save mousetree/d55ba7ee566d6bd6214a5c4b05b1f172 to your computer and use it in GitHub Desktop.
Node.js Dockerfile (Basic)
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
FROM node:10 | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied | |
# where available (npm@5+) | |
COPY package*.json ./ | |
# At this point we just have the package.json files | |
RUN npm install | |
# Bundle app source | |
COPY . . | |
# Run any other build steps such as `npm run build` | |
EXPOSE 3000 | |
CMD [ "npm", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment