Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker (Apple Silicon/M1 Preview) MySQL "no matching manifest for linux/arm64/v8 in the manifest list entries"

I'm running the latest build of the Docker Apple Silicon Preview. I created the tutorial container/images and it works fine. When I went to create a custom YAML file and run docker-compose I get the following error when pulling mysql:

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

Here is a snippet from my YAMl file:

version: '3'

services:
  # Database
  db:
    image: mysql-server:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: pass
      MYSQL_DATABASE: wp
      MYSQL_USER: wp
      MYSQL_PASSWORD: wp
    networks:
      - wpsite 

I've tried :latest and :8 which result in the same error. It pulls phpmyadmin and wordpress fine.

like image 530
Sam Avatar asked Dec 26 '20 13:12

Sam


3 Answers

Well, technically it will not solve your issue (running MySQL on ARM), but for the time being, you could add platform to your service like:

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

Alternatively, consider using MariaDB, which should work as a drop-in replacement like e.g. this:

services:
  db:
    image: mariadb:10.5.8
    ...

Both ways work for me on M1 with the Docker Preview

like image 191
Stefan W Avatar answered Nov 12 '22 06:11

Stefan W


same problem for m1 mac just run this command

docker pull --platform linux/x86_64 mysql
like image 39
mstgnz Avatar answered Nov 12 '22 05:11

mstgnz


From this answer, I added this to my local docker-compose.override.yml

services:

  mysql:
    platform: linux/amd64
like image 114
Luke Madhanga Avatar answered Nov 12 '22 05:11

Luke Madhanga