-
Notifications
You must be signed in to change notification settings - Fork 796
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
Permission denied while running buildah image with docker #2098
Comments
We really can do nothing to fix Docker daemon or the seccomp.json packaged for it. |
That's clear, I was just thinking if there's a configuration option for buildah which allows it to work with whatever constraints docker applies. |
@danifv you can try setting |
Unfortunately nothing changed - the error is the same. |
@danifv, can you try without manually changing the seccomp profile? I am running Docker 18.09.8 on Fedora 31 and |
I believe buildah package attempts to create a user namespace so that it can mount the file systems. If Docker is blocking the unshare syscall,it will block buildah, |
As @rhatdan pointed out
when I start a buildah command if I don't enable it. As the buildah image works properly with the podman runtime and I can get it working properly with docker if I add |
You should be able to get this work by disabling seccomp rules.
|
@rhatdan unfortunately this wan't enough, but in the end through some laborious yet rewarding debugging I found that restrictions for mount have to be relaxed in both seccomp and apparmor. I realize that this issue board is for buildah, but if this doesn't violate any guidelines, I'd highly appreciate if any of you can share why these are enabled by default in podman and what it uses in place of apparmor. |
@rhatdan can you reply to danifv and close this out please? |
Buildah right now uses SELinux depending if it is available, we could support apparmor, if someone in the community wanted to add it. |
Fixed to me by updating docker version:
see: |
Description
I can't get the buildah images working with the docker runtime without
--privileged
.Unfortunately I can't change the container runtime but nevertheless I would prefer to use an unprivileged container for building instead of dind containers with a mounted socket.
Steps to reproduce the issue:
docker run --rm -it --security-opt seccomp=/usr/share/containers/seccomp.json -v quay.io/buildah/stable:v.1.12.0 sh
buildah from alpine
Describe the results you received:
Describe the results you expected:
The image being pulled
Output of
uname -a
:The text was updated successfully, but these errors were encountered: