Skip to content

Instantly share code, notes, and snippets.

@samuelteixeiras
Created March 23, 2022 23:58
Show Gist options
  • Save samuelteixeiras/6fa5a5546d260e2e15c96edcf3604c27 to your computer and use it in GitHub Desktop.
Save samuelteixeiras/6fa5a5546d260e2e15c96edcf3604c27 to your computer and use it in GitHub Desktop.
Dockerfile
FROM node:8
# 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 install --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment