moby / moby/buildkit

let run --mount=type=bind support uid and gid option

Open
#4,002 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Currently, all files mount from build context by run command are owned by root (uid=0,gid=0).
It will be nice to be able to overwrite the ownership when you mount it.
This would eliminate the need for copy --chown statements.

If mount can't modify the ownership, can I set the default ownership for build context?

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 locating the BuildKit implementation and option parsing for run --mount=type=bind; the issue does not name files or tests. Check how build-context mounts currently set ownership, then define and verify the behavior for explicit uid/gid options and the proposed default ownership alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.