Pin Node.js base image to specific digest

This commit is contained in:
2025-04-04 23:25:30 +02:00
parent 1cc3f4857f
commit 5f492e2e63

View File

@@ -1,5 +1,5 @@
# Use lightweight Node.js 20 base image
FROM node:20-alpine as builder
FROM node:20-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 as builder
# Set working directory
WORKDIR /app
@@ -17,7 +17,7 @@ COPY . .
RUN npm run build
# Use a minimal base image for running the app
FROM node:20-alpine
FROM node:20-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944
WORKDIR /app