RomeoHY
RomeoHY

Reputation: 59

Error when running mysql 8.0 container using docker-compose

I am trying to run mysql 8.0 image on m1 mac using docker-compose I was able to do it till few months ago, but now i am getting an error and i can't I am using m1 macbook (ventura)

First, I ran docker with colima.

colima start --memory 4 --arch x86_64

And in the docker-file.yml, I declared the following

version: "3"

services:
  testdb:
    image: mysql:8.0
    platform: linux/x86_64
    container_name: testdb
    restart: always
    ports:
      - "3310:3306"
    volumes:
      - './local_env/db/utf8.cnf:/etc/mysql/conf.d/my.cnf'
      - './local_env/db/sql:/docker-entrypoint-initdb.d'
    environment:
      MYSQL_ROOT_PASSWORD: rootpw
      MYSQL_DATABASE: test_database
      MYSQL_USER: tester
      MYSQL_PASSWORD: qwerrr

And then I ran it using the docker-compose command.

docker-compose -f docker-file.yml up

then print error

Fatal glibc error: CPU does not support x86-64-v2

My question is

  1. Is it impossible to run x86_64 on an m1 mac?
  2. Some people try to change it to arm64, but that doesn't work either.

Is there any other way?

I tried running it with arm64 and still got the error

Upvotes: 3

Views: 648

Answers (0)

Related Questions