From 551f824416e6fb51f2c7f6ebe0ce3f390b3b1ca0 Mon Sep 17 00:00:00 2001 From: Thomas-xDo Date: Fri, 13 Jun 2025 13:08:38 +0700 Subject: [PATCH] fix(docker-file): pump version dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2142fec3d..ce8a5e156 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Install dependencies only when needed -FROM node:18-alpine AS deps +FROM node:22-alpine3.21 AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat git openssl1.1 +RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json yarn.lock ./ # Add yarn timeout to handle slow CPU when Github Actions @@ -9,7 +9,7 @@ RUN yarn config set network-timeout 300000 RUN yarn install --frozen-lockfile # Rebuild the source code only when needed -FROM node:18-alpine AS builder +FROM node:22-alpine3.21 AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -26,13 +26,12 @@ ENV NEXT_TELEMETRY_DISABLED 1 RUN yarn build-docker # Production image, copy all the files and run next -FROM node:18-alpine AS runner +FROM node:22-alpine3.21 AS runner WORKDIR /app ENV NODE_ENV production ENV NEXT_TELEMETRY_DISABLED 1 -RUN apk add --no-cache openssl1.1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs