From 2aef0099afb5a1b7c20e7507d2b116f742155ad3 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:28:22 +0530 Subject: [PATCH] revert: clean up dockerfiles (#60996) --- docker/api/Dockerfile | 4 ++-- docker/web/Dockerfile | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile index 3814c970079..8f7abaa86cf 100644 --- a/docker/api/Dockerfile +++ b/docker/api/Dockerfile @@ -2,7 +2,7 @@ FROM node:22-bookworm AS builder RUN apt-get update && apt-get install -y jq # global installs need root permissions, so have to happen before we switch to # the node user -RUN corepack enable +RUN npm i -g pnpm@10 # node images create a non-root user that we can use USER node WORKDIR /home/node/build @@ -41,7 +41,7 @@ COPY --chown=node:node pnpm*.yaml . COPY --chown=node:node package.json . COPY --chown=node:node api/ api/ COPY --chown=node:node shared/ shared/ -RUN corepack enable +RUN npm i -g pnpm@10 # Weirdly this config does not seem necessary for the new api (the same number # of deps are installed in both cases), but I'm including it just for diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index 2edbed2bebc..e2dfa794df7 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -1,7 +1,7 @@ FROM node:22-bookworm AS builder # global installs need root permissions, so have to happen before we switch to # the node user -RUN corepack enable +RUN npm i -g pnpm@10 # node images create a non-root user that we can use USER node WORKDIR /home/node/build @@ -13,20 +13,21 @@ COPY --chown=node:node tools/ tools/ COPY --chown=node:node curriculum/ curriculum/ ARG HOME_LOCATION +ARG API_LOCATION +ARG FORUM_LOCATION ARG NEWS_LOCATION +ARG RADIO_LOCATION ARG CLIENT_LOCALE ARG CURRICULUM_LOCALE -ARG API_LOCATION -ARG ALGOLIA_API_KEY ARG ALGOLIA_APP_ID -ARG GROWTHBOOK_URI -ARG FORUM_LOCATION -ARG PATREON_CLIENT_ID -ARG PAYPAL_CLIENT_ID +ARG ALGOLIA_API_KEY ARG STRIPE_PUBLIC_KEY -ARG SHOW_UPCOMING_CHANGES -ARG FREECODECAMP_NODE_ENV +ARG PAYPAL_CLIENT_ID +ARG PATREON_CLIENT_ID ARG DEPLOYMENT_ENV +ARG SHOW_UPCOMING_CHANGES +ARG GROWTHBOOK_URI +ARG FREECODECAMP_NODE_ENV # For simplicity and because node_modules do not make it into the final image, # we can just install all dependencies here.