Skip to content

fix: normalize Docker Hub single-component refs with library/ prefix#1946

Open
knp-sap wants to merge 1 commit intoopen-component-model:mainfrom
knp-sap:fix/docker-hub-library-prefix
Open

fix: normalize Docker Hub single-component refs with library/ prefix#1946
knp-sap wants to merge 1 commit intoopen-component-model:mainfrom
knp-sap:fix/docker-hub-library-prefix

Conversation

@knp-sap
Copy link
Copy Markdown

@knp-sap knp-sap commented May 6, 2026

When docker.io is explicitly specified as the hostname with a single-component repository name (e.g. docker.io/bash:5.3.9), ParseRef now correctly normalizes it to docker.io/library/bash:5.3.9.

Previously, only bare image names (bash:5.3.9) received the library/ prefix via DockerLibraryReferenceRegexp. When docker.io was explicit, the reference matched ReferenceRegexp instead, which did not perform Docker Hub normalization.

@knp-sap knp-sap requested a review from a team as a code owner May 6, 2026 12:46
@github-actions github-actions Bot added kind/bugfix Bug size/xs Extra small labels May 6, 2026
When docker.io is explicitly specified as the hostname with a
single-component repository name (e.g. docker.io/bash:5.3.9), ParseRef
now correctly normalizes it to docker.io/library/bash:5.3.9.

Previously, only bare image names (bash:5.3.9) received the library/
prefix via DockerLibraryReferenceRegexp. When docker.io was explicit,
the reference matched ReferenceRegexp instead, which did not perform
Docker Hub normalization. This caused downstream tools (e.g. OCM CLI
component transfers) to fail when resolving official Docker Hub images
specified with an explicit docker.io host.

Signed-off-by: Kostadin Plachkov <kostadin.plachkov@sap.com>
@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented May 6, 2026

Interesting. Did this cause any problems anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugfix Bug size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants