moby / moby/buildkit

Proposal: `docker build --call=pull`

Open
#6,065 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Originally reported at https://github.com/docker/buildx/issues/3273 and triaged by @tonistiigi.

Proposal

When user runs docker build --call=pull, docker would only pull all images referenced in Dockerfile, or maybe only the images needed by --target.

This would be useful for using tools like https://github.com/kadwanev/retry to help retry in case of network intermittencies:

$ retry --tries 3 --sleep 15s -- docker build --call=pull .
$ docker build .

Which is very frequent in my case, where I use internal proxies for public registries. This is a recurrent pain point of my pipelines.

My workaround is to hardcode a bunch of docker pull commands before calling docker build . which is far away from ideal.

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 with the proposed docker build --call=pull entry point and review the linked Buildx issue for the original triage context. Determine the intended behavior for all Dockerfile images versus images required by --target, then define how completion would be verified for the retry workflow described in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.