How to use the registry.fedoraproject.org/fedora images

With the docker.io/library/ubuntu:20.04 images, I can at least perform an update, then upgrade, or install packages. However, when I tried that in the registry.fedoraproject.org/fedora:35 image, it got the following errors.

āžœ  ~ skopeo inspect docker://registry.fedoraproject.org/fedora
{
    "Name": "registry.fedoraproject.org/fedora",
    "Digest": "sha256:2d697a06d17691e87212cf248f499dd47db2e275dfe642ffca5975353ea89887",
    "RepoTags": [
        "34-aarch64",
        "34-ppc64le",
        "34-x86_64",
        "34",
        "34-s390x",
        "34-armhfp",
        "33-armhfp",
        "32-armhfp",
        "35-aarch64",
        "35-ppc64le",
        "35-s390x",
        "35-x86_64",
        "35",
        "35-armhfp",
        "36-aarch64",
        "36-armhfp",
        "36-ppc64le",
        "36-s390x",
        "36-x86_64",
        "30-aarch64",
        "30-ppc64le",
        "30-s390x",
        "30-x86_64",
        "30",
        "latest",
        "rawhide",
        "30-armhfp",
        "36",
        "31-aarch64",
        "31-x86_64",
        "31",
        "31-armhfp",
        "31-s390x",
        "31-ppc64le",
        "32-aarch64",
        "32-ppc64le",
        "32-s390x",
        "32-x86_64",
        "32",
        "33-aarch64",
        "33-ppc64le",
        "33-s390x",
        "33-x86_64",
        "33"
    ],
    "Created": "2021-11-25T06:49:26Z",
    "DockerVersion": "1.10.1",
    "Labels": {
        "license": "MIT",
        "name": "fedora",
        "vendor": "Fedora Project",
        "version": "35"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:4545346f2a492b62d5a82682efe19b0e8e7583d5c19f75a74c81d62ec536c32d"
    ],
    "Env": [
        "DISTTAG=f35container",
        "FGC=f35",
        "container=oci"
    ]
}
āžœ  ~ podman pull docker://registry.fedoraproject.org/fedora:35
Trying to pull docker://registry.fedoraproject.org/fedora:35...
Getting image source signatures
Copying blob 4545346f2a49 done  
Copying config 3059bef432 done  
Writing manifest to image destination
Storing signatures
3059bef432ebb91a6a51d8f5cf20b033041dbddb3cab79628c1eb3412cbde0ae
āžœ  ~ podman run --rm -it registry.fedoraproject.org/fedora:35 /bin/bash
[root@d46c604cc173 /]# dnf update
Fedora 35 - x86_64                                                                                                                                                                                           0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'fedora':
  - Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 [getaddrinfo() thread failed to start]
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 [getaddrinfo() thread failed to start]

I can tell that the container cannot resolve the FQDN. Is there a way to tell the container how to do that?

1 Like

Apparently you have a problem with DNS that needs to be fixed first:

sudo dnf install systemd-resolved
sudo systemctl --now enable systemd-resolved.service
sudo systemctl restart systemd-resolved.service