Last active
March 5, 2022 10:58
-
-
Save StanGirard/94c557d04e74220e33c996f8ab600a7b to your computer and use it in GitHub Desktop.
Example Dockerfile Multi Stage
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
# 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