diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index a2106fc7f55..62e213da826 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -29,14 +29,9 @@ ARG SHOW_UPCOMING_CHANGES ARG GROWTHBOOK_URI ARG FREECODECAMP_NODE_ENV -# We're installing specific packages even though it is not strictly necessary - -# pnpm install would work. The idea is to make the dependencies explicit and -# keep them under our control. -RUN pnpm config set dedupe-peer-dependents false -# Scripts need to be run at this stage (--ignore-scripts cannot be used) because -# without them, Gatsby will not install sharp. -RUN pnpm install -F=shared -F=client -F=ui -F=browser-scripts -F=challenge-parser \ - --frozen-lockfile +# For simplicity and because node_modules do not make it into the final image, +# we can just install all dependencies here. +RUN pnpm install --frozen-lockfile RUN pnpm build:client FROM node:20-alpine