Why does Docker Desktop on M1 require Rosetta if it uses QEMU for emulation?
Asked Answered
C

1

11

When installing Docker Desktop for Apple Silicon, the official instructions says:

You must install Rosetta 2 as some binaries are still Darwin/AMD64.

However, if I understand correctly, Intel-based containers actually use QEMU for emulation rather than Rosetta:

However, attempts to run Intel-based containers on Apple Silicon machines under emulation can crash as qemu sometimes fails to run the container.

(This is one of the reasons why Docker is slow when running non-native containers on M1.)

So what does Docker actually use Rosetta for?

Chaucerian answered 6/11, 2021 at 2:52 Comment(2)
Rosetta is for AMD64 binaries of Docker itself, QEMU is for running the containersStormproof
@Stormproof your comment seems to be the actual answerAddis
W
2

Rosetta was used to run Docker itself but according to the release notes, since version 4.3.0:

Docker Desktop on Apple silicon no longer requires Rosetta 2.

There is two exceptions in the known issues:

Some command line tools do not work when Rosetta 2 is not installed.

  • The old version 1.x of docker-compose. Use Compose V2 instead.
  • The docker-credential-ecr-login credential helper.

For containers, qemu is used but there is an open issue to run x86-64 containers with Rosetta.

To run x86-64 containers on Apple M1, you can install a x86-64 version of podman an run it with Rosetta.

Weathers answered 24/9, 2023 at 20:41 Comment(1)
Colima supports rosetta as well.Rillis

© 2022 - 2024 — McMap. All rights reserved.