add recipe to compile arm64-musl version#59
Conversation
|
It looks like the docker official images already builds this out for us https://hub.docker.com/layers/node/library/node/current-alpine3.15/images/sha256-b023d2de41e78d9665ab51fd378250fa2901e7ad321871a54ab60ed347389f0e?context=explore |
|
Would @nodejs/docker images consume these binaries if we produced them here? And, is there much of an audience for this? I already probed at this question in #50. It seems reasonable to me that there might be a growing audience for this kind of thing. Maybe we have Docker image numbers to suggest audience size? @mollux I assume you're one of those people, can you talk about your use-case a bit? |
|
Currently, only the x64 builds from here are special cased https://github.com/nodejs/docker-node/blob/1b70b5dfb424d67c8e0b0badb985aedf43a2227a/Dockerfile-alpine.template#L11-L26 but it's possible it could be done for arm64. Not sure if it would need to be arm64v8 vs arm64 or if that's implied |
our use caseOur use case is that we have a custom image (based on One of the tasks to perform is to compile frontend themes, where we require nodejs. On amd64 we use the pre-build version from unofficial builds, hence the PR to be able to do the same for arm64. I currently use a self-managed location where we host the compiled versions and the use the binaries in the nodejs-docker imagesIt looks like there is not much change needed to use the arm64 binaries if they are available.
|
rvagg
left a comment
There was a problem hiding this comment.
fine by me, just needs someone to deploy and test the deployment; I'll try and get to it soon but there are others who might like to hop in too
|
hi @rvagg is there anything I can do on my side to move this PR forward? |
|
hey @rvagg, any news on this? anything we can do to help? in our company, we use docker with a custom alpine base image. having prebuilt binaries would help us have multiarch images rather sooner & quicker than building from source |
|
@acifani there are already prebuilt Alpine images on dockerhub through the official node image |
|
This would enable Node.js to run on mobile devices like the PinePhone and PinePhone Pro running Alpine-based PostmarketOS and open up new possibilities for the use of such devices in education and elsewhere. Is there anything we can do to help get this merged @rvagg? :) |
|
@rvagg @nodejs/build @nodejs/docker could you take a look? |
|
@rvagg need this for cloud provided arm64 server |
|
let's just deploy and see what happens eh? will report back if there are errors and this needs to be backed out, disabled or whatever and has to be fixed |
| @@ -0,0 +1,39 @@ | |||
| FROM alpine:3.15 | |||
There was a problem hiding this comment.
btw, why are we doing 3.15? wouldn't it be better to go for the latest so we don't have so much catch-up work to do next time we have to revisit this?
|
Nope:
I think I can leave this in place for now while it gets fixed as it shouldn't disrupt other builds, but it'll need to get fixed or reverted soon please. @mollux are you able to take a look at this and figure out how to address it? |
|
Maybe nodejs/node#45756? |
|
reverting in #70 |
|
I believe this can be reopened after nodejs/node#51256 got merged. Probably have to wait for the fix to land in the release branches first though. Do you want me to create a separate issue? |
|
It would be best if you would open a fresh PR |
Configuration to allow compiling a arm64 musl version (on amd64 hardware)
I tested this by building the last version of node 8, 10, 12, 14 and 16 on amd64 hardware, and doing the basic steps in a frontend theme project (
npm install,grunt watch, ...), and it works without issues.This addresses #50
I updated the
readme.mdbest effort, but feel free to update if needed