2

I'm trying to get the official mysql docker image to run on apple silicon.

It does compose and boot up, but it only has 1 log entry and does not do anything else afterwards:

2021-08-04 14:39:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.35-1debian10 started.

My docker-compose file looks like this:

  database:
    platform: linux/amd64 // I also tried linux/x86_64
    image: mysql:5.7.35
    ports:
        - 3306:3306
    volumes:
        - ./mysql/create_dbs.sql:/docker-entrypoint-initdb.d/create_dbs.sql
    environment:
      - MYSQL_ROOT_PASSWORD=
      - MYSQL_DATABASE=cars
      - MYSQL_USER=cars
      - MYSQL_PASSWORD=cars
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes

Is there something else that needs to be done in order to get it working?

ffritz
  • 2,180
  • 1
  • 28
  • 64
  • 1
    I've stumbled across the issue back then, as well. My solution back then was to switch to MariaDB as there wasn't any limitation for my use case (see: https://stackoverflow.com/a/65592942/9893114). However, for your use case, I would recommend to delete the volume between your restarts in order to ensure that it doesn't break because of existing files he can't process (due to the architecture change). That would be: `docker volume ls` and `docker volume rm `. Cheers. – Marc André Freiheit Aug 05 '21 at 11:13

0 Answers0