Browse Source

fix: remove global installation of node-gyp from Dockerfile

Yuki Takei 6 days ago
parent
commit
c88227e902
2 changed files with 1 additions and 6 deletions
  1. 0 4
      apps/app/docker/Dockerfile
  2. 1 2
      apps/slackbot-proxy/docker/Dockerfile

+ 0 - 4
apps/app/docker/Dockerfile

@@ -57,10 +57,6 @@ WORKDIR $OPT_DIR
 # Copy only package manifests and lockfile for dependency caching
 # Copy only package manifests and lockfile for dependency caching
 COPY --from=pruner $OPT_DIR/out/json/ .
 COPY --from=pruner $OPT_DIR/out/json/ .
 
 
-# Install build tools and dependencies
-# No cache mount for global installs: standalone pnpm stores @pnpm/exe via symlinks into
-# $PNPM_HOME/store; overlaying that path with a BuildKit cache breaks the pnpm binary.
-RUN pnpm add node-gyp --global
 # Separate store path keeps the BuildKit cache mount away from the pnpm bootstrap store.
 # Separate store path keeps the BuildKit cache mount away from the pnpm bootstrap store.
 # --ignore-scripts: postinstall (prisma generate) needs full source, runs in builder stage.
 # --ignore-scripts: postinstall (prisma generate) needs full source, runs in builder stage.
 RUN --mount=type=cache,target=/root/.pnpm-store,sharing=locked \
 RUN --mount=type=cache,target=/root/.pnpm-store,sharing=locked \

+ 1 - 2
apps/slackbot-proxy/docker/Dockerfile

@@ -33,8 +33,7 @@ WORKDIR ${optDir}
 
 
 COPY . .
 COPY . .
 
 
-RUN pnpm add node-gyp --global
-RUN pnpm install ---frozen-lockfile
+RUN pnpm install --frozen-lockfile --ignore-scripts
 
 
 # build
 # build
 RUN turbo run build --filter @growi/slackbot-proxy
 RUN turbo run build --filter @growi/slackbot-proxy