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

Mount permission denied #18

Open
energy-sync opened this issue Nov 15, 2022 · 2 comments
Open

Mount permission denied #18

energy-sync opened this issue Nov 15, 2022 · 2 comments

Comments

@energy-sync
Copy link

energy-sync commented Nov 15, 2022

I am new to Docker, but I tried to create a container on Docker for Windows and it gives this error when I run it:

2022-11-14 19:43:22 mount: permission denied (are you root?)
2022-11-14 19:43:22 cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin

I tried running as administrator, and it gave the same result. I also tried setting it up on a Raspberry Pi 3, and the same thing happened (using root and sudo).

@jamesmortensen
Copy link

I get the same problem. I also see the same problem trying to use tonistiigi/binfmt:

$ sudo docker run --privileged --rm tonistiigi/binfmt --install all
error: operation not permitted
cannot mount binfmt_misc filesystem at /proc/sys/fs/binfmt_misc
main.run
        /src/cmd/binfmt/main.go:183
main.main
        /src/cmd/binfmt/main.go:170
runtime.main
        /usr/local/go/src/runtime/proc.go:250
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1571

This is on a GitPod Ubuntu 20.04.5 amd64 instance. Same issue with and without sudo. I seem to recall this not being a problem on amd64 platforms, but now for some reason I'm not able to get it to work.

There's no problem on GitHub Codespaces though.

@umarcor
Copy link
Member

umarcor commented May 25, 2024

Depending on the platform, it might not be possible to register binfmt formats. See the last item in https://dbhi.github.io/qus/development.html#roadmap. @jamesmortensen I believe that's what might be happening on GitPod, while it does work on GitHub Codespaces and GitHub Actions; they have different permissions settings in the machines/environments.

@energy-sync you should not need qus to run ARM containers on Windows, because since 2017 Docker for Windows comes with QEMU already preinstalled and interpreters registered. See https://dbhi.github.io/qus/related.html#linuxkit-binfmt-docker-binfmt. Which foreign architecture are you trying to register? Apart from that, are you using Hyper-V as a backend or WSL?

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