Leon4gr45 commited on
Commit
5832c50
·
verified ·
1 Parent(s): 23ca4e1

Use npm install -g pnpm in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -7,7 +7,8 @@ WORKDIR /app
7
 
8
  # Install dependencies based on the preferred package manager
9
  COPY package.json pnpm-lock.yaml* ./
10
- RUN corepack enable pnpm && pnpm i --no-frozen-lockfile || (pnpm approve-builds && pnpm i --no-frozen-lockfile)
 
11
 
12
  # Rebuild the source code only when needed
13
  FROM base AS builder
@@ -18,7 +19,7 @@ COPY . .
18
  # Disable telemetry during the build.
19
  ENV NEXT_TELEMETRY_DISABLED 1
20
 
21
- RUN corepack enable pnpm && pnpm run build
22
 
23
  # Production image, copy all the files and run next
24
  FROM base AS runner
 
7
 
8
  # Install dependencies based on the preferred package manager
9
  COPY package.json pnpm-lock.yaml* ./
10
+ # Use npm to install to avoid pnpm specific issues if they persist
11
+ RUN npm install -g pnpm && pnpm i --no-frozen-lockfile
12
 
13
  # Rebuild the source code only when needed
14
  FROM base AS builder
 
19
  # Disable telemetry during the build.
20
  ENV NEXT_TELEMETRY_DISABLED 1
21
 
22
+ RUN npm install -g pnpm && pnpm run build
23
 
24
  # Production image, copy all the files and run next
25
  FROM base AS runner