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.
asked Dec 26, 2020 at 13:20
7
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
answered Jan 6, 2021 at 9:04
Stefan WStefan W
6,2761 gold badge5 silver badges2 bronze badges
19
same problem for m1 mac just run this command
docker pull --platform linux/x86_64 mysql
answered May 2, 2021 at 21:12
mstgnzmstgnz
2,4181 gold badge9 silver badges11 bronze badges
4
From this answer, I added this to my local docker-compose.override.yml
services:
mysql:
platform: linux/amd64
answered Aug 15, 2021 at 12:24
Luke MadhangaLuke Madhanga
6,4232 gold badges42 silver badges45 bronze badges
5
Oracle maintains a MySQL 8.0.23 docker image for arm64.
https://hub.docker.com/r/mysql/mysql-server
To use it in your docker-compose file
version: "3.8"
services:
mysql:
container_name: mycontainername
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mydatabasename
MYSQL_ROOT_HOST: "%"
command: --lower_case_table_names=1
answered Feb 12, 2021 at 5:34
bpossolobpossolo
8004 silver badges6 bronze badges
8
Docker on its official documentation says:
Not all images are available for ARM64 architecture. You can add
--platform linux/amd64
to run an Intel image under emulation. In
particular, the mysql image is not available for ARM64. You can work
around this issue by using a mariadb image.
(source here)
So what you should do to make your project work is to add platform: linux/amd64
to your docker-compose.yml.
It would look like:
services:
mysql:
image: mysql:5.7
platform: linux/amd64
...
As you can imagine probably the performance won’t be the same.
answered Jan 18, 2022 at 13:01
octaedrooctaedro
5695 silver badges8 bronze badges
I had a similar issue, solved with this line in my dockerfile:
before
FROM ubuntu:18.04
after
FROM --platform=linux/x86_64 ubuntu:18.04
answered Jan 24, 2021 at 22:14
1
This works for me in mac M1, specifying platform key inside service.
services:
mysql:
platform: linux/amd64
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
ports:
- 3306:3306
answered Apr 7, 2022 at 15:36
Ashwin JAshwin J
6427 silver badges12 bronze badges
For anyone struggling to make it work with a specific version, the following didn’t work for me:
docker run --platform linux/x86_64 mysql:5.7.26 -e MYSQL_ROOT_PASSWORD=pass
but this did:
docker run --platform linux/x86_64 mysql:5.7 -e MYSQL_ROOT_PASSWORD=pass
Dharman♦
29.3k21 gold badges80 silver badges131 bronze badges
answered Apr 28, 2021 at 22:03
Hugo samaHugo sama
8791 gold badge9 silver badges19 bronze badges
can try start/run a container (for mac m1)
docker run -d -p 3306:3306 --name mysql --platform linux/x86_64 --env MYSQL_ROOT_PASSWORD=12345 mysql
answered Nov 12, 2021 at 1:54
khoikhoi
8001 gold badge11 silver badges29 bronze badges
0
Please refer to the following link for known issues. In your Mac’s terminal run
softwareupdate --install-rosetta
and then in docker-compose have something along the lines of
mysql_gdpr:
platform: linux/x86_64
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "user_security"
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_USER: "security"
MYSQL_PASSWORD: "pleasechangeit"
answered Apr 12, 2021 at 8:52
ViswanathViswanath
1,30312 silver badges25 bronze badges
2
Please note that when using --platform linux/x86_64
on arm64/v8 you may lose Linux Native AIO support.
Check out the docker container logs:
[ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
[Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
Consider using mysql/mysql-server instead, as it has arm64/v8 support out of the box.
answered Jan 9, 2022 at 21:43
This Github repo allows to build a MySQL 5.7 aarch64 image.
Building it with the following command (naming it the same as the official mysql:5.7 image) it will be used by default by all your docker-compose configurations or Dockerfiles that specify mysql:5.7.
docker build -t mysql:5.7 .
It means that you won’t have updates from the official MySQL Dockerhub repo anymore, but as a temporary drop-in replacement I find it useful.
answered Jan 13, 2022 at 12:59
SimonSimon
3,4602 gold badges21 silver badges24 bronze badges
I’ve also encountered this issue on M1 Pro and to solve the most stable way for me was to disable buildkit in the Docker engine settings, meaning setting to false instead the default true. There is also an open issue here https://github.com/docker/for-mac/issues/5873
answered Apr 7, 2022 at 19:41
Elio ErminiElio Ermini
2895 silver badges19 bronze badges
Using this below image solved my problem.
mysql/mysql-server:8.0.23
answered Jun 28, 2022 at 14:13
Gokce DemirGokce Demir
4193 silver badges5 bronze badges
In your Dockerfile
for mysql if you have the following
FROM mysql:8.0.28
change it to
FROM --platform=linux/x86_64 mysql:8.0.28
because the Docker in Apple M1 is going to look for an ARM image, and MySQL doesn’t publish ARM images, so that’s why you are getting
failed to solve with frontend dockerfile.v0: failed to create LLB
definition: no match for platform in manifest
with the --platform
flag, even though we are in ARM processor we are telling docker that we want to use the x86_64
image
answered Oct 25, 2022 at 20:38
ShobiShobi
9,6616 gold badges44 silver badges78 bronze badges
Look at this github post
Since «Oracle only supplies pre-compile Arm64» binaries, you have it there with
Image —> mysql:8.0-oracle
docker run -d —name mysql-8 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<your_password> mysql:8.0-oracle
danronmoon
3,7545 gold badges33 silver badges56 bronze badges
answered Apr 21, 2022 at 18:16
Sumit SSumit S
4435 silver badges10 bronze badges
Change the platform in docker command
Param : —platform linux/x86_64
answered May 17, 2022 at 6:47
This is for anyone who is here for the same issue but with the ibmcom/db2
You can use the below command to pull the db2 image
docker pull --platform linux/x86_64 ibmcom/db2:latest
answered May 24, 2022 at 12:21
I have the M1 chip.
Today I found this works fine in the latest KSQL master branch. Here’s the commands
git clone https://github.com/confluentinc/ksql.git
cd ksql
docker-compose up -d
It magically brings up the Zookeeper, three instances of Kafka server, a Schema Registry and a CLI.
Reference:
KSQLDB Docker Guide
answered Feb 3 at 7:30
SydMKSydMK
4154 silver badges9 bronze badges
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.
asked Dec 26, 2020 at 13:20
7
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
answered Jan 6, 2021 at 9:04
Stefan WStefan W
6,2761 gold badge5 silver badges2 bronze badges
19
same problem for m1 mac just run this command
docker pull --platform linux/x86_64 mysql
answered May 2, 2021 at 21:12
mstgnzmstgnz
2,4181 gold badge9 silver badges11 bronze badges
4
From this answer, I added this to my local docker-compose.override.yml
services:
mysql:
platform: linux/amd64
answered Aug 15, 2021 at 12:24
Luke MadhangaLuke Madhanga
6,4232 gold badges42 silver badges45 bronze badges
5
Oracle maintains a MySQL 8.0.23 docker image for arm64.
https://hub.docker.com/r/mysql/mysql-server
To use it in your docker-compose file
version: "3.8"
services:
mysql:
container_name: mycontainername
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mydatabasename
MYSQL_ROOT_HOST: "%"
command: --lower_case_table_names=1
answered Feb 12, 2021 at 5:34
bpossolobpossolo
8004 silver badges6 bronze badges
8
Docker on its official documentation says:
Not all images are available for ARM64 architecture. You can add
--platform linux/amd64
to run an Intel image under emulation. In
particular, the mysql image is not available for ARM64. You can work
around this issue by using a mariadb image.
(source here)
So what you should do to make your project work is to add platform: linux/amd64
to your docker-compose.yml.
It would look like:
services:
mysql:
image: mysql:5.7
platform: linux/amd64
...
As you can imagine probably the performance won’t be the same.
answered Jan 18, 2022 at 13:01
octaedrooctaedro
5695 silver badges8 bronze badges
I had a similar issue, solved with this line in my dockerfile:
before
FROM ubuntu:18.04
after
FROM --platform=linux/x86_64 ubuntu:18.04
answered Jan 24, 2021 at 22:14
1
This works for me in mac M1, specifying platform key inside service.
services:
mysql:
platform: linux/amd64
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
ports:
- 3306:3306
answered Apr 7, 2022 at 15:36
Ashwin JAshwin J
6427 silver badges12 bronze badges
For anyone struggling to make it work with a specific version, the following didn’t work for me:
docker run --platform linux/x86_64 mysql:5.7.26 -e MYSQL_ROOT_PASSWORD=pass
but this did:
docker run --platform linux/x86_64 mysql:5.7 -e MYSQL_ROOT_PASSWORD=pass
Dharman♦
29.3k21 gold badges80 silver badges131 bronze badges
answered Apr 28, 2021 at 22:03
Hugo samaHugo sama
8791 gold badge9 silver badges19 bronze badges
can try start/run a container (for mac m1)
docker run -d -p 3306:3306 --name mysql --platform linux/x86_64 --env MYSQL_ROOT_PASSWORD=12345 mysql
answered Nov 12, 2021 at 1:54
khoikhoi
8001 gold badge11 silver badges29 bronze badges
0
Please refer to the following link for known issues. In your Mac’s terminal run
softwareupdate --install-rosetta
and then in docker-compose have something along the lines of
mysql_gdpr:
platform: linux/x86_64
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "user_security"
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_USER: "security"
MYSQL_PASSWORD: "pleasechangeit"
answered Apr 12, 2021 at 8:52
ViswanathViswanath
1,30312 silver badges25 bronze badges
2
Please note that when using --platform linux/x86_64
on arm64/v8 you may lose Linux Native AIO support.
Check out the docker container logs:
[ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
[Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
Consider using mysql/mysql-server instead, as it has arm64/v8 support out of the box.
answered Jan 9, 2022 at 21:43
This Github repo allows to build a MySQL 5.7 aarch64 image.
Building it with the following command (naming it the same as the official mysql:5.7 image) it will be used by default by all your docker-compose configurations or Dockerfiles that specify mysql:5.7.
docker build -t mysql:5.7 .
It means that you won’t have updates from the official MySQL Dockerhub repo anymore, but as a temporary drop-in replacement I find it useful.
answered Jan 13, 2022 at 12:59
SimonSimon
3,4602 gold badges21 silver badges24 bronze badges
I’ve also encountered this issue on M1 Pro and to solve the most stable way for me was to disable buildkit in the Docker engine settings, meaning setting to false instead the default true. There is also an open issue here https://github.com/docker/for-mac/issues/5873
answered Apr 7, 2022 at 19:41
Elio ErminiElio Ermini
2895 silver badges19 bronze badges
Using this below image solved my problem.
mysql/mysql-server:8.0.23
answered Jun 28, 2022 at 14:13
Gokce DemirGokce Demir
4193 silver badges5 bronze badges
In your Dockerfile
for mysql if you have the following
FROM mysql:8.0.28
change it to
FROM --platform=linux/x86_64 mysql:8.0.28
because the Docker in Apple M1 is going to look for an ARM image, and MySQL doesn’t publish ARM images, so that’s why you are getting
failed to solve with frontend dockerfile.v0: failed to create LLB
definition: no match for platform in manifest
with the --platform
flag, even though we are in ARM processor we are telling docker that we want to use the x86_64
image
answered Oct 25, 2022 at 20:38
ShobiShobi
9,6616 gold badges44 silver badges78 bronze badges
Look at this github post
Since «Oracle only supplies pre-compile Arm64» binaries, you have it there with
Image —> mysql:8.0-oracle
docker run -d —name mysql-8 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<your_password> mysql:8.0-oracle
danronmoon
3,7545 gold badges33 silver badges56 bronze badges
answered Apr 21, 2022 at 18:16
Sumit SSumit S
4435 silver badges10 bronze badges
Change the platform in docker command
Param : —platform linux/x86_64
answered May 17, 2022 at 6:47
This is for anyone who is here for the same issue but with the ibmcom/db2
You can use the below command to pull the db2 image
docker pull --platform linux/x86_64 ibmcom/db2:latest
answered May 24, 2022 at 12:21
I have the M1 chip.
Today I found this works fine in the latest KSQL master branch. Here’s the commands
git clone https://github.com/confluentinc/ksql.git
cd ksql
docker-compose up -d
It magically brings up the Zookeeper, three instances of Kafka server, a Schema Registry and a CLI.
Reference:
KSQLDB Docker Guide
answered Feb 3 at 7:30
SydMKSydMK
4154 silver badges9 bronze badges
Here’s what I’m seeing in the Kibana logs in Docker Desktop:
Upgrade
natea
mist-ce_kibana_1
kibana:5.6.10
EXITED (2)
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x4cb21f, 0x9)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
/usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
/usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
/usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
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.
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
same problem for m1 mac just run this command
docker pull --platform linux/x86_64 mysql
From this answer, I added this to my local docker-compose.override.yml
services:
mysql:
platform: linux/amd64
Oracle maintains a MySQL 8.0.23 docker image for arm64.
https://hub.docker.com/r/mysql/mysql-server
To use it in your docker-compose file
version: "3.8"
services:
mysql:
container_name: mycontainername
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mydatabasename
MYSQL_ROOT_HOST: "%"
command: --lower_case_table_names=1
Docker on its official documentation says:
Not all images are available for ARM64 architecture. You can add
--platform linux/amd64
to run an Intel image under emulation. In
particular, the mysql image is not available for ARM64. You can work
around this issue by using a mariadb image.
(source here)
So what you should do to make your project work is to add platform: linux/amd64
to your docker-compose.yml.
It would look like:
services:
mysql:
image: mysql:5.7
platform: linux/amd64
...
As you can imagine probably the performance won’t be the same.
I had a similar issue, solved with this line in my dockerfile:
before
FROM ubuntu:18.04
after
FROM --platform=linux/x86_64 ubuntu:18.04
This works for me in mac M1, specifying platform key inside service.
services:
mysql:
platform: linux/amd64
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
ports:
- 3306:3306
For anyone struggling to make it work with a specific version, the following didn’t work for me:
docker run --platform linux/x86_64 mysql:5.7.26 -e MYSQL_ROOT_PASSWORD=pass
but this did:
docker run --platform linux/x86_64 mysql:5.7 -e MYSQL_ROOT_PASSWORD=pass
can try start/run a container (for mac m1)
docker run -d -p 3306:3306 --name mysql --platform linux/x86_64 --env MYSQL_ROOT_PASSWORD=12345 mysql
Please refer to the following link for known issues. In your Mac’s terminal run
softwareupdate --install-rosetta
and then in docker-compose have something along the lines of
mysql_gdpr:
platform: linux/x86_64
image: mysql/mysql-server:8.0.23
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "user_security"
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_USER: "security"
MYSQL_PASSWORD: "pleasechangeit"
Please note that when using --platform linux/x86_64
on arm64/v8 you may lose Linux Native AIO support.
Check out the docker container logs:
[ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
[Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
Consider using mysql/mysql-server instead, as it has arm64/v8 support out of the box.
I’ve also encountered this issue on M1 Pro and to solve the most stable way for me was to disable buildkit in the Docker engine settings, meaning setting to false instead the default true. There is also an open issue here https://github.com/docker/for-mac/issues/5873
Look at his github post
Since «Oracle only supplies pre-compile Arm64» binaries, you have it there with
Image —> mysql:8.0-oracle
docker run -d —name mysql-8 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<your_password> mysql:8.0-oracle
Using this below image solved my problem.
mysql/mysql-server:8.0.23
In your Dockerfile
for mysql if you have the following
FROM mysql:8.0.28
change it to
FROM --platform=linux/x86_64 mysql:8.0.28
because the Docker in Apple M1 is going to look for an ARM image, and MySQL doesn’t publish ARM images, so that’s why you are getting
failed to solve with frontend dockerfile.v0: failed to create LLB
definition: no match for platform in manifest
with the --platform
flag, even though we are in ARM processor we are telling docker that we want to use the x86_64
image
This Github repo allows to build a MySQL 5.7 aarch64 image.
Building it with the following command (naming it the same as the official mysql:5.7 image) it will be used by default by all your docker-compose configurations or Dockerfiles that specify mysql:5.7.
docker build -t mysql:5.7 .
It means that you won’t have updates from the official MySQL Dockerhub repo anymore, but as a temporary drop-in replacement I find it useful.
Attempts to run x86 containers on M1 machines under emulation can crash. Even when the containers do run correctly under emulation, they will be slower and use more memory than the native equivalent. From here https://docs.docker.com/desktop/mac/apple-silicon/#known-issues
Change the platform in docker command
Param : —platform linux/x86_64
This is for anyone who is here for the same issue but with the ibmcom/db2
You can use the below command to pull the db2 image
docker pull --platform linux/x86_64 ibmcom/db2:latest
I have the M1 chip.
Today I found this works fine in the latest KSQL master branch. Here’s the commands
git clone https://github.com/confluentinc/ksql.git
cd ksql
docker-compose up -d
It magically brings up the Zookeeper, three instances of Kafka server, a Schema Registry and a CLI.
Reference:
KSQLDB Docker Guide
Still getting this error on M2 Macbook pro, tried all the solutions in the comments. Any leads?
Comments Section
And have the MySQL maintainers pushed an image for that architecture?
There are only amd64 images… mysql Tags — Docker Hub
Strange, I believe MySQL supports ARM Source: mysqlonarm.github.io/Running-MySQL-on-ARM
@AkihitoKIRISAKI hub.docker.com/r/mysql/mysql-server/… (server) looks the same but that will install.
@Sam
mysql-server:5.7
version is quite too old to support arm64! hub.docker.com/layers/mysql/mysql-server/5.7/images/…
Same thing i did for «percona» image(mysql on steroids) also. Thank you!
docs.docker.com/docker-for-mac/apple-m1 I see the documentation has been updated to include instructions for running under emulation (platform linux/amd64 flag) and to encourage mariadb support.
For docker (without compose) you can do:
docker run --platform linux/x86_64 mysql
which pulls and runs the correct images on an M1 too. Thank you so much for this post!
Can i suggest you to change the mysql version to 8 ? The edit is to short for be submitted
This workd great you just have to add this to your mysql docker file for laradock FROM —platform=linux/x86_64 mysql:${MYSQL_VERSION}
Just Adding
platform: linux/x86_64
does the trick.
@AlexShtromberg — this should work also on Intel machines, as it’s a x86 architecture…
Rosetta is the way to go, thanks! docs.docker.com/docker-for-mac/apple-silicon
worked on mac mini m1 altough I had to add v8:
linux/x86_64/v8
Worked like a charm, Mac Mimi M1, thank you!
Worked for me MacBook Pro (13-inch, M1, 2020)
this actually made it for me. m1 pro 14»
I also used
command: --default-authentication-plugin=mysql_native_password
based on stackoverflow.com/a/52789430/332798
worked fine to me to. MacBook Pro m1
Thanx … Worked on Mac M1 Pro
Worked for me. Mac Air M1 2020 Big Sur. I tried the chose answer but I was warned that emulating linux/x86_64 could generate errors ou memory overhead. Thank U very much.
M1 pro, tried the answers above, no luck, but this one worked for me
why hasn’t this been accepted as the answer @Sam
I also changed mysql version 5.7.22 to 5.7
This did not work for me at all. I got the same error («no matching manifest for linux/arm64/v8 in the manifest list entries») as the OP. I also tried setting the platform to «linux/amd64», «linux/x86_64», and «linux/x86_64/v8», and still received the same error. It looks like it’s still impossible to run MySQL under Docker, with and without emulation, even in September of 2022. I can’t believe no one anywhere has compiled MySQL for M1.
Doesn’t work for me
worked on simple Apple Silicon M1
Related Topics
mysql
docker
apple-silicon
Mentions
Dharman
Sam
Simon
Octaedro
Viswanath
Luke Madhanga
Achintha Isuru
Ashwin J
Sumit S
Mathias Brodala
Gokce Demir
Elio Ermini
Bpossolo
Hugo Sama
Khoi
Mstgnz
Stefan W
Misha Ishikawa
Neptun B
Skgodara
Guest
Syd Mk
Shobi
References
stackoverflow.com/questions/65456814/docker-apple-silicon-m1-preview-mysql-no-matching-manifest-for-linux-arm64-v8
WordPress is a free and open-source content management system that you can use to create websites and blogs. In this article, you will learn how to run WordPress on your Mac device with Docker Compose.
Docker Installation
The first step is to install Docker on your device. If you already have Docker installed, you can skip the section. Otherwise, go to the Docker website and download Docker Desktop.
Follow the installation instructions and once it’s done, open the application.
The above image illustrates what you should see when you open the application. In the next step, you will configure WordPress with Docker.
To use WordPress locally, you need to create a «docker-compose» file. Go to your preferred folder and create the Docker file as follows:
touch docker-compose.yml
Now open the newly created file and add the following code:
version: "3.9"
services:
The «version» from the top of the file specifies the version of the Compose file format. Things like the file structure, permitted configuration keys, and the compose behaviour depends on the version specified in the «docker-compose» file.
When it comes to «services», we will use two services:
- MySQL
- WordPress
Add the remaining code in the docker-compose.yml
file:
version: "3.9"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: dbpassword
MYSQL_DATABASE: wordpress_local
MYSQL_USER: wordpress_db_user
MYSQL_PASSWORD: wordpress_db_password
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- wordpress_data:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress_db_user
WORDPRESS_DB_PASSWORD: wordpress_db_password
WORDPRESS_DB_NAME: wordpress_local
volumes:
db_data: {}
wordpress_data: {}
Save the file and you are ready to run WordPress locally! To do so, run the following command in your terminal:
docker-compose up -d
After the command finishes, WordPress should be available at localhost:8000
.
You can proceed further and install WordPress. Once it’s installed, you can use it for things such as local WordPress development.
Error: No Matching Manifest For linux/arm64/v8
If you use a Mac device with the «M1» processor or any «M» processor, you might encounter an error.
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
One way to solve the issue is to add the platform
key for the database. See the updated version:
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: dbpassword
MYSQL_DATABASE: wordpress_local
MYSQL_USER: wordpress_db_user
MYSQL_PASSWORD: wordpress_db_password
platform: linux/x86_64
Now you can re-run docker-compose up -d
, and it should work!