DefaultRegistry does not work
tmds opened this issue · comments
Tom Deseyn commented
A short-name base image like:
<ContainerBaseImage>ubuntu/dotnet-runtime:6.0-22.04_beta</ContainerBaseImage>
is meant to use the hard-coded DefaultRegistry
of docker.io
.
Instead, it treats ubuntu
as the registry:
error MSB4018: The "CreateNewImage" task failed unexpectedly. [/home/tmds/repos/web/web.csproj]
error MSB4018: System.Net.Http.HttpRequestException: Name or service not known (ubuntu:443) [/home/tmds/repos/web/web.csproj]
Chet Husk commented
We need to detect and insert a default registry here during parameter validation - we should default to either registry.hub.docker.com
or registry-1.docker.io
(the known docker hub aliases that actually follow the V2 API spec) here. The Docker tooling uses registry-1.docker.io
here, so we should do the same.