Skip to content

Instantly share code, notes, and snippets.

@harrylowkey
Last active July 3, 2023 03:00
Show Gist options
  • Save harrylowkey/f9190284a96be3eeee9350428329238f to your computer and use it in GitHub Desktop.
Save harrylowkey/f9190284a96be3eeee9350428329238f to your computer and use it in GitHub Desktop.
Dockerfile for Web
FROM node:18-alpine AS Build
WORKDIR /user/src/app
COPY ./ ./client
RUN cd client && npm install && npm run build --prod
FROM nginx:latest AS Production
COPY --from=Build /user/src/app/client/dist/client /user/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment