cnabio / cnab-to-oci

Tool to convert CNAB bundle.json to OCI index
Apache License 2.0
54 stars 41 forks source link

convert to hostname if needed when trying to authenticate #84

Closed eunomie closed 4 years ago

eunomie commented 4 years ago

Used for the push using Docker's cli. See https://github.com/docker/cli/blob/23446275646041f9b598d64c51be24d5d0e49376/cli/config/credentials/file_store.go#L32-L47 (current used revision) to have more information about this fix.

By example if you are logged on multiple registries, you can have something like that in your config.json.

{
        "auths": {
                "https://index.docker.io/v1/": {},
                "quay.io": {},
        }
}

This fix allows to handle auth configurations with and without http[s]:// prefix.