Skip to content

Instantly share code, notes, and snippets.

@chanakaudaya
Created December 19, 2020 03:26
Show Gist options
  • Save chanakaudaya/8973f128471f5db471e8545dde8b8901 to your computer and use it in GitHub Desktop.
Save chanakaudaya/8973f128471f5db471e8545dde8b8901 to your computer and use it in GitHub Desktop.
Dockerfile with multi-stage builds for reactJS
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