mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Enable V2 pull flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
85fd8213af
commit
3be4551a91
1 changed files with 13 additions and 0 deletions
|
@ -137,6 +137,19 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
|
|||
mirrors = s.mirrors
|
||||
}
|
||||
|
||||
if isOfficial || endpoint.Version == registry.APIVersion2 {
|
||||
j := job.Eng.Job("trust_update_base")
|
||||
if err = j.Run(); err != nil {
|
||||
return job.Errorf("error updating trust base graph: %s", err)
|
||||
}
|
||||
|
||||
if err := s.pullV2Repository(job.Eng, r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel")); err == nil {
|
||||
return engine.StatusOK
|
||||
} else if err != registry.ErrDoesNotExist {
|
||||
log.Errorf("Error from V2 registry: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err = s.pullRepository(r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel"), mirrors); err != nil {
|
||||
return job.Error(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue