Why does Alpine apk report "unsatisfiable constraints" when installing an older version of Node.js?

That is correct. Unfortunately, 4.4.4 is not available.

You should avoid being explicit on package versions unless controlling your own package mirror and package builds, rather allow the package system to handle it for the Alpine release in use.

For Alpine 3.4, only 4.6.0 is available. Search Alpine 3.4 x86_64 Packages Online for nodejs-lts

If you are so inclined, here's the source for the package to change in order to build a specific version of choice.

Review the package source

Alpine has a wiki page: Creating an Alpine package.

Note that 'nodejs-lts' package name is deprecated.

provides="nodejs-lts=$pkgver" # for backward compatibility

replaces="nodejs-current nodejs-lts" # nodejs-lts for backward compatibility


Unfortunately, Alpine-Linux Package Management drops older packages when there are newer versions available. This makes it hard to use Alpine Linux with docker since you want a reproducible image with exact versions.

See this article for the entire rundown. The two solutions that are offered: Create you own mirror and host the specific version of the packages you wish to keep having access to (probably not worth the effort) or use a different base image such as Ubuntu who's package management system doesn't drop older versions of packages (as intuitively expected from any modern day package management system).

And, I suppose you could just update your docker file to use the latest available version of those packages. However, it'll only be a matter of time before you run into this same situation again. It's just not scalable if you are building for a production system.