fix(docker-file): pump version dockerfile

This commit is contained in:
Thomas-xDo 2025-06-13 13:53:37 +07:00
parent ec047dbcfb
commit 4081d31a49

View file

@ -1,7 +1,7 @@
# Install dependencies only when needed
FROM node:22-alpine3.21 AS deps
FROM node:20-alpine3.17 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
RUN apk add --no-cache libc6-compat openssl
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:22-alpine3.21 AS builder
FROM node:20-alpine3.17 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
@ -26,7 +26,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build-docker
# Production image, copy all the files and run next
FROM node:22-alpine3.21 AS runner
FROM node:20-alpine3.17 AS runner
WORKDIR /app
ENV NODE_ENV production
@ -37,7 +37,7 @@ RUN adduser --system --uid 1001 nextjs
RUN set -x \
&& apk add --no-cache curl openssl1.1-compat \
&& apk add --no-cache curl openssl \
&& yarn add npm-run-all dotenv semver prisma@5.17.0
# You only need to copy next.config.js if you are NOT using the default configuration