Spaces:
Paused
Paused
Disable scripts in pnpm via config in Dockerfile
Browse files- 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 |
-
|
| 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
|
| 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
|