1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

Skip V2 registry and immediately fallback to V1 when mirrors are provided

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)
Upstream-commit: 87f59e3802a44aecdb8febfd34a9661e136ffcf4
Component: engine
This commit is contained in:
Derek McGowan
2014-10-23 15:26:52 -07:00
committed by Tibor Vass
parent 9fbae76eab
commit 4f05e6fed5

View File

@@ -137,7 +137,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
mirrors = s.mirrors
}
if isOfficial || endpoint.Version == registry.APIVersion2 {
if len(mirrors) == 0 && (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)