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

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested #134

Closed
dawoodahmed-jazz opened this issue May 31, 2021 · 3 comments

Comments

@dawoodahmed-jazz
Copy link

I am trying to run the following command on Macbook M1 pro

ocker run --rm --privileged multiarch/qemu-user-static --reset -p yes

but getting the following error on this

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

@dawoodahmed-jazz dawoodahmed-jazz changed the title The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested standard_init_linux.go:219: exec user process caused: exec format error The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested May 31, 2021
@antode
Copy link

antode commented Jun 1, 2021

Same here, but on arm qemu virtual machine, I think it because of https://github.com/multiarch/qemu-user-static#supported-host-architectures

Supported host architectures
x86_64
Currently qemu-user-static is not available on other host architectures such as aarch64. Run uname -m to check it on your environment.

but I have no idea how to revert changes made by container

@junaruga
Copy link
Member

junaruga commented Jun 1, 2021

Try https://github.com/dbhi/qus supporting arm64 maybe written in this doc.

but I have no idea how to revert changes made by container

find /proc/sys/fs/binfmt_misc -type f -name 'qemu-*' -exec sh -c 'echo -1 > {}' \;

To clean your environment, if you have the installed binfmt_misc files,

$ ls /proc/sys/fs/binfmt_misc/qemu-*

Run the following command with the root # user, not $ sudo ... to remove the binfmt_misc/qemu-* files by your own responsibility. echo -1 > <binfmt_misc file> is a magical command to remove it. Be careful!

# find /proc/sys/fs/binfmt_misc -type f -name 'qemu-*' -exec sh -c 'echo -1 > {}' \;

Then if you see the multiarch/qemu-user-static images, just remove it.

$ docker images

e.g. Remove all the container images.

$ docker system prune -a -f

@junaruga
Copy link
Member

junaruga commented Jun 6, 2021

I would close this ticket, as my last comment answered for this issue. If you want this repo to support arm64, the pull-request is always welcome. I suppose some maintainers might review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants