Files
Checkmate/client/Dockerfile
T

22 lines
484 B
Docker
Raw Normal View History

2025-11-13 13:47:26 -08:00
# Build
FROM node:20-slim AS build
ENV NODE_OPTIONS="--max-old-space-size=4096"
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
2025-11-21 21:00:36 +00:00
# Run stage
2025-11-13 13:47:26 -08:00
FROM nginx:1.27.1-alpine
2025-11-21 21:00:36 +00:00
# Environment variables
COPY --from=build /app/env.sh /docker-entrypoint.d/env.sh
RUN chmod +x /docker-entrypoint.d/env.sh
# Serve
2025-11-13 13:47:26 -08:00
COPY ./nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]