fboucquez / symbol-bootstrap

A tool that allows you to quickly configure and setup Symbol testnets and nodes.
Apache License 2.0
47 stars 28 forks source link

Add arm support #358

Open fboucquez opened 2 years ago

fboucquez commented 2 years ago

Atm, symbol-bootstrap uses images created with x86/x64 architectures. The docker-compose generated doesn't work on arm machines, like the new m1 Macs.

In order to implement this, the different arms images would need to (automatically) created. Bootstrap can then detect the local architecture of the machine and select the right arm images when generating the compose file.

The images Bootstrap uses are the following:

symbolServerImage: symbolplatform/symbol-server:gcc-10-1.0.3.1
symbolRestImage: symbolplatform/symbol-rest:2.4.0
symbolExplorerImage: symbolplatform/symbol-explorer:1.1.0-alpha
symbolFaucetImage: symbolplatform/symbol-faucet:1.0.1-alpha
mongoImage: mongo:4.4.3-bionic
httpsPortalImage: steveltn/https-portal:1.19

Some are easier than others to migrate, mongo already supports arm. The trick would be to build and push them automatically.

We may have other issues that I'm not aware of, I think we would need to request node 15+ to m1 users.

yilmazbahadir commented 2 years ago

I think new image versions with manifest could be enough, doubt that we need to set any architecture-specific detail in the bootstrap explicitly. I think the way mongo image works is via manifest, when you create a docker manifest pointing to all the available platform images and someone pulls that image, it automatically detects the platform/architecture and pulls the relevant image from the docker registry.

Please see: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

fboucquez commented 2 years ago

Thanks baha! I didn't know that. It is transparent for bootstrap then. Docker hub would just need the images.

Https Portal doesn't seem to have arm. We would need to ask for arm, find something similar with arm or fork and build ourselves

yilmazbahadir commented 2 years ago

Np, I think so mate :)

Https Portal doesn't seem to have arm. We would need to ask for arm, find something similar with arm or fork and build ourselves

I think the first one in the google search is not the right one.

Ours should be https://hub.docker.com/r/steveltn/https-portal

And luckily it has the linux/arm64 image :)

image