Files
Checkmate/Docker/dist/client.Dockerfile
T

21 lines
424 B
Docker
Raw Normal View History

2024-10-01 15:52:46 +08:00
FROM node:20-alpine AS build
2024-09-30 12:24:53 +08:00
WORKDIR /app
2024-10-01 15:52:46 +08:00
COPY ../../Client/package*.json ./
2024-09-30 12:24:53 +08:00
RUN npm install
2024-10-01 15:52:46 +08:00
COPY ../../Client .
2024-09-30 12:24:53 +08:00
RUN npm run build
FROM nginx:1.27.1-alpine
2024-10-01 15:52:46 +08:00
COPY ./Docker/dist/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
2024-09-30 12:24:53 +08:00
COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=build /app/env.sh /docker-entrypoint.d/env.sh
RUN chmod +x /docker-entrypoint.d/env.sh
2024-09-30 12:24:53 +08:00
CMD ["nginx", "-g", "daemon off;"]