fix(security): complete security and delivery compliance remediation
This commit is contained in:
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user