File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,21 +6,14 @@ FROM base AS deps
66RUN apk add --no-cache libc6-compat
77WORKDIR /app
88
9- # Install dependencies based on the preferred package manager
10- COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
11- RUN \
12- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
13- elif [ -f package-lock.json ]; then npm ci; \
14- elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
15- else echo "Lockfile not found." && exit 1; \
16- fi
9+ # Install dependencies with pnpm
10+ COPY pnpm-lock.yaml package.json ./
11+ RUN npm i -g pnpm && pnpm i --frozen-lockfile
1712
1813
1914# Rebuild the source code only when needed
2015FROM base AS builder
2116WORKDIR /app
22- RUN yarn global add pnpm
23-
2417COPY --from=deps /app/node_modules ./node_modules
2518COPY . .
2619
@@ -31,9 +24,6 @@ ENV NEXT_TELEMETRY_DISABLED 1
3124
3225RUN pnpm build
3326
34- # If using npm comment out above and use below instead
35- # RUN npm run build
36-
3727# Production image, copy all the files and run next
3828FROM base AS runner
3929WORKDIR /app
You can’t perform that action at this time.
0 commit comments