Skip to content

Instantly share code, notes, and snippets.

@mhobesong
Forked from peterj/Dockerfile
Last active April 4, 2020 22:25
Show Gist options
  • Save mhobesong/20166f1f51a19ee618390d2299e14ca9 to your computer and use it in GitHub Desktop.
Save mhobesong/20166f1f51a19ee618390d2299e14ca9 to your computer and use it in GitHub Desktop.
React app Dockerfile
FROM mhart/alpine-node:11 AS builder
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn run build
FROM mhart/alpine-node
RUN yarn global add serve
WORKDIR /app
COPY --from=builder /app/build .
CMD ["serve", "-p", "80", "-s", "."]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment