From 3499b6056ae181e2545d28c238a793a21611c0eb Mon Sep 17 00:00:00 2001 From: "kritik.b" Date: Thu, 16 Apr 2026 16:29:10 +0530 Subject: [PATCH] fix(docker): switch to Alpine base images for smaller footprint - Update Dockerfile to use Alpine-based Node.js images for both builder and runtime stages, reducing image size and improving performance. - Replace apt-get commands with apk for package installation in the runtime stage. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a160601f..77468f643 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM ARG TARGETPLATFORM -FROM --platform=$BUILDPLATFORM node:20-bookworm-slim AS builder +FROM --platform=$BUILDPLATFORM node:20-alpine AS builder WORKDIR /app @@ -18,9 +18,9 @@ RUN npm ci --prefix gitnexus-web COPY gitnexus-web ./gitnexus-web RUN npm run build --prefix gitnexus-web -FROM node:20-bookworm-slim AS runtime +FROM node:20-alpine AS runtime -RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache curl WORKDIR /app