chore(downloads): replace Docker alpine with slim#8784
Open
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
Open
chore(downloads): replace Docker alpine with slim#8784MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Node.js “Docker” install snippet shown on the download page to recommend Debian-based *-slim images instead of Alpine (musl) images, aligning the website guidance with Node.js platform support tiers.
Changes:
- Replace
node:<major>-alpinerecommendations withnode:<major>-slim. - Remove the conditional logic that previously switched between
alpineandslimbased on major version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace Docker
alpinewithslimdisplayed on https://nodejs.org/en/downloadhttps://nodejs.org/en/download previously recommended an Alpine Docker image, for instance, selecting the LTS version on this page suggests:
On the Platform list Node.js classifies Linux
muslplatforms as "Experimental", including Alpine as an example. The Strategy classification states:On the docker-node repo, workflows are set up such that the non-availability of
muslbuilds does not block the release of Node.js Docker images for security releases. For non-security releases, the strategy is currently undefined (see nodejs/docker-node#2363). Typically, maintainers may manually release Debian-based Docker images if Alpine builds are significantly delayed.This means that the "Experimental" status of the Alpine unofficial builds often causes their release to be delayed.
Replacement assessment
Alpine Docker images have typically been preferred and recommended due to their smaller size. Due to less content, the risk of vulnerabilities is also reduced. On Docker Hub, the image
node:alpineforlinux/amd64lists with 56.99 MB compressed size.node:slim, as a Debian alternative to Alpine Linux, built from the base imagedebian:*-slim, lists with 75.37 MB.Debian images use
glibc. The Docker imagenode:lts-slimis published with the following architectures, none of which are "Experimental":linux/amd64linux/arm64/v8linux/ppc64lelinux/s390xThe trade-off when moving from
node:alpinetonode:slimis the advantage of faster and more reliable availability of new releases (Tier 1 or 2), compared to the disadvantage of ~30% size increase. This is disregarding other basic difference between Alpine and Debian, where Alpine is considered more of a restricted run-time environment, and Debian more of a flexible development / build environment.Validation
Go to https://nodejs.org/en/download and select using "Docker" for LTS release. Note the instructions:
Copying-and-pasting the whole script in one go doesn't work correctly (not due to this PR).
Individually copying each command works fine:
Related Issues
Addresses #8690
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.