Notes/Dockerfile

15 lines
317 B
Text
Raw Normal View History

2024-10-17 18:53:49 +08:00
FROM node:18-alpine as build
WORKDIR /usr/local/app
COPY ./ /usr/local/app/
RUN npm install
2024-10-17 19:01:21 +08:00
RUN npm run build
2024-10-17 18:53:49 +08:00
FROM nginx:latest
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /usr/local/app/build/ /usr/share/nginx/html
2024-10-17 18:53:49 +08:00
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
RUN service nginx restart
EXPOSE 80