@@ -10,13 +10,14 @@ WORKDIR /app
10
10
11
11
# Install dependencies based on the preferred package manager
12
12
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
13
- RUN \
14
- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15
- elif [ -f package-lock.json ]; then npm ci; \
16
- elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
17
- else echo "Lockfile not found." && exit 1; \
18
- fi
19
-
13
+ # RUN \
14
+ # if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
15
+ # elif [ -f package-lock.json ]; then npm ci; \
16
+ # elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
17
+ # else echo "Lockfile not found." && exit 1; \
18
+ # fi
19
+ RUN npm install -g pnpm
20
+ RUN pnpm i --frozen-lockfile
20
21
21
22
# Rebuild the source code only when needed
22
23
FROM base AS builder
@@ -29,12 +30,14 @@ COPY . .
29
30
# Uncomment the following line in case you want to disable telemetry during the build.
30
31
# ENV NEXT_TELEMETRY_DISABLED=1
31
32
32
- RUN \
33
- if [ -f yarn.lock ]; then yarn run build; \
34
- elif [ -f package-lock.json ]; then npm run build; \
35
- elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
36
- else echo "Lockfile not found." && exit 1; \
37
- fi
33
+ # RUN \
34
+ # if [ -f yarn.lock ]; then yarn run build; \
35
+ # elif [ -f package-lock.json ]; then npm run build; \
36
+ # elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
37
+ # else echo "Lockfile not found." && exit 1; \
38
+ # fi
39
+ RUN npm install -g pnpm
40
+ RUN pnpm run build
38
41
39
42
# Production image, copy all the files and run next
40
43
FROM base AS runner
0 commit comments