Created
October 14, 2020 07:18
-
-
Save StanGirard/ee0abc99b0872ba96d12a5752ec1efb9 to your computer and use it in GitHub Desktop.
docker multi staging example
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
# 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 babel-polyfill # Necessary dependency for production build | |
RUN npm install --silent --only=prod # Only production dependencies | |
# Add the App Code | |
COPY . ./ | |
# Script that starts the app | |
RUN npm run build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment