Prepare Dockerfile for Node 26 (#38943)
This commit is contained in:
committed by
GitHub
parent
2f1bbe051c
commit
d2f640272f
11
Dockerfile
11
Dockerfile
@@ -340,10 +340,13 @@ COPY --from=node /usr/local/bin /usr/local/bin
|
||||
COPY --from=node /usr/local/lib /usr/local/lib
|
||||
|
||||
RUN \
|
||||
# Configure Corepack
|
||||
rm /usr/local/bin/yarn*; \
|
||||
npm i -g corepack; \
|
||||
corepack prepare --activate;
|
||||
# Mount local Corepack and Yarn caches from Docker buildx caches
|
||||
--mount=type=cache,id=corepack-cache-${TARGETPLATFORM},target=/usr/local/share/.cache/corepack,sharing=locked \
|
||||
--mount=type=cache,id=yarn-cache-${TARGETPLATFORM},target=/usr/local/share/.cache/yarn,sharing=locked \
|
||||
# Remove pre-installed Yarn binaries (only present on Node <26)
|
||||
rm -f /usr/local/bin/yarn*; \
|
||||
# Install Corepack
|
||||
npm i -g corepack;
|
||||
|
||||
# hadolint ignore=DL3008
|
||||
RUN \
|
||||
|
||||
@@ -32,20 +32,18 @@ ARG GID="991"
|
||||
|
||||
# Apply Mastodon build options based on options above
|
||||
ENV \
|
||||
# Apply Mastodon version information
|
||||
MASTODON_VERSION_PRERELEASE="${MASTODON_VERSION_PRERELEASE}" \
|
||||
MASTODON_VERSION_METADATA="${MASTODON_VERSION_METADATA}" \
|
||||
# Apply timezone
|
||||
TZ=${TZ}
|
||||
|
||||
# Configure the IP to bind Mastodon to when serving traffic
|
||||
# Explicitly set PORT to match the exposed port
|
||||
# Use production settings for Yarn, Node and related nodejs based tools
|
||||
# Add Ruby and Mastodon installation to the PATH
|
||||
ENV \
|
||||
# Configure the IP to bind Mastodon to when serving traffic
|
||||
BIND="0.0.0.0" \
|
||||
# Explicitly set PORT to match the exposed port
|
||||
PORT=4000 \
|
||||
# Use production settings for Yarn, Node and related nodejs based tools
|
||||
NODE_ENV="production" \
|
||||
# Add Ruby and Mastodon installation to the PATH
|
||||
DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
# Set default shell used for running commands
|
||||
@@ -93,10 +91,10 @@ RUN \
|
||||
# Mount local Corepack and Yarn caches from Docker buildx caches
|
||||
--mount=type=cache,id=corepack-cache-${TARGETPLATFORM},target=/usr/local/share/.cache/corepack,sharing=locked \
|
||||
--mount=type=cache,id=yarn-cache-${TARGETPLATFORM},target=/usr/local/share/.cache/yarn,sharing=locked \
|
||||
# Configure Corepack
|
||||
rm /usr/local/bin/yarn*; \
|
||||
npm i -g corepack; \
|
||||
corepack prepare --activate;
|
||||
# Remove pre-installed Yarn binaries (only present on Node <26)
|
||||
rm -f /usr/local/bin/yarn*; \
|
||||
# Install Corepack
|
||||
npm i -g corepack;
|
||||
|
||||
RUN \
|
||||
# Mount Corepack and Yarn caches from Docker buildx caches
|
||||
|
||||
Reference in New Issue
Block a user