From ebc3eb7cc35561ce773801a9ff25e57d2dda6ef1 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Sat, 4 Jul 2026 03:32:55 +0800 Subject: [PATCH] build(docker): tweak Dockerfile for pnpm installation w/o corepack Context: https://github.com/nodejs/TSC/pull/1697#issuecomment-2737093616 Signed-off-by: Andrei Jiroh Halili --- build/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 346dc04..855e0ef 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -7,12 +7,17 @@ WORKDIR / RUN apk add --no-cache git \ && git clone --depth 1 --branch $TRANQUIL_PDS_BRANCH $TRANQUIL_PDS_REPO /src -FROM node:26-slim AS frontend -RUN corepack enable && corepack prepare pnpm@latest --activate +FROM node:26-alpine AS frontend + +# Install pnpm globally to avoid needing to install it in each build step +# since corepack is no longer bundled with Node.js since v25+. +RUN npm install -g pnpm@latest + WORKDIR /app COPY --from=starting-point /src/frontend/ ./ RUN pnpm install --frozen-lockfile && pnpm build +# TODO: Switch to Alpine Linux-based builder image FROM rust:1.96-slim-trixie AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates pkg-config libssl-dev mold clang protobuf-compiler curl xz-utils \ -- 2.51.2