Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull mysql for docker in macbook m1 #778

Closed
wanwws opened this issue Jul 14, 2021 · 9 comments
Closed

pull mysql for docker in macbook m1 #778

wanwws opened this issue Jul 14, 2021 · 9 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@wanwws
Copy link

wanwws commented Jul 14, 2021

when i run terminmal
docker pull mysql
terminal show
Using default tag: latest
latest: Pulling from library/mysql
no matching manifest for linux/arm64/v8 in the manifest list entries
how to fix this

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Jul 14, 2021
@wglambert
Copy link

The Apple M1 is an ARM chip and mysql doesn't support that architecture #318

@yosifkit
Copy link
Member

Docker Desktop on OSX will emulate amd64, so docker pull --platform linux/amd64 mysql should work.

https://docs.docker.com/docker-for-mac/apple-silicon/:

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.

However, attempts to run Intel-based containers on Apple Silicon machines under emulation can crash as qemu sometimes fails to run the container. In addition, filesystem change notification APIs (inotify) do not work under qemu emulation. Even when the containers do run correctly under emulation, they will be slower and use more memory than the native equivalent.

In summary, running Intel-based containers on Arm-based machines should be regarded as “best effort” only. We recommend running arm64 containers on Apple Silicon machines whenever possible, and encouraging container authors to produce arm64, or multi-arch, versions of their containers.

@KhizerRehan
Copy link

@yosifkit docker pull --platform linux/amd64 mysql this command let me to pull mysql image from docker hub

@fazalerabbi
Copy link

@KhizerRehan Thank you, this help me. I have added this in my Dockerfile:
FROM --platform=linux/amd64 mysql:5.7

@ebuildy
Copy link

ebuildy commented Apr 15, 2022

I dont get it, you could pull the image, but when run, this will give the error:

[ERROR] InnoDB: Linux Native AIO interface is not supported on this platform.

isnit?

@tianon
Copy link
Member

tianon commented Apr 19, 2022

If you want a native build, you should pull mysql:8.0-oracle instead, which has official arm64v8 builds.

@DRB372

This comment was marked as off-topic.

@christiansaiki
Copy link

Out of the blue, my mysql:5.7 container stopped working with the same error as the OP.
I was using platform: linux/amd64
Turned out it was Docker for Mac's fault. Now the rosetta emulation is turned off by default, so you have to turn it on by ticking the checkbox.
Hope this helps someone, I wasted 3 hours today in this saga.
image

@lookitsjonno
Copy link

Out of the blue, my mysql:5.7 container stopped working with the same error as the OP. I was using platform: linux/amd64 Turned out it was Docker for Mac's fault. Now the rosetta emulation is turned off by default, so you have to turn it on by ticking the checkbox. Hope this helps someone, I wasted 3 hours today in this saga. image

Thank you, thank you, thank you. Exactly the same happened with me, after working fine for weeks mysql started segfaulting with the below error. Pulled my hair out for several hours today and your suggestion was the only one that fixed my problem.

qemu: uncaught target signal 11 (segmentation fault) - core dumped /usr/local/bin/docker-entrypoint.sh: line 236: 220 segmentation fault "$@" --initialize-insecure --default-time-zone=system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

10 participants