Support pulling individual files without pulling entire image
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
Creating this ticket for visibility and based on a conversation with @thaJeztah

Use Case
The use case for this enhancement is that I'm using multi stage builds and copying internal tools (usually binaries) from various images owned by other teams. Currently I just use the "COPY --from" directive and on a fresh GitLab Runner with no build cache this will lead to the whole image being pulled for each tool (binary) I'm trying to copy. This can lead to multiple GBs being pulled.
I'm currently using this CLI plugin as a workaround : https://github.com/tomwillfixit/docker-artifact
Exposing individual files as artifacts through labelling or some sort of internal manifest would allow more granular operations on files.
Feel free to close this out as I'm aware that there is a "stargz" ticket which may offer cover this use case. Just wanted to put this on the radar.
Thanks.
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
Start by reviewing BuildKit's handling of Dockerfile COPY --from and the docker-artifact CLI plugin cited as a workaround. Compare the requested behavior with the stargz ticket mentioned in the issue. Done should allow a multi-stage build to retrieve only requested files instead of pulling each complete image.
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