diff --git a/.dockerignore b/.dockerignore index 0ede9bb..57315c0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,6 @@ node_modules .env*.local README.md Dockerfile -.dockerignore \ No newline at end of file +.dockerignore +.yarn +.pnp.* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8c79c68..f9b39dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ FROM node:22-alpine AS deps WORKDIR /app -COPY package.json package-lock.json* ./ -RUN npm ci +RUN corepack enable +COPY package.json yarn.lock .yarnrc.yml ./ +RUN yarn install --immutable FROM node:22-alpine AS builder WORKDIR /app +RUN corepack enable COPY --from=deps /app/node_modules ./node_modules COPY . . ENV NEXT_TELEMETRY_DISABLED=1 -RUN npm run build +RUN yarn build FROM node:22-alpine AS runner WORKDIR /app