provide apt package, docker image for linux/arm64 hosts (18.1.0)
Description
Explain in detail the additional functionality you would like to see in stellar-core.
Provide linux/arm64 architecture builds of the apt package and the stellar-core docker images. currently there are only linux/amd64 versions provided.
Explain why this feature is important
For anyone running macbooks with the Apple silicon chips, which are on arm64 ISAs, when running stellar-core docker images, Docker splashes up Warning messages:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
the docker image does appear to still run afterwards though, but wanted to mention this warning output for visibility in case may accrue problems over time.
Also, can't build other Docker images locally that reference the stellar-core apt package from apt.stellar.org , during the Docker build output, after adding apt.stellar.org to apt, apt-get update it fails with:
N: Skipping acquire of configured file 'unstable/binary-arm64/Packages' as repository 'https://apt.stellar.org focal InRelease' doesn't support architecture 'arm64'
N: Skipping acquire of configured file 'stable/binary-arm64/Packages' as repository 'https://apt.stellar.org focal InRelease' doesn't support architecture 'arm64'
apt repo has linux/amd64 binaries, but the Dockerfile build for ubuntu base image is defaulting to host machine arch of linux/arm64, and not finding pkg.
Describe the solution you'd like
would. be convenience if linux/arm64 arch versions were provided for stellar-core docker image and apt pkg.
Describe alternatives you've considered
Maybe brief blurb in Documentation to say ignore WARNING: The requested image's platform does not match ... if running the docker image on newer Apple M1 macs.
For anyone running macbooks with the Apple silicon chips
This would also make it possible to deploy to AWS Graviton instances on EC2.
What's involved in building for this additional target arch? I think we're going to see an increasing need for this as more developers move to the new Apple machines.
Adding support for arm64 would also allow us to ship a linux/arm64 version of quickstart which would make it easier for developers on Apple machines to run quickstart without needing to specify --platform linux/amd64 and, for developers not using Docker Desktop and not using a flavor of container runtime that has multi-arch setup by default, without needing to setup multi-arch docker support.
As a quick reference, stellar-core appears to build and run natively on Apple silicon, and it also appears to build and run natively inside Docker on linux/arm64. I tested the latter by building quickstart's Dockerfile.dev image on an Apple silicon and it worked.
I would love to see linux/amd64 binaries added, currently I'm working on Ubuntu 20.04.4 LTS aarch64 and quickstart seems to be unable to start successfully.
I would love to see linux/amd64 binaries added
@overcat Do you mean linux/arm64? linux/amd64 packages are already available.
I'm working on Ubuntu 20.04.4 LTS aarch64 and quickstart seems to be unable to start successfully
You should be able to run the linux/amd64 quickstart image using the --platform linux/amd64 option on the docker run command. This assumes your Ubuntu environment is setup to support emulation using something like qemu. A quick way to set up emulation inside your docker environment is to run this command:
docker run --rm --privileged aptman/qus -s -- -p
Note that this command will modify the host by loading qemu-user-static as the emulation binary to execute amd64 programs.
I would love to see linux/amd64 binaries added
@overcat Do you mean
linux/arm64?linux/amd64packages are already available.
Yes, linux arm64🙇
The impact of this issue is expanding as we're about to start shipping docker images of soroban-rpc that use debs, and they won't be usable (without emulation) on linux/arm64:
- https://github.com/stellar/soroban-tools/pull/710