Skip to content

registry.mirror does not support rooted FQDN #2948

@baryluk

Description

@baryluk

/etc/containers/registries.conf.d/099-example.conf with this content:

[[registry]]
prefix = "docker.io"
insecure = false
blocked = false
location = "docker.io"

[[registry.mirror]]
location = "my-mirror.example.com.:5500/"

Causes weird error message:

$ buildah from --pull debian:bullseye-slim 
Trying to pull docker.io/library/debian:bullseye-slim...
Error: unable to copy from source docker://debian:bullseye-slim: initializing source docker://debian:bullseye-slim: rewriting reference: invalid reference format

Same issue happens if I use location = "docker.io" in the [[registry]] section.

Rooted FQDN are useful, to skip DNS search list. This especially useful in k8s clusters with search list being very long and with high ndots value in resolve.conf. This not only improves performance (some dns clients might even timeout before finishing whole search) , it also queries less DNS servers and help prevent leaking names to unwanted DNS servers.

$ buildah  --version
buildah version 1.41.3 (image-spec 1.1.1, runtime-spec 1.2.1)

on Fefora 42, amd64.

containers-common-0.64.1-2.fc42.noarch
containers-common-extra-0.64.1-2.fc42.noarch
buildah-1.41.3-1.fc42.x86_64
podman-5.6.0-1.fc42.x86_64

From my experience, essentially all tools, libraries and programming languages do support trailing . in domain names and URL. This does include docker too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions