Files
ctms/nginx/Dockerfile
T
Cheng Zhou d5279b124f
Storage Persistence Guard / storage-persistence-audit (push) Has been cancelled
Client Quality Gates / Shared client and Web (push) Has been cancelled
Client Quality Gates / macOS Desktop (push) Has been cancelled
Client Quality Gates / Shared client and Web (pull_request) Has been cancelled
Client Quality Gates / macOS Desktop (pull_request) Has been cancelled
Storage Persistence Guard / storage-persistence-audit (pull_request) Has been cancelled
release(main): 同步 dev 最新候选改动
2026-07-16 17:15:50 +08:00

29 lines
767 B
Docker

FROM node:22.13-alpine AS frontend-build
WORKDIR /app
ARG NPM_CONFIG_REGISTRY=https://registry.npmjs.org/
ARG VITE_RUNTIME_ENV=production
ARG VITE_ALLOW_INSECURE_DEV_LOGIN=false
ENV NPM_CONFIG_REGISTRY=$NPM_CONFIG_REGISTRY
ENV VITE_RUNTIME_ENV=$VITE_RUNTIME_ENV
ENV VITE_ALLOW_INSECURE_DEV_LOGIN=$VITE_ALLOW_INSECURE_DEV_LOGIN
COPY frontend/package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci \
--prefer-offline \
--no-audit \
--fetch-retries=5 \
--fetch-retry-mintimeout=20000 \
--fetch-retry-maxtimeout=120000 \
--replace-registry-host=npmjs
COPY frontend/ ./
RUN npm run build
FROM nginx:1.27-alpine
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=frontend-build /app/dist /usr/share/nginx/html