Closed ofirsnb closed 5 months ago
@ofirsnb Hi again :) Thanks for opening the issue. Support for docker env's wasn't planned in the close period, but your issue is an eye opener and it is important. We will try to let it in our plans for GA and look into it. First of all, you can feel free to contribute this feature if you feel like. We would really appreciate it. In any case, can you list your node_moudoles?
Hey @avifenesh :) I understand. Sure I'll try to take a look over the next few days, thank you for being so supportive:) And thanks for your efforts.!
Attaching the node_modules content (in the demo above):
@Elen-Ghulam , as discussed please estimate the effort and provide ETA.
Thank you @ofirsnb for creating the docker demo.
Next steps: Since the musl library isn't supported yet in npm, we'll have to try and build the library from parts. We'll try and build an alpine docker image with rust and node to build it with.
Thank you very much for your response, @acarbonetto .
That sounds good, thanks!
Took me a while to understand how the build process works here (using napi
), so yeah what you've said was exactly my thought too,
Let me know if I can be at your further assistance, thanks!
I managed to compile a working musl
binary!
Pushed the compiled binary to the demo above, as a POC showing it works. (commit - note that the Docker build copies the binary into the node_modules, for the POC purpose).
Opened a PR with the changes in order to compile a musl
binary.
We're making some progress here:
Found out we need to install bash
and gettext
to get further down the build process
We also found that the container image we're using is supporting an x64
architecture, as opposed to the one we need which is arm64
. We're digging into this issue, since when we pull the Alpine image straight from Docker, we do get an arm64
architecture, but the one in GitHub is x64
Turns out the arm64
is not natively supported by GitHub
We are delving into some other GitHub Actions that may enable us to emulate this architecture and get a stable build.
Currently, we're trying this action: https://github.com/marketplace/actions/run-on-architecture to see if we can build a successful arm64
artifact
Describe the bug
Seems like the package (Node) cannot be initialized when running under
alpine
image.Expected Behavior
Package should be initialized properly.
Current Behavior
When running under
alpine
image (using official Node images), the code crashes with the error:Reproduction Steps
Dockerfile
If you use the
node:18.19.0
image instead ofnode:18.19.0-alpine
, it works as expected.You can use the Demo I pushed here: https://github.com/ofirsnb/node-glide-demo
Possible Solution
If I understand correctly, it's an "issue" with the
rs-glide
itself, not necessarily your wrapper. Probably it's happening due to missing dependencies, because thealpine
is a very slim image. If indeed that's the case, I think the best solution would be to add to the documentation the required dependencies, so we can install them during the docker build.Additional Information/Context
No response
Client version used
0.3.3, 0.2.0
Redis Version
7.2
OS
Linux
Language
TypeScript
Language Version
5.4.3
Cluster information
No response
Logs
No response
Other information
No response