Skip to content

Ensure webapp container does not fetch pnpm at runtime #2181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]