Added ARM64 support for LaserWeb4 #678
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🇬🇧 English Version (Pull Request Description)
Title:
🔧 Added ARM64 Support for Docker on Orange Pi 5B (Ubuntu)
Description:
I have successfully built and run LaserWeb4 on an Orange Pi 5B running Ubuntu with an ARM64 architecture. Since the original Docker image was built for amd64, it was necessary to adjust the Dockerfile to ensure compatibility with arm64/v8.
To set up Docker on my system, I followed the official ARM guide from Docker:
🔗 Getting Started with Docker for ARM on Linux.
Changes and Fixes
✅ Added support for arm64 in Dockerfile.
✅ Fixed an issue where npm tried to clone repositories via SSH, causing failures in environments without SSH keys.
✅ Replaced git@github.com with HTTPS (https://github.com) to prevent dependency installation issues.
✅ Ensured npm ci runs correctly on Alpine-based environments by adding --unsafe-perm.
Tested On
How to Build and Run (ARM64)
If you want to build and run the ARM64-compatible version, follow these steps:
docker buildx build --platform linux/arm64 -t laserweb:arm64 .
docker run --device=/dev/ttyUSB0 -p 8000:8000 laserweb:arm64
This change will allow LaserWeb4 to be used on ARM-based devices such as Raspberry Pi and Orange Pi.
I would appreciate a review and possible inclusion of these changes in the official repository. 🚀🔥
🇧🇷 Versão em Português (Descrição do Pull Request)
Título:
🔧 Adicionado suporte ARM64 para Docker no Orange Pi 5B (Ubuntu)
Descrição:
Consegui compilar e rodar o LaserWeb4 em um Orange Pi 5B com Ubuntu, que possui arquitetura ARM64. Como a imagem original do Docker foi criada para amd64, precisei modificar o Dockerfile para garantir a compatibilidade com arm64/v8.
Para configurar o Docker no meu sistema, segui o guia oficial para ARM:
🔗 Getting Started with Docker for ARM on Linux.
Alterações e Correções
✅ Adicionado suporte para arm64 no Dockerfile.
✅ Corrigido um problema onde o npm tentava clonar repositórios via SSH, falhando em ambientes sem chave SSH configurada.
✅ Substituído git@github.com por HTTPS (https://github.com) para evitar falhas na instalação das dependências.
✅ Garantido que npm ci rode corretamente em ambientes baseados em Alpine, adicionando --unsafe-perm.
Testado em
Como Compilar e Executar (ARM64)
Caso queira rodar a versão compatível com ARM64, siga estes passos:
docker buildx build --platform linux/arm64 -t laserweb:arm64 .
docker run --device=/dev/ttyUSB0 -p 8000:8000 laserweb:arm64
Essa mudança permitirá que o LaserWeb4 seja usado em dispositivos ARM, como Raspberry Pi e Orange Pi.
Agradeço a revisão e espero que essa contribuição possa ser integrada ao repositório oficial! 🚀🔥