Replies: 7 comments
-
Hey @g4xx! Happy new year, and thanks a ton for your feedack! Your suggestion sounds fantastic and I am all in for making this project more accessible. I've tried my best to make the project architecture-agnostic and really glad to hear that you tried it on your ARM64 device, quite exciting! To be honest, my Docker expertise is a bit limited (I'm a technical artist, in love with tech), so I'd really appreciate your guidance. Could you share a bit more about your experiment? Specifically:
Once again, thanks a lot for the suggestion, and here's to an amazing new year 🍺 Best! |
Beta Was this translation helpful? Give feedback.
-
Happy New Year! 🎊 I didn't really had to do anything with the app itself as it work as is. Base image and Node.js have their counterparts on ARM so I don't think there is any issue there. I haven't tested it too much but it launched without any issues on my Raspberry Pi and it seems to be working exactly the same (probably requires some more in depth testing though). These are the steps I took for creating ARM64 image: Building the image on an x86_64 (AMD64) machine requires you to use QEMU to enable multi-platform builds. You can install QEMU on your system:
Then create a new builder
After that all I really did was adding a build target when doing docker build.
This will output an image that can be used on ARM64 however it won't really work with DockerHub multiarch builds as it requires some changes to Dockerfile. I am not too familiar with this either but from what I can tell you can modify your file to something like this: ⚠ Caution, this was generated by ChatGPT so it might not be the correct way of doing things but might set you on the right track ⚠
I must admit that I did it just as an experiment and have never really built any Docker images before, so take all this with a bit of a grain of salt as this might not represent best practices or correct way of doing things! Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hey @g4xx thanks for the detailed explanation, I will try to get in touch with docker maestro's around and hopefully they can help this out! Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Hey @g4xx, I have done some digging and added a few commands to package.json file which is on multiplatform branch currently. Here is the patch file to that commit and the diff for the commands follow "scripts": {
"dev": "next dev",
"start": "next start",
"build": "next build",
"export": "next export",
"lint": "next lint",
- "format": "prettier . --write"
+ "format": "prettier . --write",
+ "docker:build:amd64": "docker buildx build --load --platform linux/amd64 -t excalith/start-page:latest .",
+ "docker:build:arm64": "docker buildx build --load --platform linux/arm64 -t excalith/start-page:latest .",
+ "docker:run": "docker run --name start-page --restart=always -p 8080:3000 -d excalith/start-page"
}, Given that the Dockerfile is designed to be platform-agnostic, you should be able to perform local builds using the following commands: yarn docker:build:arm64
yarn docker:run On my cloud vm, I managed to build an run arm64 locally. Would appreciate if you try it out as well |
Beta Was this translation helpful? Give feedback.
-
Also updated the GitHub action on my test branch. It now builds both arm64 and amd64 images and deploys them on both DockerHub and GHCR. On my cloud vm, I managed to run arm64 and serve it online. docker pull --platform linux/arm64 excalith/start-page:test
docker run --name start-page --restart=always -p 8080:3000 -d excalith/start-page:test Would be grateful if you check this one out as well. |
Beta Was this translation helpful? Give feedback.
-
Great! Thanks for quick response! I've tested your branch on DockerHub and was able to run the app without any issues using Portainer on my Raspberry Pi! Thank you! I was looking through the changes you've made but I am not really familiar with the build system so can't really provide any more feedback. On a side note. It would be nice to provide docker-compose.yml file as QoL improvement.
|
Beta Was this translation helpful? Give feedback.
-
Hey @g4xx, glad to hear the image on DockerHub worked for you! I will do some tests and hopefully create a new release with arm64 support, which will be automatically built with each release on both GHCR and DockerHub. The commands I mentioned are added to build images locally without hassling with commands.
They might be redundant for your case, but while testing out arm64 build I added those as a QoL improvement for those who wants to build their forks easily. About the docker-compose.yml, I think it is better to add it to wiki page for Docker users for a few reasons:
However, I will add it to Wiki page for users willing to compose up. Thanks again for your suggestion and test! EDIT: Just released v3.0.0 with arm64 build support. |
Beta Was this translation helpful? Give feedback.
-
Hey @excalith !
First off - I really appreciate the aesthetics, simplicity, speed, and the general idea. I love it! Keep it up!
I'm currently hosting this via Docker on my x86 server, and it has been working flawlessly. However, I've been exploring the possibility of running it on my ARM64 devices, particularly Raspberry Pi. Today, I experimented by building ARM64 images locally, and it seems to work without any issues.
Considering the increasing popularity of ARM-based devices, especially for home servers and IoT projects, I wanted to suggest the addition of ARM64 build targets. This could enhance the accessibility of your project to a broader audience.
Thanks for considering this suggestion, and keep up the fantastic work!
Best regards!
Beta Was this translation helpful? Give feedback.
All reactions