Skip to content

Commit

Permalink
use spec's ref instead of canonical ref when copying catalog image
Browse files Browse the repository at this point in the history
When used in conjuction with a "tag-only" registries.conf mirror
registry configuration, our containers/image unpacker fails. This is
because we resolve a canonical ref from the tag, and then use the
digest-based reference to actually copy the image, thus thwarting the
tag-only configuration.

This commit ensures that we always copy the image using the reference
provided in the spec.

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
  • Loading branch information
joelanford committed Oct 18, 2024
1 parent d70f01f commit 58b8eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/source/containers_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (i *ContainersImageRegistry) Unpack(ctx context.Context, catalog *catalogdv
// copy.Image can concurrently pull all the layers.
//
//////////////////////////////////////////////////////
dockerRef, err := docker.NewReference(canonicalRef)
dockerRef, err := docker.NewReference(imgRef)
if err != nil {
return nil, fmt.Errorf("error creating source reference: %w", err)
}
Expand Down

0 comments on commit 58b8eba

Please sign in to comment.