Skip to content

Commit

Permalink
chore: update image
Browse files Browse the repository at this point in the history
  • Loading branch information
dujiajun committed Apr 10, 2024
1 parent b06eb3b commit 0004d9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Install dependencies only when needed
FROM node:18-alpine AS deps
FROM node:20-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN sed -i 's/dl-cdn.alpinelinux.org/mirror.sjtu.edu.cn/g' /etc/apk/repositories && apk add --no-cache libc6-compat
WORKDIR /app
Expand All @@ -12,7 +12,7 @@ RUN yarn install --frozen-lockfile
# RUN npm ci

# Rebuild the source code only when needed
FROM node:18-alpine AS builder
FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
Expand All @@ -28,7 +28,7 @@ RUN yarn build
# RUN npm run build

# Production image, copy all the files and run next
FROM node:18-alpine AS runner
FROM node:20-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down

0 comments on commit 0004d9b

Please sign in to comment.