-
Notifications
You must be signed in to change notification settings - Fork 118
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
docker run error 'exec format error' post upgrade on Apple silicon M2 #7168
Comments
I have the same issue. |
I have exactly the same problem after upgrading to the latest docker version Could someone please advise on how to get this working? |
Same with me after upgrade to 4.27:
Downgrading to 4.26 has fixed it and the image runs again. Download link: https://docs.docker.com/desktop/release-notes/#4261 |
In my case the image is only available for amd64 link
I have Rosetta emulation disabled. So presumably 4.26 was performing some other kind of amd64 emulation and 4.27 is not. I'm going to update my image to a newer version that provides both amd64 and arm64. |
anyone can point out what was the breaking change that caused this? |
We've got multiple people hitting this here. Platform: Apple M2 Max Pretty easy to reproduce with Rosetta enabled:
with Rosetta disabled hello-world runs, but I'm getting weird crashes like
in other apps. Downgrading to 4.26.1 fixed it as well. |
I can confirm this as well. Downgrading to 4.26.1 works, so I'll be staying on this version until the bug is fixed on 4.27.x |
Hi everyone, I can't reproduce on 4.27.2 that was just released but I think it might be a transient error. Could you try this new version and tell me if it fixes your issue? |
@dgageot still happening consistently on |
If you're using any kind of kubernetes node image in your linuxkit VM, it could be because the new node images have some systemd fun that messes up the binfmt handlers. Since those aren't namespaced, they'll mess up emulation handling for all your containers. See:
Workaround for kind, until a fix arrives (PR is done), is to use the Workaround for minikube is to use the |
Thanks a lot @jglogan, that makes a lot of sense. I couldn't figure out how people's binfmt could be messed up that much! Everyone: Those of you with the Those of you with the |
My use case is with minikube so I think the answer is yes. Thanks for figuring this out! |
Just tried Also tried |
Upgrading to 4.27.2 seems to have revolved the issue for me My use case is with minikube and followed @jglogan comments running Ran an additional validation by running |
@alexwilson1 try ensuring that minikube is not running, and then restart DD entirely. When you run a minikube that uses the broken node images, emulation is not going to work anywhere until your linuxkit VM gets rebooted. And if you have minikube running when you restart and your node containers have an auto start policy, the handlers will be removed as soon as DD fires up and starts those containers. |
@fozcode No problem! TBH I didn't figure it out, a colleague did. Just passing along what they found! |
Ingress-dns seems working fine now, but it seems not completly fixed I'm using Percona MongoDB Operator and has the same issue |
Thanks! I removed all containers, images, volumes from DD, did a docker system prune, removed dd completely then installed 4.7.2 and launched with |
I have the same issue here on macOS Sonoma 14.3.1 and Docker Desktop 4.27.2 (Rosetta emulation enabled): $ docker run --platform linux/amd64 hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:4bd78111b6914a99dbc560e6a20eab57ff6655aea4a80c50b0c5491968cbc2e6
Status: Downloaded newer image for hello-world:latest
exec /hello: exec format error |
I'm also facing the same issue. Mac M3 Max, MacOS Sonoma 14.3.1, Docker Desktop 4.27.2 with Rosetta enabled. I fully reinstalled Docker Desktop and it worked for a while, but the issue came back. ~ docker run --platform linux/amd64 -it ubuntu:latest bash
exec /usr/bin/bash: exec format error |
I'm going to close this issue. It's not a Docker Desktop issue per se. It's caused by minikube/kind messing up with Docker Desktop's qemu/rosetta configuration. This comment gives a solution. Basically, Minikube needs to be started with a newer image that was fixed to not mess with Docker Desktop. |
Same issue here, Mac M2 Pro, MacOS Sonoma 14.3.1, Docker Desktop 4.27.2 with Rosetta enabled. Not related to
And it works with DD |
Same as @biscout42 , After upgrading to 4.27.x all AMD images fail to start with "exec format error" on Mac M2 with Sonoma 14.3.1 and have Rosetta enabled and it has nothing to do with |
@dgageot , would you suggest to create a new issue or re-open this one? As I see the topic was also about docker w/o minikube (only image name)
|
I don't think this problem caused by |
@biscout42 @jlmoya @vietvudanh Please open another issue if you really think it's not related to minikube/k8s/kind. |
Double checked again, and imho @dgageot , you have a point. If I remove minikube via
and then clean and restart DD
I can run following command w/o errors on
|
Oh ok, my bad. I didn't prune everything after remove minikube. I did what @biscout42 suggest in his comment and now it looks fine. Thank you @dgageot and @biscout42. |
Description
I'm getting an error running 2 images post upgrade to the latest version 4.27.1 of docker-desktop for mac
The container fails with "exec format error"
Also docker-desktop fails when trying to push an image to docker hub and I have to reset to factory settings before getting it to work again.
Reproduce
Platform: Macbook Pro M2
OS: Sonoma 14.2.1
Docker Desktop: 4.27.1
cmd:
docker pull gcr.io/k8s-minikube/minikube-ingress-dns:0.0.2
docker run gcr.io/k8s-minikube/minikube-ingress-dns:0.0.2
Output: "exec /usr/local/bin/docker-entrypoint.sh: exec format error"
docker pull docker.io/upmcenterprises/registry-creds:1.10
docker run docker.io/upmcenterprises/registry-creds:1.10
Output: "exec /registry-creds: exec format error"
Expected behavior
docker run should run the container. The same images run on docker-desktop 4.26.1
docker version
Client: Cloud integration: v1.0.35+desktop.10 Version: 25.0.2 API version: 1.44 Go version: go1.21.6 Git commit: 29cf629 Built: Thu Feb 1 00:18:45 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.27.1 (136059) Engine: Version: 25.0.2 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: fce6e0c Built: Thu Feb 1 00:23:21 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
EFBFC4C6-AD42-4470-8971-A009AF56D571/20240204153215
Additional Info
I'm spinning these containers has part of a local minikube dev environment
the 2 containers images falling are required to enable ingress-dns and registry-creds service for the cluster
The text was updated successfully, but these errors were encountered: