Smaller distros like Alpine for containers just seems to make sense.
Some build tools for node.js include:
apk --update add bash nano wget python make gcc g++ |
You can install on a “build” container and create an artifact to transfer to a sparse box without the build tools. See base images like:
mhart/alpine-node.
To run a local Node module as if it was installed globally, add this to your login profile (or set up a script to run/reset as needed):
export PATH=$PATH:./node_modules/.bin |