Created
September 23, 2019 11:58
-
-
Save RamyaIyer96/4cb1c6a598f624b410978d8948e72b39 to your computer and use it in GitHub Desktop.
Docker file to generate Reactjs build container and image.
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 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", "3000", "-s", "."] | |
EXPOSE 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment