Skip to content
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

fix(build): ditch corepack in containerfile #197

Merged
merged 1 commit into from
Feb 3, 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
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