Containers: fix handling of ContainerBaseImage without a registry.#32876
Containers: fix handling of ContainerBaseImage without a registry.#32876baronfel merged 5 commits intodotnet:mainfrom
Conversation
These images are meant to be pulled from Docker Hub.
The wrong hostname was used for the registry ('registry-1.docker.io' vs 'docker.io').
The parsing of names like 'ubuntu/dotnet-runtime' lead to 'ubuntu' being treated as the
registry.
This also enables using 'docker.io' as an alias to the Docker registry.
And adds the required 'library/' prefixing for short-names (like 'ubuntu' to 'library/ubuntu').
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
I've added a commit that addresses dotnet/sdk-container-builds#443 too. |
src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs
Show resolved
Hide resolved
baronfel
left a comment
There was a problem hiding this comment.
Thanks for this! Lovely usability changes all around.
|
I'm testing this locally on baronfel/sdk-container-demo and running into a runtime crash when trying to target the My first guess - I'm running that repo on the public preview4 bits - did something change in the Regex generator and since the SDK might be using a more recent runtime there's now a mismatch? I'm trying to validate the end-to-end user experience before I merge here. Looks like a similar issue to dotnet/runtime#85913 (comment)? |
|
Yes, I believe the issue is on my side. Using the SDK's However, working against Docker's registry exposed another gap - docker seems to prefer/send OCI Image manifests, not 'docker' content types. Here's what we send However, those all return a 404. When I request |
These images are meant to be pulled from Docker Hub.
The wrong hostname was used for the registry ('registry-1.docker.io' vs 'docker.io').
The parsing of names like 'ubuntu/dotnet-runtime' lead to 'ubuntu' being treated as the registry.
This also enables using 'docker.io' as an alias to the Docker registry.
And adds the required 'library/' prefixing for short-names (like 'ubuntu' to 'library/ubuntu').
@baronfel ptal.
Fixes dotnet/sdk-container-builds#445
Fixes dotnet/sdk-container-builds#444
Fixes dotnet/sdk-container-builds#443