Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Oct 10, 2024

Motivation

The --default-registry parameter (also set by the CONTAINERTOOL_DEFAULT_REGISTRY environment variable) allows a default registry address to be specified for unqualified image names. For example, the following uploads should be equivalent:

containertool --default-registry myregistry.com --repository myrepo/myimage --from baserepo/baseimage
containertool --repository myregistry.com/myrepo/myimage --from baserepo/baseimage

However the default registry was only being applied when fetching the base image (the --from parameter) and not when pushing the final image (the --repository parameter).

Modifications

The default registry parameter is now used when pushing the final image.

Result

Pushes to unqualified repositories will work properly.

Test Plan

Manually tested containertool uploads with a variety of qualified and unqualified image names.

@euanh euanh added kind/bug Something isn't working semver/patch No public API change. labels Oct 10, 2024
@euanh euanh merged commit f9fb45a into apple:main Oct 10, 2024
14 checks passed
@euanh euanh deleted the use-base-image-for-uploads branch October 10, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant