Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

Choosing the right Docker Image for your Apple M1 Pro

2 min read

What happens when you try to pull the following MySQL Docker image on your Apple MacBook M1 Pro laptop?

 docker pull mysql:8.0.23

You might encounter the following error message:

8.0.23: Pulling from library/mysql
no matching manifest for linux/arm64/v8 in the manifest list entries

The same command might work on the Cloud instance or on your colleague’s laptop. It’s weird, isn’t it?

Let’s deep dive further

The mquery tool allows you to query any public image in any public container repository as to its media type (standard OCIv1 or Docker v2.2 image), digest, and platform support, if it is an OCI index or Docker v2.2 manifest list.

Let us try to run mquery tool against the mysql:8.0.23 and verify the result:

docker run --rm mplatform/mquery mysql:8.0.23                 
Unable to find image 'mplatform/mquery:latest' locally
latest: Pulling from mplatform/mquery
894bcacb16df: Pull complete 
a0c6ee298a93: Pull complete 
Digest: sha256:d0989420b6f0d2b929fd9355f15c767f62d0e9a72cdf999d1eb16e6073782c71
Status: Downloaded newer image for mplatform/mquery:latest
Image: mysql:8.0.23 (digest: sha256:6e0014cdd88092545557dee5e9eb7e1a3c84c9a14ad2418d5f2231e930967a38)
 * Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)
 * Supported platforms:
   - linux/amd64

As you can see above, the Docker image has limited support only for x86 platform(missing Arm arch support).

Your CPU can only run binaries for its native architecture. For example, Docker images built for an x86 system can’t run on an Arm-based system. With Apple fully transitioning to their custom Arm-based silicon, it’s possible that your x86 (Intel or AMD) Docker Image won’t work with Apple’s recent M-series chips. Consequently, we always recommended building multi-arch container images. Below is the mplatform/mquery Docker image that lets you query the multi-platform status of any public image, in any public registry:

docker run --rm mplatform/mquery eclipse-temurin:17-jre-alpine
Image: eclipse-temurin:17-jre-alpine (digest: sha256:ac423a0315c490d3bc1444901d96eea7013e838bcf7cc09978cf84332d7afc76)
 * Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)
 * Supported platforms:
   - linux/amd64

Docker introduced the docker buildx command to help you build multi-architecture images. Buildx is a Docker component that enables many powerful build features with a familiar Docker user experience. All builds executed via Buildx run via the Moby BuildKit builder engine. BuildKit is designed to excel at multi-platform builds, or those not just targeting the user’s local platform. When you invoke a build, you can set the –platform flag to specify the build output’s target platform, (like linux/amd64, linux/arm64, or darwin/amd64):

docker buildx build --platform linux/amd64, linux/arm64 -t mysql:8.0.23 .

Leverage multi-CPU architecture support

Docker images can support multiple architectures, which means that a single image may contain variants for different architectures, and sometimes for different operating systems, such as Windows.

When running an image with multi-architecture support, docker automatically selects the image variant that matches your OS and architecture.

Most of the Docker Official Images on Docker Hub provide a variety of architectures. For example, the busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x. When running this image on an x86_64 / amd64 machine, the amd64 variant is pulled and run.

You can even now run ARM or Intel Docker containers on the Apple M1 Mac with Docker Desktop for Mac M1. The default, of course, is to run the ARM version but if you use the –platform linux/amd64 parameter Docker will run the Intel version for you.

Interesting, isn’t it?


Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

