Tighten Docker build and dependency audit

This commit is contained in:
Cauê Faleiros
2026-05-29 15:45:51 -03:00
parent 114867bcb5
commit 40c7807a65
4 changed files with 46 additions and 41 deletions

View File

@@ -3,8 +3,8 @@ FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json ./
RUN npm install
COPY package.json package-lock.json ./
RUN npm ci --no-audit
COPY . .
@@ -21,7 +21,7 @@ ENV NODE_ENV=production
COPY backend/package.json backend/package-lock.json ./
# Install dependencies
RUN npm ci --omit=dev
RUN npm ci --omit=dev --no-audit
# Copy backend source directly into root
COPY backend/index.js ./index.js