refactor: simplify client Dockerfile (#58099)

This commit is contained in:
Oliver Eyton-Williams
2025-01-14 21:14:48 +01:00
committed by GitHub
parent cdd6b8700e
commit c0460c9a81

View File

@@ -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