Created
June 28, 2019 10:44
-
-
Save aofleejay/8a6bef8470f2b08c90fa4c56cf60f5c7 to your computer and use it in GitHub Desktop.
Dockerfile for deploy React application from create-react-app using Docker multi-stage builds.
This file contains hidden or 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.4.0-alpine as build | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn | |
COPY src ./src | |
COPY public ./public | |
RUN yarn build | |
FROM nginx:1.17.0-alpine | |
COPY --from=build /usr/src/app/build /usr/share/nginx/html | |
EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment