Skip to content

Building Docker images for Apple Silicon (or not)

| As mentioned in the setup guide for OSX, the Docker images built for x86-64/amd64 systems sometimes don’t play nicely with Apple Silicon (arm64) laptops, despite Rosetta 2 forming a translation layer between the two architectures. | In an ideal world, you would build two different images for both architectures, but in case this is not feasible, make sure to specify the platform when defining your base image:

Terminal window
FROM --platform=linux/amd64 <image>

This ensures that Docker on OSX will for sure use Rosetta 2 to translate the image to the correct architecture. Without it, it can be hit or miss.