docker pull --progress=plain: docker 25+ hides layer progress when piped

Even a real 9GB/74s pull printed only 'Pulling from' + 'Status' -- the
CLI suppresses per-layer Downloading lines for non-TTY stdout since
docker 25, so the CR-splitting/summary pipeline had nothing to parse.
--progress=plain forces them out.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-17 06:26:04 +00:00
parent ca8e1d6038
commit 180b7b5007

View File

@ -126,7 +126,10 @@ def _pull_one(image: str, verbose: bool = True) -> None:
# stream progress: a multi-GB pull with captured output is minutes # stream progress: a multi-GB pull with captured output is minutes
# of silence that reads as a hang. Non-TTY docker pull emits clean # of silence that reads as a hang. Non-TTY docker pull emits clean
# per-layer lines; forward the informative ones (throttled). # per-layer lines; forward the informative ones (throttled).
proc = subprocess.Popen(['docker', 'pull', ref], # docker 25+ hides per-layer progress when stdout is not a TTY;
# --progress=plain forces the id: Downloading x/y lines our ⏳
# summary parses (without it even a real 9GB/74s pull is silent)
proc = subprocess.Popen(['docker', 'pull', '--progress=plain', ref],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
bufsize=0) bufsize=0)
# idle watchdog: a dead mirror emits NOTHING (0 bytes/s for hours); # idle watchdog: a dead mirror emits NOTHING (0 bytes/s for hours);