-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Server: Adding ARM64 support for both ARM servers and macOS #9940
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Thanks but could you explain the commit? I don't understand how adding packages related to jpg, gif or svg has something to do with supporting an arm64 version? |
For some reason, when not adding these, I get an error, I think it has to do with the canvas npm package. Let me rebuild without them so I can replicate it for you. The docker build was done at commit |
@laurent22 It will build |
Thanks for clarifying, that makes sense.
So does it mean if I change the command here, it will automatically create a universal image?
Or is there something more I would need to change? |
You need Docker buildx command and if on X86, you need binfmt and the Qemu emulator: https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/ I haven't checked your code if there's CI or anything, but if there is I'm likely able to add the right dependencies! |
If you could advise on what dependencies might be needed that would be great. We indeed build the Docker image on CI from an We then install these dependencies:
And then run the above mentioned command:
Can you see something in there that would need to be changed? |
I believe I do. Is there a way to verify this locally before I adjust my PR? [Edit: typo] |
Verifying this locally is hard, but you can add them to the PR and then it'll directly run on CI so we can check if all's good |
I can try using act to run the actions locally (https://github.com/nektos/act), which always supported me well, I rather send it in correctly in 1 go 😆 |
@peterwilli docker publish the @laurent22 Docker v23.0 use buildkit(buildx) to build container, |
That sounds complex and it's definitely fine to use the PR CI for this purpose (I do it all the time!) |
I'm closing this for now as I'm trying to clear the PR backlog. I would be very keen to add support for ARM64 to the official Docker image though, so please let me know if you would like to continue looking into this and I'll reopen. |
This allows to build on arm64 + amd64, I use (and tested) this image to run on my Odroid ARM server.
Test image is at: https://hub.docker.com/repository/docker/peterwilli/joplin-server/general (has both arm64 and amd64)
How to build an universal image:
docker buildx build -f Dockerfile.server --tag=peterwilli/joplin-server --platform=linux/arm64,linux/amd64 --push
Ofcourse, replace
peterwilli/joplin-server
with your own tag.