TRG 4.08 - Multi-platform images
Status | Created | Post-History |
---|---|---|
Active | 01-Sep-2024 | Initial contribution |
Draft | 20-Mar-2024 | Initial contribution |
Why
Providing container images that support multiple CPU architectures enhances flexibility, compatibility, and efficiency across hardware devices.
This is especially beneficial for supporting use cases like tutorials and local playgrounds.
For instance, arm64 images are optimized for ARM-based processors, such as Apple's M1/M2/M3 chips and Amazon's Graviton processors, providing better performance and efficiency compared to emulated or non-native architectures.
Description
Container images should be built for amd64 and arm64 CPU architectures.
Implementation
Make sure to choose a base image, out of the list in TRG 4.02 which is built for amd64 and arm64 CPU architecture, (e.g. eclipse-temurin/tags?page=1&name=21-jre-alpine) and enable the image build workflow: the example workflow from TRG 4.01 contains the necessary steps for building a multi-platform image.
Depending on the multi platform strategies your base image supports, you might need additional enabling, for instance enabling the Dockerfile for cross-compilation or setting up QEMU. Have a look to peer repositories within Tractus-X for inspiration.