moby / moby/buildkit

Support pulling individual files without pulling entire image

Open
#1,502 3 comments 1 reaction 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

Creating this ticket for visibility and based on a conversation with @thaJeztah

image

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.