fix(security): complete security and delivery compliance remediation

This commit is contained in:
2026-07-28 17:56:28 +08:00
parent 5b07ec6df0
commit 81ab82e9ba
32 changed files with 798 additions and 94 deletions
+7 -3
View File
@@ -1,10 +1,14 @@
# Stage 1: Build
FROM node:18-alpine AS build
ARG NODE_BASE_IMAGE=node:20-alpine
ARG NGINX_BASE_IMAGE=nginx:alpine
FROM ${NODE_BASE_IMAGE} AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
ARG NPM_CONFIG_REGISTRY
RUN if [ -n "$NPM_CONFIG_REGISTRY" ]; then npm config set registry "$NPM_CONFIG_REGISTRY"; fi \
&& npm ci
COPY . .
@@ -12,7 +16,7 @@ COPY . .
RUN npm run build
# Stage 2: Serve with nginx
FROM nginx:alpine AS serve
FROM ${NGINX_BASE_IMAGE} AS serve
# Remove default nginx config
RUN rm /etc/nginx/conf.d/default.conf