diff --git a/distribution/xfer/download.go b/distribution/xfer/download.go index 4370e72e13..8bd48646d4 100644 --- a/distribution/xfer/download.go +++ b/distribution/xfer/download.go @@ -126,6 +126,11 @@ func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS ima topLayer = l missingLayer = false rootFS.Append(diffID) + // Register this repository as a source of this layer. + withRegistered, hasRegistered := descriptor.(DownloadDescriptorWithRegistered) + if hasRegistered { + withRegistered.Registered(diffID) + } continue } }