Emmanuel Ang
Emmanuel Ang

Reputation: 119

Docker --platform vs. Docker's 'Use Rosetta for x86/amd64 emulation on Apple Silicon' Beta feature

I found an interesting phenomenon which I need help with understanding.

Context

I am trying to run MSSQL Docker container (https://hub.docker.com/_/microsoft-mssql-server).

Machine: Macbook Air
Chip: M1
OS: Ventura 13.3.1 (22E261)

Docker Version 4.19.0 (106363)
Engine: Engine: 23.0.5

Behaviour

If I were to run the image with the --platform flag, it produces this error:

/opt/mssql/bin/sqlservr: Invalid mapping of address 0x400384a000 in reserved address space below 0x400000000000.

However, if I run enable the beta feature 'Use Rosetta for x86/amd64 emulation on Apple Silicon'. I can run without error.

Question

I was looking around to find out what Docker use to emulate the environment to run containers built with a different processor architecture. I have seen information on how emulation is done using QEMU and others saying its Rosetta 2. But if Rosetta is already used for emulation, then:

  1. Why is there a need for this beta feature?

  2. Why is there a different behaviour before and after activating the beta feature? What is this difference?

Upvotes: 1

Views: 1416

Answers (0)

Related Questions