Skip to content

Instantly share code, notes, and snippets.

@peterj
Last active April 4, 2020 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save peterj/286b537f7948c0762220d7a8c60821d1 to your computer and use it in GitHub Desktop.
Save peterj/286b537f7948c0762220d7a8c60821d1 to your computer and use it in GitHub Desktop.
React app Dockerfile
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", "."]
@bke-daniel
Copy link

Hey there,

when you start a project from the scratch, like on your blog post, it fails with error Command "build" not found.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment