Docker
Docker on Apple Silicon Mac: How to Run x86 Containers with Rosetta 2
Running x86 containers on Apple Silicon Macs just got easier thanks to newly added Docker’s Rosetta support. Discover how to use it in this guide.

Finally, the popular containerization platform Docker has implemented a new feature that allows running images built for the x86 architecture on Macs utilizing the Apple Rosetta 2 emulator/translator.
This means that users can now run their pre-existing x86-based Docker images on Macs featuring Apple Silicon processors without the need for rebuilding them or utilizing QEMU emulation.
Prior to this feature, the only option for running x86-based Docker images on Macs with Apple Silicon processors was through QEMU emulation, which could often result in compatibility issues and runtime crashes with particular images. However, with the integration of Rosetta 2 support, users can now expect a smoother experience when running their x86-based Docker images on Apple Silicon Mac systems.
Not only is the new Rosetta 2 feature built directly into the operating system, but it also eliminates the need for additional setup or configuration, making it even more user-friendly. Additionally, as Rosetta 2 is specifically designed by Apple for the macOS operating system and thanks to the optimizations Apple has integrated into its Apple Silicon CPUs, it is expected to provide improved performance and compatibility compared to QEMU emulation.
How to enable Rosetta 2 virtualization feature in Docker Desktop
To enable the new Rosetta virtualization feature in Docker, first make sure you have updated to the latest version of the Docker Desktop app. Go to the Software updates section in the app settings and install any available updates. At the time of writing this story, the latest version was 4.16.1.

Next, go to the General section and check the box to enable the Apple Virtualization framework.

Finally, in the Feature in development section, enable Rosetta.

After changing these settings, the Docker Desktop app may restart before becoming available again.
That’s it. You’re ready to go.
I’ve received reports in which some users couldn’t see the “Use Rosetta” option in the “Features in development” section. That’s because sometimes Docker must be updated multiple times until the latest version is reached, and it cannot be updated directly to the latest version but must pass through the intermediate ones first. So, please make sure you have installed version 4.16 or later when updating.
Run x86 containers with Rosetta
If you want to build and run x86 container images using Rosetta, use the platform flag as in the following commands:
docker build --platform linux/amd64 -t my_container_image .
docker run --platform linux/amd64 my_container_image
Notice how you could use the same commands even without having enabled the Virtualization framework and Rosetta emulation. In that case the containers would be run through the QEMU emulator.
Conclusion
The inclusion of Rosetta 2 support in Docker for Mac is a major advancement that allows for a more seamless and efficient experience when running x86-based Docker images on Macs with Apple Silicon processors, and will help smooth out the transition to new ARM Macs.
On a side not, even though the feature is still listed as in development I haven’t personally noticed any issues with the container images I’ve tried.
Let me know in the comments whether you’ve noticed performance improvements when running your x86 container through the Rosetta emulation compared to QEMU, or if you’ve encountered issues with it.
Then, if you’re curious about deploying your containers in Kubernetes, I’d recommend checking out kind. It’s a really handy tool that lets you run an entire K8s cluster within a single Docker container. Yes, that is running containers inside containers:
I actually wrote this story about it, detailing how I use it to run both ARM and x86 containers simultaneously with the help of Rosetta 2, and shared some useful tips.
Further reading
If you liked 👏 this article you may enjoy reading through some of my other articles. Oh, and don’t forget to follow me! 🫵
Consider becoming a Medium member through my referral link if you appreciate reading stories from me. You get a 1-month free trial that gives you unlimited access to all Medium content. 🎁
Level Up Coding
Thanks for being a part of our community! Before you go:
- 👏 Clap for the story and follow the author 👉
- 📰 View more content in the Level Up Coding publication
- 🔔 Follow us: Twitter | LinkedIn | Newsletter
🚀👉 Join the Level Up talent collective and find an amazing job






