Pull parent layers first before children

This commit is contained in:
Michael Crosby 2013-11-12 11:48:35 -08:00
parent 5d9723002b
commit 7301fbe035
1 changed files with 2 additions and 1 deletions

View File

@ -537,7 +537,8 @@ func (srv *Server) pullImage(r *registry.Registry, out io.Writer, imgID, endpoin
// FIXME: Try to stream the images?
// FIXME: Launch the getRemoteImage() in goroutines
for _, id := range history {
for i := len(history) - 1; i >= 0; i-- {
id := history[i]
// ensure no two downloads of the same layer happen at the same time
if err := srv.poolAdd("pull", "layer:"+id); err != nil {