mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Merge pull request #11272 from dmcgowan/enable-v2-default-push
Enable v2 default push
This commit is contained in:
@@ -74,7 +74,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
|
||||
logName = utils.ImageReference(logName, tag)
|
||||
}
|
||||
|
||||
if len(repoInfo.Index.Mirrors) == 0 && ((repoInfo.Official && repoInfo.Index.Official) || endpoint.Version == registry.APIVersion2) {
|
||||
if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) {
|
||||
if repoInfo.Official {
|
||||
j := job.Eng.Job("trust_update_base")
|
||||
if err = j.Run(); err != nil {
|
||||
|
||||
@@ -539,7 +539,7 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status {
|
||||
return job.Errorf("Repository does not exist: %s", repoInfo.LocalName)
|
||||
}
|
||||
|
||||
if endpoint.Version == registry.APIVersion2 {
|
||||
if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 {
|
||||
err := s.pushV2Repository(r, localRepo, job.Stdout, repoInfo, tag, sf)
|
||||
if err == nil {
|
||||
return engine.StatusOK
|
||||
|
||||
Reference in New Issue
Block a user