Created
November 10, 2020 13:49
-
-
Save cassanellicarlo/8922c87d01c26325b1e51dd2d7d7dbd1 to your computer and use it in GitHub Desktop.
Node.js Dockerfile
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:slim | |
# 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 ./ | |
RUN npm install | |
# If you are building your code for production | |
# RUN npm ci --only=production | |
# Bundle app source | |
COPY . . | |
EXPOSE 8080 | |
CMD [ "node", "server.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment