Add "unsquash" exporter option (or Dockerfile instruction) for deduping files in a layer
Open
Nobody has claimed this yet.
kind/enhancement
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
An exporter option unsquash=/foo will unsquash /foo/* into new layers for sake of dedupe.
e.g.,
Layer0: /bin, /lib, /usr, ...
Layer1: /foo/a, /foo/b, /foo/c, /bar/x, /bar/y, /bar/z, ...
↓
Layer0: /bin, /lib, /usr, ...
Layer1: /bar/x, /bar/y, /bar/z, ...
Layer2: /foo/a
Layer3: /foo/b
Layer4: /foo/c
Maybe this can be also implementable as a Dockerfile instruction like UNSQUASH /foo.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating BuildKit's exporter-option handling and Dockerfile instruction parsing, then determine which path can support the proposed layer transformation. Done means one supported interface implements the stated unsquash behavior with coverage for the example layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile, go
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100