aredridel / node-bin-gen

157 stars 53 forks source link

Alpine Linux support #48

Open langri-sha opened 6 years ago

langri-sha commented 6 years ago

I tried using this as a substitute for nvm and I'm really liking it!

It works nicely on my Arch Linux host, but I tried running this inside an Alpine Linux container and it seems the resolved binary doesn't seem to run.

image

aredridel commented 6 years ago

That looks a bit like the node interpreter doesn't run. What makes alpine special?

If you run ldd on that binary, what does it spit out?

langri-sha commented 6 years ago

I think it's a bit special because it uses http://www.musl-libc.org/, here's the documentation.

I've looked at the official Node.js containers and they seem to build from sources. I'll try running ldd on the binary ASAP and give you the output.

aredridel commented 6 years ago

That makes sense, then. It doesn't run with the standard libraries, and it's not the node binaries from nodejs.org.

This package so far only provides official binaries. I'd be into adding unofficial ones if someone else wants to publish and maintain them, and a clean way to signal 'Unofficial binaries are okay' to the installer. Some sort of environment variable or package.json thing maybe?

aredridel commented 6 years ago

Or a 'use this flavor of unofficial binaries' -- like "NODE_BINARY_PACKAGE_PREFIX=@my-node-releases/"

adabru commented 3 years ago

Here they are: https://unofficial-builds.nodejs.org . Unofficially "un"maintained by a member of the nodejs build working group. Here is a comment referring to it as solution to an issue: https://github.com/nodejs/build/issues/1140#issuecomment-564330014 . They are not made officially because that would consume more server capacity for testing and more issues in the official issue tracker than the nodejs team is organized to handle. That's at least what I understood from the various discussions in their issue tracker.

Alternatively one can use the nodejs docker images, see https://hub.docker.com/_/node.

Or a 'use this flavor of unofficial binaries' -- like "NODE_BINARY_PACKAGE_PREFIX=@my-node-releases/"

Seems good to me.

EDIT: There are only the 64-bit binaries (linux-x64-musl), not the 32-bit ones.

aredridel commented 3 years ago

Ooh excellent. I'll see what it might take!