docker / docker/cli

`docker pull` resume downloading layer option

Open
#7,166 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/0-triage status/more-info-needed
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description

During the docker pull process, if a connection problem occurs—which is common with unstable Wi‑Fi, VPN drops, router sleep, NAT issues, MTU problems, and so on—Docker will not reuse partially downloaded layers, so on the next docker pull starts downloading that layer over:

$ sudo docker pull beevelop/cordova:latest                                                                                                                                                                                   
latest: Pulling from beevelop/cordova                                                                                                                                                                                                      
6f245fbb6da7: Download complete                                                                                                                                                                                                            
fc3c89a8c92a: Download complete                                                                                                                                                                                                            
bd35bf817417: Downloading [=>                                                 ]   34.6MB/880.4MB                                                                                                                                           
1f573660f4aa: Downloading [==>                                                ]  41.94MB/814MB                                                                                                                                             
617772c7d19b: Downloading [=========================================>         ]   34.6MB/41.57MB                                                                                                                                           
97344555eef9: Downloading [=====>                                             ]  16.81MB/144.7MB                                                                                                                                           
a7fb98a8eddd: Download complete                                                                                                                                                                                                            
ef3e291e2bea: Downloading [===>                                               ]  28.31MB/459.9MB                                                                                                                                           
4f4fb700ef54: Already exists                                                                                                                                                                                                               
869f03e2bc59: Downloading [=============>                                     ]   73.4MB/273.1MB                                                                                                                                           
d4fa1733c83a: Downloading [========>                                          ]  24.12MB/143.1MB                                                                                                                                           
9cf22b159730: Download complete                                                                                                                                                                                                            
8369f9fca54c: Downloading [===============================>                   ]  46.14MB/72.66MB                                                                                                                                           
bb0deee347b7: Download complete                                                                                                                                                                                                            
short read: expected 144729115 bytes but got 16806391: unexpected EOF                                                                                                                                                                      

$ sudo docker pull beevelop/cordova:latest                                                                                                                                                                                   
latest: Pulling from beevelop/cordova                                                                                                                                                                                                      
d4fa1733c83a: Pulling fs layer                                                                                                                                                                                                             
6f245fbb6da7: Pulling fs layer                                                                                                                                                                                                             
4f4fb700ef54: Already exists                                                                                                                                                                                                               
9cf22b159730: Pulling fs layer                                                                                                                                                                                                             
1f573660f4aa: Pulling fs layer                                                                                                                                                                                                             
a7fb98a8eddd: Pulling fs layer                                                                                                                                                                                                             
8369f9fca54c: Pulling fs layer                                                                                                                                                                                                             
869f03e2bc59: Pulling fs layer                                                                                                                                                                                                             
617772c7d19b: Downloading [=>                                                 ]  1.049MB/41.57MB                                                                                                                                           
97344555eef9: Pulling fs layer                                                                                                                                                                                                             
bd35bf817417: Pulling fs layer                                                                                                                                                                                                             
fc3c89a8c92a: Pulling fs layer                                                                                                                                                                                                             
ef3e291e2bea: Pulling fs layer                                                                                                                                                                                                             
bb0deee347b7: Download complete  

It might not be a big deal when the sizes of those layers are small, but it could be annoying if the layer size and downloaded part size are huge. Is there a way for Docker to cache layers locally so that it can automatically resume downloading from the corresponding byte?

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 reproducing the reported docker pull failure with an interrupted download of a large layer and inspect the pull entry point and layer-download handling in this CLI repository. The work is done when a subsequent pull reuses the partial layer and resumes from the corresponding byte, while preserving successful behavior for completed layers.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.