Since V2 registry does not yet implement mirrors, when mirrors are given automatically fallback to V1 without checking V2 first.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
| ... | ... |
@@ -139,7 +139,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
|
| 139 | 139 |
mirrors = s.mirrors |
| 140 | 140 |
} |
| 141 | 141 |
|
| 142 |
- if isOfficial || endpoint.Version == registry.APIVersion2 {
|
|
| 142 |
+ if len(mirrors) == 0 && (isOfficial || endpoint.Version == registry.APIVersion2) {
|
|
| 143 | 143 |
j := job.Eng.Job("trust_update_base")
|
| 144 | 144 |
if err = j.Run(); err != nil {
|
| 145 | 145 |
return job.Errorf("error updating trust base graph: %s", err)
|