Files
container/Tests/ContainerClientTests
Aditya Ramani 0846bb6640 Create RequestScheme type to handle registry interactions (#6)
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>
2025-06-05 15:53:01 -07:00
..
2025-06-05 15:51:55 -07:00