Reasons this exists:
- Often we need large tools in a image (even if just temporarily for a build-stage) that suffer from limits of the apt/yum package managers. In this Node.js example, apt only has specific versions that are tied to the OS version. I needed a more flexable way to add these without the bloat that sometimes comes with apt/yum installers. In addition, nodesource (recommeneded way to install Node.js via apt) requires Python and more to install Node.js.
- For languages (python, node, ruby, php, etc.) we're often using old versions, and those upstream images are usually outdated builds
with a larger number of CVEs. A better aproach, for lowering CVEs, is to start from a
ubuntu
image, then install everything you need. - By copying files between images, the installs are typically faster, take less space, and give you more control over versions and upstream build dates.
I have slightly updated version that will also link
yarn
andnpx