Ensure webapp container does not fetch pnpm at runtime (#2181)

* install pnpm during build

* install pnpm for node user as well
This commit is contained in:
nicktrn
2025-06-18 11:31:36 +01:00
committed by GitHub
parent 4ca6506655
commit 55f41a2168
+7 -1
View File
@@ -66,7 +66,6 @@ RUN pnpm run build --filter=webapp...
FROM ${NODE_IMAGE} AS runner
RUN apt-get update && apt-get install -y openssl netcat-openbsd ca-certificates
WORKDIR /triggerdotdev
RUN corepack enable
ENV NODE_ENV production
COPY --from=base /usr/bin/dumb-init /usr/bin/dumb-init
@@ -94,5 +93,12 @@ ENV BUILD_APP_VERSION=${BUILD_APP_VERSION} \
EXPOSE 3000
# Add global pnpm shims and install pnpm during build (root user)
RUN corepack enable && corepack prepare --activate
USER node
# Ensure pnpm is installed during build and not silently downloaded at runtime (node user)
RUN corepack prepare --activate
CMD ["./scripts/entrypoint.sh"]