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

Disable scripts in pnpm via config in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -3
Dockerfile CHANGED
@@ -7,8 +7,7 @@ WORKDIR /app
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,7 +18,7 @@ COPY . .
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
 
7
 
8
  # Install dependencies based on the preferred package manager
9
  COPY package.json pnpm-lock.yaml* ./
10
+ RUN corepack enable pnpm && pnpm config set ignore-scripts true && pnpm i --no-frozen-lockfile
 
11
 
12
  # Rebuild the source code only when needed
13
  FROM base AS builder
 
18
  # Disable telemetry during the build.
19
  ENV NEXT_TELEMETRY_DISABLED 1
20
 
21
+ RUN corepack enable pnpm && pnpm config set ignore-scripts true && pnpm run build
22
 
23
  # Production image, copy all the files and run next
24
  FROM base AS runner