64 Replies to “Choosing the right Docker Image for your Apple M1…”

  1. Together with every little thing which appears to be building inside this specific subject matter, all your viewpoints are generally quite refreshing. On the other hand, I am sorry, but I can not give credence to your whole idea, all be it refreshing none the less. It looks to us that your comments are actually not completely validated and in fact you are generally yourself not entirely confident of the argument. In any case I did appreciate examining it.

  2. Youre so cool! I dont suppose Ive read something like this before. So good to search out someone with some authentic thoughts on this subject. realy thanks for starting this up. this website is something that’s wanted on the net, somebody with a little bit originality. useful job for bringing one thing new to the web!

  3. I’ve been browsing online more than 3 hours nowadays, but I never found any fascinating article like yours. It’s beautiful value sufficient for me. Personally, if all website owners and bloggers made just right content as you did, the net will probably be a lot more helpful than ever before. “Nothing will come of nothing.” by William Shakespeare.

  4. What i don’t realize is in fact how you’re now not actually a lot more well-preferred than you may be now. You’re so intelligent. You understand thus significantly in relation to this matter, produced me in my view consider it from so many varied angles. Its like women and men aren’t interested unless it?¦s something to do with Lady gaga! Your personal stuffs excellent. At all times maintain it up!

  5. Good day! This is kind of off topic but I need some guidance from an established blog. Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about making my own but I’m not sure where to start. Do you have any tips or suggestions? Thank you

  6. You have remarked very interesting points! ps nice website . “I didn’t attend the funeral, but I sent a nice letter saying that I approved of it.” by Mark Twain.

  7. Greetings from Colorado! I’m bored to tears at work so I decided to check out your site on my iphone during lunch break. I really like the info you present here and can’t wait to take a look when I get home. I’m amazed at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G .. Anyways, good blog!

  8. I and my pals have already been analyzing the best tips on your web site and all of the sudden got a horrible feeling I never expressed respect to the blog owner for them. The boys are already consequently glad to read all of them and already have certainly been having fun with these things. Appreciate your really being considerably accommodating and also for making a choice on varieties of tremendous areas millions of individuals are really eager to understand about. My very own honest apologies for not expressing appreciation to earlier.

  9. Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular BlogEngine.net.Thethoughts you express are really awesome. Hope you will right some more posts.

  10. I and my friends were actually looking at the nice information and facts found on the website then then developed a horrible suspicion I had not expressed respect to the web blog owner for those secrets. All the guys ended up so warmed to see them and already have without a doubt been enjoying those things. I appreciate you for genuinely very accommodating as well as for pick out variety of fabulous subjects millions of individuals are really needing to be informed on. My honest apologies for not expressing gratitude to earlier.

  11. Howdy very nice blog!! Guy .. Beautiful .. Amazing .. I’ll bookmark your blog and take the feeds also…I am glad to seek out numerous useful info here within the publish, we want develop more techniques in this regard, thank you for sharing.

  12. Very nice info and right to the point. I don’t know if this is in fact the best place to ask but do you guys have any thoughts on where to employ some professional writers? Thanks in advance 🙂

  13. Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch!

  14. Hello very cool website!! Man .. Excellent .. Wonderful .. I will bookmark your website and take the feeds also?KI’m satisfied to seek out so many useful info here in the submit, we need work out extra strategies on this regard, thanks for sharing. . . . . .

  15. After examine a number of of the weblog posts in your website now, and I actually like your approach of blogging. I bookmarked it to my bookmark website list and might be checking again soon. Pls try my website online as well and let me know what you think.

  16. Great ?V I should certainly pronounce, impressed with your website. I had no trouble navigating through all tabs as well as related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or something, website theme . a tones way for your customer to communicate. Excellent task..

  17. I really trust that your insomnia is a problem cbd capsules already and not a indication of something more serious. I know that melatonin works great but I can also differentiate you that chock-full spectrum cbd gummies work simply as excellently and you can’t even upon an addiction unlike in the containerize with melatonin that’s a fair cloth advantage. But I’m established that these gummies commitment really help you.

  18. I simply wanted to write a word so as to thank you for all of the fantastic pointers you are giving out at this website. My extensive internet look up has at the end been recognized with good quality concept to talk about with my friends and classmates. I ‘d express that many of us site visitors actually are rather fortunate to dwell in a fantastic site with many special people with helpful things. I feel somewhat blessed to have discovered your entire web pages and look forward to plenty of more cool times reading here. Thanks once again for everything.

  19. What i don’t realize is actually how you’re not really much more well-liked than you may be right now. You’re very intelligent. You realize thus significantly relating to this subject, produced me personally consider it from so many varied angles. Its like men and women aren’t fascinated unless it is one thing to do with Lady gaga! Your own stuffs outstanding. Always maintain it up!

  20. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your weblog? My website is in the exact same area of interest as yours and my visitors would genuinely benefit from some of the information you present here. Please let me know if this okay with you. Many thanks!

  21. Miracles still exist after Dr Amber transformed my life to a better one by making me a sports bet winner of 65 Million Pounds with his spells and he can help you win the lottery as well. Email: amberlottotemple @ gmail .com for more info.

  22. wonderful post, very informative. I wonder why the other specialists of this sector do not notice this. You must continue your writing. I am sure, you’ve a huge readers’ base already!

  23. Thanks for the tips shared using your blog. Something also important I would like to state is that weight reduction is not exactly about going on a dietary fad and trying to get rid of as much weight as possible in a set period of time. The most effective way to lose weight naturally is by consuming it slowly and gradually and following some basic points which can enable you to make the most from your attempt to shed weight. You may learn and be following many of these tips, nonetheless reinforcing understanding never affects.

  24. I have learn several excellent stuff here. Certainly price bookmarking for revisiting. I surprise how a lot attempt you set to make this kind of great informative web site.

  25. Oh my goodness! a tremendous article dude. Thanks Nevertheless I am experiencing difficulty with ur rss . Don’t know why Unable to subscribe to it. Is there anybody getting identical rss drawback? Anybody who knows kindly respond. Thnkx

Leave a Reply

Your email address will not be published.

© Copyright Collabnix Inc

Built for Collabnix Community, by Community