Can I run MATLAB in Docker container on macOS with an Apple Silicon (ARM) processor?

I have a Mac with an Apple Silicon (M‑series) processor running macOS, and I use Docker on this machine. Can I run MATLAB inside a Docker container on this ARM-based system?

 Accepted Answer

Please note: MathWorks does not support using MATLAB or other MathWorks products in this context as it is an unqualified configuration and therefore cannot guarantee that they will function as expected.
You can run MATLAB in a Docker on an Apple Silicon (ARM) Mac, but only by running the container under AMD64 (x86‑64) emulation by specifying the platform with addition of the flag: --platform=linux/amd64. MATLAB container images are x86‑64, and Docker on macOS defaults to ARM, which causes invalid platform errors.
If following our resource to Create a MATLAB Container Image via MathWorks GitHub page found here you might run MATLAB using the below commands, directing Docker to use Rosetta 2 instruction translation.
Build for AMD64:
docker build --platform=linux/amd64 -t matlab:R2025b .
Run the container under AMD64:
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName --platform=linux/amd64 matlab:R2025b -batch ver

More Answers (0)

Categories

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!