From 832920329deb2c59076cf432e3f3f43668209fe7 Mon Sep 17 00:00:00 2001 From: kienvc <17985897+kienvc@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:31:17 +0700 Subject: [PATCH] Update Dockerfile --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 789e1b87..9b69db26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ FROM node:20-alpine AS deps RUN apk add --no-cache libc6-compat -RUN apk add --no-cache --update alpine-sdk -RUN apk add --no-cache python3 py3-pip + WORKDIR /app COPY package.json yarn.lock ./ @@ -32,8 +31,16 @@ RUN yarn build # USER nextjs +FROM node:20-alpine AS runner + +WORKDIR /app + +COPY --from=deps /app/.next/standalone ./ +COPY --from=deps /app/.next/static ./.next/static +COPY ./public ./public + EXPOSE 3000 ENV PORT 3000 -CMD ["yarn", "start"] +CMD ["node", "server.js"]