From b0dcc7910e1b2195fb43c2c8143ef5b9f320a0a1 Mon Sep 17 00:00:00 2001 From: Alex Coomans Date: Tue, 13 Jun 2023 19:25:18 -0500 Subject: [PATCH] Don't maintain URLs for foreign layers when pushing them Signed-off-by: Alex Coomans --- copy/single.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/copy/single.go b/copy/single.go index 9afdea73d..9f311cad0 100644 --- a/copy/single.go +++ b/copy/single.go @@ -406,6 +406,11 @@ func (ic *imageCopier) copyLayers(ctx context.Context) error { } } else { cld.destInfo, cld.diffID, cld.err = ic.copyLayer(ctx, srcLayer, toEncrypt, pool, index, srcRef, manifestLayerInfos[index].EmptyLayer) + + // It's already unset on cld.destInfo, this forces the manifest to be regenerated. + if len(srcLayer.URLs) != 0 { + srcInfosUpdated = true + } } data[index] = cld }