how do I modify docker-compose.yml to download mysql 5.6 for an apple m2 silicon running Ventura OSX 13?

248 Views Asked by At

I have a docker-compose.yml file that looks like:

version: '3'
services:

  mysql:
    image: dtr.s-9.us/mysql:5.6
    restart: always
    environment:
      MYSQL_DATABASE: 'mydb'
      MYSQL_ROOT_PASSWORD: 'mypassword'
    ports:
      - '3306:3306'
    volumes:
      - ./mydb_dump:/docker-entrypoint-initdb.d

  adminer:
    image: adminer
    restart: always
    ports:
      - 7080:8080

I'm am running an Apple Silicon M2 MacPro, and when I ran docker-compose up a month ago, everything worked perfectly (both the mysql 5.6 image and the adminer image downloaded successfully).

A month later (still Apple Silicon M2 MacPro), I re-run docker-compose up and I get the following error:

docker-compose up
[+] Running 4/1
 ✔ Network mydb_default                                                                                                                              Created                                                                           0.1s 
 ✔ Container mydb-mysql-1                                                                                                                            Created                                                                           0.0s 
 ✔ Container mydb-adminer-1                                                                                                                          Created                                                                           0.0s 
 ! mysql The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested                                                                                   0.0s 
Attaching to mydb-adminer-1, mydb-mysql-1
mydb-mysql-1    | exec /usr/local/bin/docker-entrypoint.sh: exec format error
mydb-adminer-1  | [Thu Jun  8 23:38:55 2023] PHP 7.4.33 Development Server (http://[::]:8080) started
mydb-mysql-1 exited with code 0
mydb-mysql-1 exited with code 1
mydb-mysql-1 exited with code 1
mydb-mysql-1 exited with code 1

My hunch is there is a problem with this line in docker-compose.yml:

   image: dtr.s-9.us/mysql:5.6    <-- perhaps https://dtr.s-9us registry is down?

When I try to hit https://dtr.s-9us in my web browser it appears to be down. Could this be the problem? If so, is there another docker registry that has mysql 5.6 for Apple M2 silicon?

FYI: If the change the above line to:

image: mysql:8

it succesfully downloads MySQL 8.0 for Apple M2 Silicon, which is nice, but that's not the version I need ( I need the same MySQL 5.6 docker image for Apple M2 I downloaded a month ago).

0

There are 0 best solutions below