Problem
Yarn v1 is included in the docker-node images, however it is receiving only limited security updates and the guidance has been to migrate to modern Yarn since 2020.
Especially for smaller images like Alpine, this dependency contributes to the size of the base, but seems unlikely to be used widely.
Solution
Remove the installation of Yarn v1 from the docker-node base images. Document best ways to then add Yarn v1 if needed.
Alternatives to Consider
- Take an
ARG to the base image which chooses a Yarn version to isntall
- Add a docker variant
no-yarn which does not contain yarn, but continue to install on other variants
- Continue as-is installing Yarn 1.22 on all docker-node images