With new M1 / M2 MacBooks from Apple, the "new"
arm64 architecture began to dominate the laptop market. In this short article, we describe how developers could help the open-source ecosystem to adopt their Docker images to the new platforms.
Developers with M1 / M2 MacBooks using Docker need support for the new
arm64 architecture processors. For project maintainers, it means that instead of a single
amd64 platform image, they must build several once for
arm64 platforms. It requires adopting their current CI tools to build multiple images and expose them within a single Docker manifest (under a specific tag name). This process is time-consuming and requires much effort, especially in open-source world.
It required the following steps:
I would suggest using GitHub Actions, there you can use the official suite of docker actions to build multiplatform images with little need for custom scripting .
Provide PRs with a working solution (in our case, we use Docker Maven Plugin to manage
buildxcontainer that builds and pushes images):
The Apache project owner needs to raise an issue to Apache Software Foundation infrastructure team to enable GH actions secrets for pushing docker hub images e.g INFRA-23983.
Once all ready, PRs can be merged.
Summarizing, adding support for the
arm64 platform in open-source projects is not a complex work. Satisfaction from being the ASF contributor is worth spending a few hours after your everyday routines.