Docker on Apple Silicon Mac

How to run Docker on Apple Silicon Mac #

Install Rosetta #

% softwareupdate --install-rosetta --agree-to-license

Enable Rosetta #

  1. Open Docker Desktop
  2. Extensions ︙ > Settings > Features in development
  3. Check Use Rosetta for x86/amd64 emulation on Apple Silicon

docker run #

Add the following option to docker run command.

--platform linux/x86_64

docker-compose.yml #

Add platform under container name.

    platform: linux/amd64