cloudposse / geodesic

🚀 Geodesic is a DevOps Linux Toolbox in Docker
https://cloudposse.com/accelerate
Apache License 2.0
937 stars 119 forks source link

Initial support for ARM #837

Closed Nuru closed 1 year ago

Nuru commented 1 year ago

Breaking changes

In addition to the changes listed below, this release may bring unexpected breaking changes, ironically due to support for ARM.

Previously, if you built a Docker image based on Geodesic on an ARM machine like an Apple M1, because Geodesic was only available in linux/amd64 architecture, your build would have been forced into linux/amd64 architecture and your installations, whether from apt-get or other sources, would have had to have been the same linux/amd64 architecture to work. (The build and run of the resulting Docker image would have been run under emulation.) Now, if you are building on an Apple M1 or M2, you will get the Geodesic linux/arm64 architecture (using native, not emulated code for build and execution, with potentially huge performance benefits), and the rest of your Dockerfile will need to be updated to install architecture-specific packages, some of which may not exist. You will need to decide if you want to go on without them or rather stick to linux/amd64 emulation to retain them.

Furthermore, if you built and pushed a Geodesic image in the past, you would always get a single architecture (linux/amd64) image. Now, if you are not careful, you may overwrite that with a linux/arm64 image, causing slowdowns for people using your image on Intel/AMD/X86_64 hardware. If you want to support both architectures in a shared image, you will need to use Docker buildx to generate a multi-platform image.

If you want to avoid all this, you can convert your FROM statement in your Dockerfile from

FROM cloudposse/geodesic:2.0.0-debian

to

FROM --platform=linux/amd64 cloudposse/geodesic:2.0.0-debian

For more information on multi-platform (a.k.a. multi-architecture) builds, see:

what

why

notes

This is our initial support of arm64 and can be expected to have some bugs to shake out.

We are only supporting arm64 on Debian at this time. We will not support it on Alpine. Will consider supporting CentOS (or its successor) if we have sufficient demand.

Geodesic relies heavily on Cloud Posse's packages distribution, and it has not yet been updated to automatically generate arm64 packages. As a result, for most packages, only the latest version is available in arm64. We have historical versions of atmos, kubectl, and terraform published. If you need historical versions of other packages, you can request them by opening an issue in packages, but please consider either staying on amd64 or updating to the latest version of the binary instead. Please also give us a few weeks to get arm64 packages automated.

references

kevcube commented 1 year ago

Cool! Unfortunate that Cloudposse is not migrating Alpine. Why is that? I prefer the alpine package repos because they usually have much more recent versions of software