Leon4gr45 commited on
Commit
22d376f
·
verified ·
1 Parent(s): ba35ea2

Dockerfile: use --ignore-scripts in deps layer

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -7,7 +7,7 @@ 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 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,7 +18,8 @@ COPY . .
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
 
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 --ignore-scripts
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
+ # Avoid corepack enable here if it's causing issues, or just use the pnpm already in the previous layer
22
+ RUN corepack enable pnpm && pnpm run build
23
 
24
  # Production image, copy all the files and run next
25
  FROM base AS runner