-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
failed to solve (mounting not permitted) when using namespace remapping #4556
Comments
The only similar discussion i've found online thus far is containerd/nerdctl#1401 . There are a non-zero number people in our userbase that seem to rely on providing the syntax directive (microsoft/vscode-remote-release#7463) so just stripping it from Dockerfiles doesn't seem like an option (and is probably hiding a deeper issue) |
Possibly similar error found in the rootless docs: https://github.com/moby/buildkit/blob/master/docs/rootless.md#error-mount-procproc-via-procselffd6-flags-0xe-operation-not-permitted |
@tonistiigi Do you perhaps have any quick suggestions I could try to get around this issue? 🙏 |
It seems to be an issue with this mount https://github.com/moby/buildkit/blob/master/frontend/gateway/gateway.go#L341-L348 not converting the path to file accessible for the remapped user. |
I think some solution similar to #3098 may help here. Any tips on running/simulating a development builder under a user namespace? I see the |
* add hidden --ignore-syntax-directive to unblock moby/buildkit#4556 * omit user syntax directives and omit when using 'build' command * update usage of internalGetImageBuildInfoFromDockerfile in tests
I could not reproduce this in v25 of moby |
This indeed produces in codespaces but not in any other system I've tested. Also does not produce in dind. I thought that this was maybe apparmor, but even in systems with apparmor enabled I see no issue. As codespaces does not use official Docker release (and I don't know how the VM is set up) can't debug this more before additional info is provided. |
Thank you for resolving 🙏 |
I am attempting to utilize docker namespace remapping. Builds are unsuccessful with Dockerfiles that include a syntax directive (Eg
# syntax=docker/dockerfile:1.4
) withERROR: failed to solve: exit code: 1
.An example Dockerfile:
The following 'operation not permitted' error can be found in the journal logs:
This repros on a default Ubuntu 22.04 Azure VM, with some limited customizations. One notable customization here is that the
/var/lib/docker
directory is a mount of an ext4 filesystem (more details hidden below). I don't believe this is the cause of the issue, but thought i'd point it out for added context.I have no issues building docker images on this host unless combining with user namespace remapping. What i've tried:
✅ A Dockerfile without the
syntax
directive build and WITH user namespace remapping✅ Building Dockerfile WITH
syntax
directive and WITHOUT user namespace remappingdocker info
/etc/docker/daemon.json
mount
OS/kernel info
Repro in codespaces
Edit: This also repros easily in a codespace with the following steps:
docker-in-docker
v2.7.1 Feature).moby/buildkit
works fine for the repro./etc/docker/daemon.json
.pkill dockerd && dockerd
).docker info
The text was updated successfully, but these errors were encountered: