Skip to content

Instantly share code, notes, and snippets.

View Philzen's full-sized avatar

Philzen

  • Northern Germoney / Denmark / Planet Earth
View GitHub Profile
@ralexandr
ralexandr / alpine_install_nvm.md
Last active September 19, 2023 18:56
Installing nvm on Alpine Linux

Installing nvm on Alpine Linux

Alpine Linux, unlike mainstream/traditional Linux distributions, is based on BusyBox, a very compact (~5MB) Linux distribution. BusyBox (and thus Alpine Linux) uses a different C/C++ stack to most mainstream/traditional Linux distributions - musl. There currently is no musl based binary published in the nodejs official builds but they do publish a musl based binary in the nodejs unofficial builds which they use in the node:alpine docker image. The node:alpine docker image is a potential alternative to nvm for using node on alpine linux.

For now you can override the nvm_get_arch function to return x64-musl on x64 Alpine Distributions. Currently the Node project only has unofficial builds for x64-musl. Sorry no ARM-musl/x86-musl,etc builds for now. The N