Skip to content

Commit

Permalink
Don't try cross-origin mounting against dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr committed Jun 22, 2023
1 parent 2472cbb commit d369248
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/v1/remote/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,15 @@ func (w *writer) uploadOne(ctx context.Context, l v1.Layer) error {
if err := w.maybeUpdateScopes(ctx, ml); err != nil {
return err
}

from = ml.Reference.Context().RepositoryStr()
origin = ml.Reference.Context().RegistryStr()

// This keeps breaking with DockerHub.
if w.repo.RegistryStr() == name.DefaultRegistry && origin != w.repo.RegistryStr() {
from = ""
origin = ""
}
}

location, mounted, err := w.initiateUpload(ctx, from, mount, origin)
Expand Down

0 comments on commit d369248

Please sign in to comment.