Spaces:
Paused
Paused
Dockerfile: use --ignore-scripts in deps layer
Browse files- 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
|
| 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 |
-
|
|
|
|
| 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
|