Last active
April 4, 2020 21:47
-
-
Save peterj/286b537f7948c0762220d7a8c60821d1 to your computer and use it in GitHub Desktop.
React app Dockerfile
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 mhart/alpine-node:11 AS builder | |
WORKDIR /app | |
COPY . . | |
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
Hey there,
when you start a project from the scratch, like on your blog post, it fails with
error Command "build" not found.
Cheers