Skip to content

Commit

Permalink
build: update node docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
GiyoMoon committed Sep 30, 2024
1 parent d9819aa commit 06220e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Install dependencies only when needed
FROM node:lts-alpine3.14 AS deps
FROM node:22.9.0-alpine3.20 AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:lts-alpine3.14 AS builder
FROM node:22.9.0-alpine3.20 AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN NEXT_PUBLIC_BASE_API_URL=BASE_API_URL yarn build && yarn install

# Production image, copy all the files and run next
FROM node:lts-alpine3.14 AS runner
FROM node:22.9.0-alpine3.20 AS runner
WORKDIR /app

ENV NODE_ENV production
Expand All @@ -38,4 +38,4 @@ ENV NEXT_TELEMETRY_DISABLED 1

ENTRYPOINT ["/app/entrypoint.sh"]

CMD ["npm", "run", "start"]
CMD ["npm", "run", "start"]

0 comments on commit 06220e3

Please sign in to comment.