docs/multiplatform-images.md
Build, run, and publish container images that support both Apple silicon and x86-64.
Using the project from the tutorial example, you can create an image to use both on Apple silicon Macs and on x86-64 servers.
When building the image, just add --arch options that direct the builder to create an image supporting both the arm64 and amd64 architectures:
container build --arch arm64 --arch amd64 --tag registry.example.com/fido/web-test:latest --file Dockerfile .
Try running the command uname -a with the arm64 variant of the image to see the system information that the virtual machine reports:
When you run the command with the amd64 architecture, the x86-64 version of uname runs under Rosetta translation, so that you will see information for an x86-64 system:
The command to push your multiplatform image to a registry is no different than that for a single-platform image:
container image push registry.example.com/fido/web-test:latest