Paulund

Docker ARM64 Images on M1 Macs

I recently upgraded to a new Macbook pro m1 and when running docker I was getting the following error:

ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

This happened when running a mysql image, I needed to define the platform to be linux/amd64.

Within the docker-compose.yml file I added the following:

services:
  db:
    platform: linux/x86_64
    image: mysql:5.7

This resolved the issue for the time being. If you're not using docker compose you can add the --platform linux/amd64 flag to the docker run command.

docker pull --platform linux/x86_64 mysql

If you work on a project with other developers that might not need to property then you could build your own docker-compose file but using the docker-compose.override.yml file.

services:

  mysql:
    platform: linux/amd64