darwin-containers / rund

OCI Container Runtime for Darwin
Apache License 2.0
432 stars 13 forks source link

exec format error #29

Closed Jaskowicz1 closed 7 months ago

Jaskowicz1 commented 7 months ago

When trying to follow the example, I get

[Warning] The requested image's platform (unknown) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

exec /bin/sh: exec format error

This is on a Mac mini M2. I am on Ventura

Jaskowicz1 commented 7 months ago

I've noticed your website shows the same warning, but I still have an issue with exec format error. I've updated the title to reflect this.

slonopotamus commented 7 months ago

I believe you have Docker Desktop or something like that running and it intercepts docker calls.

Look at detected host platform (linux/arm64/v8) in error message, it has linux.

Jaskowicz1 commented 7 months ago

Ahh thank you for your fast response! I am using docker desktop but I'll uninstall it and get back to you soon. Currently cooking at the moment so it'll be ~45 minutes!

slonopotamus commented 7 months ago

You don't need to uninstall, you can just temporarily quit it.

Jaskowicz1 commented 7 months ago

You don't need to uninstall, you can just temporarily quit it.

Hi there, I tried to quit it, didn't work. I then uninstalled it, reinstalled docker, did everything, it still shows the same issue.

slonopotamus commented 7 months ago

I'm not sure I can help you any further. If you're still getting exec error that talks about linux, it means you have something Linux-related running (Docker Desktop, Rancher Desktop, colima, etc) and that listens to /var/lib/docker/dockerd.sock socket file, preventing macOS native Docker daemon from doing the same. And you just need to shut that software down. The possibility of running macOS containers alongside with Linux containers is a dream of a very far away future, so today we need to make conscious decisions on which one is currently in use.

Jaskowicz1 commented 7 months ago

I'm not sure I can help you any further. If you're still getting exec error that talks about linux, it means you have something Linux-related running (Docker Desktop, Rancher Desktop, colima, etc) and that listens to /var/lib/docker/dockerd.sock socket file, preventing macOS native Docker daemon from doing the same. And you just need to shut that software down. The possibility of running macOS containers alongside with Linux containers is a dream of a very far away future, so today we need to make conscious decisions on which one is currently in use.

Ah yeah I replaced Docker Desktop with Colima as I couldn't figure out how to run Docker without (I just got this Mac about 10 hours ago haha, still getting used to this). I've stopped colima and docker seems to function now. It's reinstalling Ventura latest (though I have slow internet) so I'll update you on that asap.

In the mean time, do you mind telling me how you manage to get Docker running without colima/DD?

slonopotamus commented 7 months ago

Earthly has an article that explains how all this macOS container stuff is functioning. I doubt I would be able to explain things better than them :)

Jaskowicz1 commented 7 months ago

Earthly has an article that explains how all this macOS container stuff is functioning. I doubt I would be able to explain things better than them :)

This is a great link, thank you!

Jaskowicz1 commented 7 months ago

I've got it alive! However, doing RUN uname -a seems to infinitely build. Same goes for any run command. Any ideas?

slonopotamus commented 7 months ago

That was fixed yesterday in rund 0.0.6: https://github.com/macOScontainers/rund/commit/cf7cb664cb88088dbf3cbaba23058fa60635176c

You need to brew update && brew upgrade

slonopotamus commented 7 months ago

Closing, since initial issue (exec format error) was resolved.

Jaskowicz1 commented 7 months ago

That worked! Thank you!!!