Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kienvc authored Aug 8, 2024
1 parent 3484c07 commit 8329203
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 ./
Expand Down Expand Up @@ -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"]

0 comments on commit 8329203

Please sign in to comment.