Created
December 19, 2020 03:26
-
-
Save chanakaudaya/8973f128471f5db471e8545dde8b8901 to your computer and use it in GitHub Desktop.
Dockerfile with multi-stage builds for reactJS
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:12 AS build | |
WORKDIR /app | |
COPY package* yarn.lock ./ | |
RUN yarn install | |
COPY public ./public | |
COPY src ./src | |
RUN yarn run build | |
FROM nginx:alpine | |
COPY --from=build /app/build /usr/share/nginx/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment