Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers: extend environment variables for passing registry credentials #37606

Closed
tmds opened this issue Dec 20, 2023 · 6 comments
Closed

Containers: extend environment variables for passing registry credentials #37606

tmds opened this issue Dec 20, 2023 · 6 comments
Assignees
Labels
Area-Containers Related to dotnet SDK containers functionality Area-NetSDK config-system-candidate Issues that could be solved cleanly if the .NET CLI had a git-like configuration system untriaged Request triage from a team member

Comments

@tmds
Copy link
Member

tmds commented Dec 20, 2023

Is your feature request related to a problem?

Currently, the container tooling allows to pass a single username/password for registry authentication. This proposal is for enabling separate credentials for the pull and push registry.

Describe the solution you'd like

Use the existing variables SDK_CONTAINER_REGISTRY_UNAME, SDK_CONTAINER_REGISTRY_PWORD for the registry the application image is pushed to.

Add new SDK_CONTAINER_PULL_REGISTRY_UNAME, SDK_CONTAINER_PULL_REGISTRY_PWORD for registry the base images are pulled from.

For backwards compatibility, the pull registry environment variables default to the push registry environment variables when the push and pull registries are the same.

cc @baronfel @richlander

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Dec 20, 2023
@baronfel
Copy link
Member

This is a reasonable change (though my own preference is to not use the environment variables as much as possible).

@richlander
Copy link
Member

PULL_REGISTRY feels a bit odd to me. I wonder if SOURCE is better than PULL.

I'm fine with ENVs. A more general config system would be a nice alternative. Is that something we can consider for this release?

@baronfel
Copy link
Member

baronfel commented Jan 3, 2024

+1 To Rich's naming comment - if we could use 'source' and 'target' names for the registries that would be great.

@richlander Re: a general config system, what kind/scope of configuration are you thinking here? Other tools have yaml/ini style files for describing the modifications necessary, but we've been leaning into MSBuild for at least the project-centric side of those container modifications.

@richlander
Copy link
Member

Here's an example to consider for a config system: #36072

@baronfel baronfel added Area-Containers Related to dotnet SDK containers functionality config-system-candidate Issues that could be solved cleanly if the .NET CLI had a git-like configuration system labels May 2, 2024
@richlander
Copy link
Member

Haven't relied more on registry PATs since my last comment, I do see that PUSH and PULL show up quite prominently.

@MichalPavlik
Copy link
Member

@tmds, I believe we resolved it some time ago and we forgot about this issue. Please reopen if I'm mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Containers Related to dotnet SDK containers functionality Area-NetSDK config-system-candidate Issues that could be solved cleanly if the .NET CLI had a git-like configuration system untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

5 participants