# Tips for Building Multi-Architecture Containers

- Speaker: [Nati Cohen](/wiki/speakers/nati-cohen.md)
- Event: [Reversim Summit 2024](/wiki/years/2024.md)
- Video: https://www.youtube.com/watch?v=QjYo8eJj0tg
- Transcript: [/transcripts/2024/15-QjYo8eJj0tg.md](/transcripts/2024/15-QjYo8eJj0tg.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Infrastructure](/wiki/topics/infrastructure.md), [Performance](/wiki/topics/performance.md), [DevOps](/wiki/topics/devops.md), [Cloud Computing](/wiki/topics/cloud.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk explores the motivations and practical tips for building multi-architecture containers supporting both x86 and ARM processors. The speaker highlights that ARM-based instances in the cloud are generally cheaper, more energy-efficient, and offer better performance while also easing local development on ARM laptops like MacBooks. The session guides developers on leveraging Docker's image index and provides actionable advice to troubleshoot and streamline the migration process. Ultimately, the audience learns how to modernize their container builds to cut cloud costs and improve developer experience.

## Key points

- [0:13](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=13s) Containers can be built for multiple architectures including x86 and ARM, which is supported natively through Docker image indexes.
- [0:13](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=13s) Building containers for ARM offers benefits such as lower cloud costs, higher performance, less heat emission, and better compatibility with ARM-based laptops.
- [2:00](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=120s) Docker image indexes act as a tag pointing to multiple images behind the scenes, allowing Docker pull to automatically fetch the correct image for the host machine.
- [3:00](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=180s) The first practical tip when building for ARM is to run builds without cache to establish a baseline for build times, warnings, and image size.
- [4:00](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=240s) The second tip is to reduce technical debt in the Dockerfile by updating base images, application dependencies, and runtimes to newer versions.
- [4:00](https://www.youtube.com/watch?v=QjYo8eJj0tg&t=240s) Upgrading dependencies often helps the Dockerfile build smoothly for ARM and enables modern CPU extensions for better performance.

## Takeaways

- Migrate container builds to support ARM architecture to reduce cloud infrastructure costs and power consumption.
- Benchmark your container builds without cache before making changes to accurately track build times and image sizes.
- Address technical debt in base images and runtimes to ensure smoother multi-architecture compilation and better performance.

## Questions this talk answers

- Why should developers build containers for ARM architectures in addition to x86?
- How does Docker handle pulling the correct image for different processor architectures?
- What steps can be taken to resolve issues and technical debt when migrating a Dockerfile to support ARM?

## Technologies

Docker, AWS, Ubuntu

## Tags

arm architecture, cloud costs, containers, developer experience, docker, performance optimization
