Skip to content

docker pull resume downloading layer option #7166

Description

@TadavomnisT

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions