mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(docker): clean up dockerfiles (#60947)
This commit is contained in:
committed by
GitHub
parent
700aa1182d
commit
013c13c676
@@ -2,7 +2,7 @@ FROM node:22-bookworm AS builder
|
|||||||
RUN apt-get update && apt-get install -y jq
|
RUN apt-get update && apt-get install -y jq
|
||||||
# global installs need root permissions, so have to happen before we switch to
|
# global installs need root permissions, so have to happen before we switch to
|
||||||
# the node user
|
# the node user
|
||||||
RUN npm i -g pnpm@10
|
RUN corepack enable
|
||||||
# node images create a non-root user that we can use
|
# node images create a non-root user that we can use
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node/build
|
WORKDIR /home/node/build
|
||||||
@@ -41,7 +41,7 @@ COPY --chown=node:node pnpm*.yaml .
|
|||||||
COPY --chown=node:node package.json .
|
COPY --chown=node:node package.json .
|
||||||
COPY --chown=node:node api/ api/
|
COPY --chown=node:node api/ api/
|
||||||
COPY --chown=node:node shared/ shared/
|
COPY --chown=node:node shared/ shared/
|
||||||
RUN npm i -g pnpm@10
|
RUN corepack enable
|
||||||
|
|
||||||
# Weirdly this config does not seem necessary for the new api (the same number
|
# 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
|
# of deps are installed in both cases), but I'm including it just for
|
||||||
|
|||||||
+9
-10
@@ -1,7 +1,7 @@
|
|||||||
FROM node:22-bookworm AS builder
|
FROM node:22-bookworm AS builder
|
||||||
# global installs need root permissions, so have to happen before we switch to
|
# global installs need root permissions, so have to happen before we switch to
|
||||||
# the node user
|
# the node user
|
||||||
RUN npm i -g pnpm@10
|
RUN corepack enable
|
||||||
# node images create a non-root user that we can use
|
# node images create a non-root user that we can use
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node/build
|
WORKDIR /home/node/build
|
||||||
@@ -13,21 +13,20 @@ COPY --chown=node:node tools/ tools/
|
|||||||
COPY --chown=node:node curriculum/ curriculum/
|
COPY --chown=node:node curriculum/ curriculum/
|
||||||
|
|
||||||
ARG HOME_LOCATION
|
ARG HOME_LOCATION
|
||||||
ARG API_LOCATION
|
|
||||||
ARG FORUM_LOCATION
|
|
||||||
ARG NEWS_LOCATION
|
ARG NEWS_LOCATION
|
||||||
ARG RADIO_LOCATION
|
|
||||||
ARG CLIENT_LOCALE
|
ARG CLIENT_LOCALE
|
||||||
ARG CURRICULUM_LOCALE
|
ARG CURRICULUM_LOCALE
|
||||||
ARG ALGOLIA_APP_ID
|
ARG API_LOCATION
|
||||||
ARG ALGOLIA_API_KEY
|
ARG ALGOLIA_API_KEY
|
||||||
ARG STRIPE_PUBLIC_KEY
|
ARG ALGOLIA_APP_ID
|
||||||
ARG PAYPAL_CLIENT_ID
|
|
||||||
ARG PATREON_CLIENT_ID
|
|
||||||
ARG DEPLOYMENT_ENV
|
|
||||||
ARG SHOW_UPCOMING_CHANGES
|
|
||||||
ARG GROWTHBOOK_URI
|
ARG GROWTHBOOK_URI
|
||||||
|
ARG FORUM_LOCATION
|
||||||
|
ARG PATREON_CLIENT_ID
|
||||||
|
ARG PAYPAL_CLIENT_ID
|
||||||
|
ARG STRIPE_PUBLIC_KEY
|
||||||
|
ARG SHOW_UPCOMING_CHANGES
|
||||||
ARG FREECODECAMP_NODE_ENV
|
ARG FREECODECAMP_NODE_ENV
|
||||||
|
ARG DEPLOYMENT_ENV
|
||||||
|
|
||||||
# For simplicity and because node_modules do not make it into the final image,
|
# For simplicity and because node_modules do not make it into the final image,
|
||||||
# we can just install all dependencies here.
|
# we can just install all dependencies here.
|
||||||
|
|||||||
Reference in New Issue
Block a user