Skip to content

Instantly share code, notes, and snippets.

@StanGirard
Last active March 5, 2022 10:58
Show Gist options
  • Save StanGirard/94c557d04e74220e33c996f8ab600a7b to your computer and use it in GitHub Desktop.
Save StanGirard/94c557d04e74220e33c996f8ab600a7b to your computer and use it in GitHub Desktop.
Example Dockerfile Multi Stage
# Dockerfile
# Pulls the official image
FROM node:13.12.0-alpine
# Sets the working dir
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# Install all the dependencies
COPY package.json ./
RUN npm install --silent
# Add the App Code
COPY . ./
# Script that starts the app
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment