Skip to content

Instantly share code, notes, and snippets.

@manzari
Last active November 16, 2022 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manzari/ee47a98e1a30edf2aa6d5b066f34a959 to your computer and use it in GitHub Desktop.
Save manzari/ee47a98e1a30edf2aa6d5b066f34a959 to your computer and use it in GitHub Desktop.
Dockerfile for two staged build of an react app
# Build
FROM node:alpine
WORKDIR /myReactApp
COPY package.json ./
RUN npm install
COPY . ./
RUN npm run-script build
# Serve
FROM nginx:alpine
COPY --from=0 /myReactApp/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
@irfanaslam-me
Copy link

404 when we use manual url and face a lot of error using nginx

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