Skip to content

Commit

Permalink
fix(build): ditch corepack in containerfile
Browse files Browse the repository at this point in the history
The deploy pipeline was failing on container builds (across the PL
frontend repos) due to upstream breakage in corepack [0].
This changes matches changes in e.g. [1], [2].

[0] nodejs/corepack#612
[1] penumbra-zone/penumbers#19
[2] penumbra-zone/dex-explorer#341
  • Loading branch information
conorsch committed Feb 3, 2025
1 parent a71e42e commit ec50213
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/web/Containerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# slimmest image. only for running the container.
FROM docker.io/library/node:20-alpine AS alpine
ARG NODE_MAJOR_VERSION=22
FROM docker.io/library/node:${NODE_MAJOR_VERSION}-alpine AS base
LABEL maintainer="[email protected]"

# provide pnpm globally for dep installing and building
FROM alpine AS base
ENV NEXT_TELEMETRY_DISABLED=1
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm
# We no longer use `corepack enable pnpm` due to breakage documented in
# https://github.com/nodejs/corepack/issues/612
RUN npm install -g pnpm@${PNPM_VERSION}
RUN pnpm install turbo --global

# prune package structure + code into out/
Expand Down Expand Up @@ -44,7 +45,7 @@ COPY turbo.json turbo.json
RUN turbo run build --filter=cuiloa-app

# Run container
FROM alpine AS runner
FROM base AS runner
WORKDIR /app

# Disable telemetry.
Expand Down

0 comments on commit ec50213

Please sign in to comment.