Skip to content

Conversation

marcosabcarvalho
Copy link

🇬🇧 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

Hardware: Orange Pi 5B
OS: Ubuntu (arm64)
Machine Control: GRBL running on Arduino Uno with CNC Shield to control a laser engraver.

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

Hardware: Orange Pi 5B
Sistema Operacional: Ubuntu (arm64)
Controle da Máquina: GRBL rodando em Arduino Uno com CNC Shield para controle de um laser engraver.

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! 🚀🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant