I’m trying to install mysql on docker with the command:
" docker run --name mysqlbd1 -e MYSQL_ROOT_PASSWORD=bootcamp -p
“3307:3306” -d mysql "
but it comes back with the following message and I don’t know what else to do:
" Unable to find image ‘mysql:latest’ locally
latest: Pulling from library/mysql
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See ‘docker run --help’. "
I’m using a Macbook Air M1 and I’m starting to study development. Thanks
mysql was one of the first image I tried on my new Mac but MySQL doesn’t support ARM containers. You can try to run it with the platform option:
docker run --platform linux/amd64 ...
I think it did not work me either. I am not sure, so you should try it. If it doesnt work, you can try mariadb which is similar to mysql and supports ARM containers
My Docker environment is really acting up - perhaps you have experience with that ?
√ sten % docker compose build db
Sending build context to Docker daemon 428B
Step 1/6 : FROM mysql:8.0.27
8.0.27: Pulling from library/mysql
1 error occurred:
* Status: no matching manifest for linux/arm64/v8 in the manifest list entries, Code: 1
So - then I pull mysql for the platform (M1’s should be able to run amd64 AFAIK)
?1 sten % docker pull --platform=linux/amd64 mysql:8.0.27
8.0.27: Pulling from library/mysql
Digest: sha256:e9027fe4d91c0153429607251656806cc784e914937271037f7738bd5b8e7709
Status: Downloaded newer image for mysql:8.0.27
docker.io/library/mysql:8.0.27
√ sten % docker compose build db
Sending build context to Docker daemon 428B
Step 1/6 : FROM mysql:8.0.27
---> 3218b38490ce
Step 2/6 : COPY ./my.cnf /etc/mysql/conf.d/my.cnf
---> Using cache
---> 55f64854d0bb
Step 3/6 : RUN mkdir -p /var/log/mysql
---> Using cache
---> 48f15258c87f
Step 4/6 : RUN chown mysql:mysql /var/log/mysql
---> Using cache
---> 308c3403f425
Step 5/6 : RUN mkdir -p /var/run/mysql
---> Using cache
---> 1dcb4fef4c77
Step 6/6 : RUN chown mysql:mysql /var/run/mysql
---> Using cache
---> fc59695bc113
Successfully built fc59695bc113
Successfully tagged mysql_db:latest
And then I believe all is good - but sadly not!
√ sten % docker compose up db
[+] Running 0/1
⠿ db Error 1.8s
Sending build context to Docker daemon 428B
Step 1/6 : FROM mysql:8.0.27
8.0.27: Pulling from library/mysql
1 error occurred:
* Status: no matching manifest for linux/arm64/v8 in the manifest list entries, Code: 1