Skip to content

[Bug]: container build fails with buildkit permissions issue #1906

Description

@davidhewitt

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

The following minimal reproduction fails to build an extremely basic dockerfile:

$ mkdir -p /tmp/container-build-repro
cat > /tmp/container-build-repro/Dockerfile <<'EOF'
FROM debian:bookworm-slim
RUN echo hi
EOF
container build --no-cache -t container-build-repro-test /tmp/container-build-repro

[+] Building 0.1s (5/5) FINISHED
 => [resolver] fetching image...docker.io/library/debian:bookworm-sl  0.0s
 => [internal] load build definition from Dockerfile                  0.0s
 => => transferring dockerfile: 73B                                   0.0s
 => [internal] load .dockerignore                                     0.0s
 => => transferring context: 2B                                       0.0s
 => oci-layout://docker.io/library/debian:bookworm-slim@sha256:60eac  0.0s
 => => resolve docker.io/library/debian:bookworm-slim@sha256:60eac75  0.0s
 => => extracting sha256:74f1dcfcc9c80045f6f6394ffcfc261cb19d0c71b97  0.0s
 => ERROR [linux/arm64 1/2] RUN echo hi                               0.0s
------
 > [linux/arm64 1/2] RUN echo hi:
------
Error: unknown: "failed to solve: failed to compute cache key: failed to unmount /tmp/containerd-mount3485907331: operation not permitted: failed to mount /tmp/containerd-mount3485907331: mount source: "/var/lib/buildkit/runc-native/snapshots/snapshots/11", target: "/tmp/containerd-mount3485907331", fstype: bind, flags: 20480, data: "", err: operation not permitted"

Problem description

I think the error seems to be some kind of internal buildkit state being corrupted. I have tried to stop / start the container system and continue, no joy.

I don't think it ever has worked for me on this machine, so it could be a configuration issue. Happy to try and/or share whatever could aid in debugging & diagnosis.

Environment

- OS: macOS 26.5.1 25F80
- Xcode: (none, just command line tools)
- Container: 1.0.0

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions