moby / moby/buildkit

fail or add warning when running container without privileged permission

Open
#3,356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

If you start the container without priviledged permission, docker buildx build will fail with
ERROR: failed to solve: failed to read dockerfile: failed to mount /tmp/buildkit-mount227363723: [{Type:bind Source:/var/lib/buildkit/runc-native/snapshots/snapshots/5 Options:[rbind ro]}]: operation not permitted

I would suggest adding a warning when starting the container without the priviledged permission.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing docker buildx build inside a container without privileged permission and trace the reported BuildKit mount failure. Determine where container startup or build initialization can detect the missing permission; done means the condition produces a clear warning or an intentional failure before the opaque mount error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.