Create RequestScheme type to handle registry interactions#6
Merged
adityaramani merged 2 commits intomainfrom Jun 4, 2025
Merged
Create RequestScheme type to handle registry interactions#6adityaramani merged 2 commits intomainfrom
adityaramani merged 2 commits intomainfrom
Conversation
Contributor
|
@adityaramani - can we include the text you have in this PR in the commit itself? I feel like it'd be more useful to see it when reviewing git history (its a good writeup) |
Contributor
Author
|
@egernst Yes - thats the default behavior on merge. The PR title + description get added as part of the commit that goes to main |
Contributor
|
Ah, got it - great. Thanks Aditya. |
jglogan
requested changes
Jun 4, 2025
jglogan
reviewed
Jun 4, 2025
6ac025a to
3333f02
Compare
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
3333f02 to
ea1d1b8
Compare
jglogan
approved these changes
Jun 4, 2025
katiewasnothere
pushed a commit
that referenced
this pull request
Jun 5, 2025
Its a bit weird to have to pass `--http` when pulling / pushing images if we are trying to do so from a local registry This PR adds a `RequestScheme` enum type which tries to detect if the connection to the registry should be over http or https. This auto detection is the default behavior and can be overridden by passing the `--scheme http/https` flag to the `run` ,`pull`, `push` `login` and `registry default` command The auto detection works by looking at the hostname / IP. HTTP is used in the following cases - If the hostname starts with `localhost` or is `127.x.x.x` - if the host looks like an IP from the private address space - If the host ends with the current default dns domain name Also in this PR: - Removing some used CLI flag groups and TODOs - Better error messages when registry credentials are not found for a host Signed-off-by: Aditya Ramani <a_ramani@apple.com>
owenarthur
pushed a commit
to owenarthur/container
that referenced
this pull request
Jun 10, 2025
Its a bit weird to have to pass `--http` when pulling / pushing images if we are trying to do so from a local registry This PR adds a `RequestScheme` enum type which tries to detect if the connection to the registry should be over http or https. This auto detection is the default behavior and can be overridden by passing the `--scheme http/https` flag to the `run` ,`pull`, `push` `login` and `registry default` command The auto detection works by looking at the hostname / IP. HTTP is used in the following cases - If the hostname starts with `localhost` or is `127.x.x.x` - if the host looks like an IP from the private address space - If the host ends with the current default dns domain name Also in this PR: - Removing some used CLI flag groups and TODOs - Better error messages when registry credentials are not found for a host Signed-off-by: Aditya Ramani <a_ramani@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Its a bit weird to have to pass
--httpwhen pulling / pushing images if we are trying to do so from a local registryThis PR adds a
RequestSchemeenum type which tries to detect if the connection to the registry should be over http or https. This auto detection is the default behavior and can be overridden by passing the--scheme http/httpsflag to therun,pull,pushloginandregistry defaultcommandThe auto detection works by looking at the hostname / IP. HTTP is used in the following cases
localhostor is127.x.x.xAlso in this PR:
Signed-off-by: Aditya Ramani a_ramani@apple.com