dotnet / dotnet/sdk

Container builds: parameter to set container registry for the base image without specifying the exact image name and tag

Open
#42,140 0 comments 0 reactions 0 assignees View on GitHub
Area-NetSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

Right now we can set container base image via ContainerBaseImage property
>```xml
> mcr.microsoft.com/dotnet/runtime:6.0
>```
As per documentation, this is required to be a full image address including the verison:

>If you set a value here, you should set the fully-qualified name of the image to use as the base, including any tag you prefer

We use an image cache proxy for mcr registry, but doing that would override the default logic to select the base image

> By default, we will infer the following values for you based on the properties of your project:
>- if your project is self-contained, we use the mcr.microsoft.com/dotnet/runtime-deps image as the base image
>- if your project is an ASP.NET Core project, we use the mcr.microsoft.com/dotnet/aspnet image as the base image
>- otherwise we use the mcr.microsoft.com/dotnet/runtime image as the base image

.. including the version which is inferred from ``.

Ideally there would be another property (or perhaps reusing ContainerBaseImage) to set the registry base endpoint and hand off the rest to the sdk, for example:

```xml
internal-mcr-proxy.com
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.