- Proposes to implement https://github.com/nodejs/docker-node/issues/2264 for Node.js >=26 - Follows on from PR https://github.com/nodejs/docker-node/pull/2368 ## Problem - Images include Yarn v1 by default - TSC endorsed the removal of Yarn v1 for images based on Node.js 26 and above as currently described in [Yarn v1 Classic bundling](https://github.com/nodejs/docker-node/blob/main/README.md#yarn-v1-classic-bundling) ## Suggested Solution - Update each of the template files to add beginning and end markers for the Yarn installation section - [Dockerfile-alpine.template](https://github.com/nodejs/docker-node/blob/main/Dockerfile-alpine.template) - [Dockerfile-debian.template](https://github.com/nodejs/docker-node/blob/main/Dockerfile-debian.template) - [Dockerfile-slim.template](https://github.com/nodejs/docker-node/blob/main/Dockerfile-slim.template) ```Dockerfile # YARN_INSTALLATION_START ENV YARN_VERSION=0.0.0 RUN set -ex \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ ... # smoke test && yarn --version \ && rm -rf /tmp/* # YARN_INSTALLATION_END ``` - In [update.sh](https://github.com/nodejs/docker-node/blob/main/update.sh) use `sed` to remove the marked Yarn installation section for `version` >= 26 when specific `Dockerfile`s are created based on the templates - Update documentation accordingly - This should be implemented before the planned release date of Node.js 26.0.0 on 2026-04-22
Problem
Images include Yarn v1 by default
TSC endorsed the removal of Yarn v1 for images based on Node.js 26 and above as currently described in Yarn v1 Classic bundling
Suggested Solution
Update each of the template files to add beginning and end markers for the Yarn installation section
Dockerfile-alpine.template
Dockerfile-debian.template
Dockerfile-slim.template
In update.sh use
sedto remove the marked Yarn installation section forversion>= 26 when specificDockerfiles are created based on the templatesUpdate documentation accordingly
This should be implemented before the planned release date of Node.js 26.0.0 on 2026-04-22