-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Is there a distributed statically linked version of node? #58042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc @nodejs/build |
See https://github.com/nodejs/unofficial-builds/ (unsure if the musl build there is fully statically linked) |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm not sure but I think there were statically linked versions available/used in the past. |
I'd be curious to see how this is done, and why it couldn't load dynamically linked libraries. It should be theoretically possible with some work. If you are saying the docker image would only have node statically linked with no OS, yes you would need to have a linker/loader embedded in node for that to work. A better proposal to support native addons would be to have a node-runtime be statically linked with your linux flavor OS still as the base. The real problem with docker-node is that there is no "runtime", it all has npm, yarn and is used both as a build and runtime layer. |
To my understanding a fully static linked binary doesn't include the dynamic loader and therefore it can't load shared objects - like native addons. The node binaries used in current official docker images are not fully static linked. A few moments ago, before the official node-docker images exists there were inofficial ones. There were a static linked version showing the problem I described. see mhart/alpine-node#75 |
The Node.js binaries shipped on Nodejs.org include all of the dependencies but I don't believe they include components like gblic if that is what you meant. |
Another reason is that add-ons would use a different copy of libc (unless node linked in all of libc and re-exported it with |
What is the problem this feature will solve?
I'm curious if there is already a distributed version of node by this team which is statically compiled for some target triples?
I've seen the build commands which can do so, but I'm trying to upstream to your other repo
nodejs/docker-node
a statically compiled version into docker images. But in order to obviously trust the source, it would have to come from this repository and be distributed.Thank you
What is the feature you are proposing to solve the problem?
this feature would allow that. It would also close this.
node-runtime request
What alternatives have you considered?
none, too much bureaucracy otherwise. building a statically compiled version of node for docker is greatly wanted, but doing so not by this repository and distibuted, would never get ported to docker-node repository maintained by nodejs
The text was updated successfully, but these errors were encountered: