Broken Fedora repository

Hello,

I have a Dockerfile recipe that stopped working overnight, when using the Fedora repository. It seems it has been updated two days ago and I can replicate the issue on all my machines. Do you know anything about it?

Here is the reproduceable Dockerfile:


$ cat << 'eol' > Dockerfile
FROM fedora:latest
RUN dnf install -y dnf-plugins-core
RUN dnf config-manager \
          --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
RUN dnf install -y \
      docker-ce docker-ce-cli \
      containerd.io \
      docker-buildx-plugin \
      docker-compose-plugin
RUN bash --version \
 && aws --version
eol

Here is the building command:

$ time docker build -t docker-in-fedora:1 .
[+] Building 4.3s (7/8)                                                                                                                                                                                                                                                                                                                                                                                                                 
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                                                                                               0.0s
 => => transferring dockerfile: 499B                                                                                                                                                                                                                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                                                                                  0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/fedora:latest                                                                                                                                                                                                                                                                                                                                                                   0.8s
 => [1/5] FROM docker.io/library/fedora:latest@sha256:a1aff3e01bb667ededb2e4d895a1f1f88b7d329bd22402d4a5ba5e7f1c7a48cb                                                                                                                                                                                                                                                                                                             0.0s
 => CACHED [2/5] RUN dnf install -y dnf-plugins-core                                                                                                                                                                                                                                                                                                                                                                               0.0s
 => [3/5] RUN dnf config-manager           --add-repo https://download.docker.com/linux/fedora/docker-ce-staging.repo                                                                                                                                                                                                                                                                                                              0.8s
 => ERROR [4/5] RUN dnf install -y     docker-ce docker-ce-cli       containerd.io       docker-buildx-plugin       docker-compose-plugin                                                                                                                                                                                                                                              2.6s
------                                                                                                                                                                                                                                                                                                                                                                                                                                  
 > [4/5] RUN dnf install -y     docker-ce docker-ce-cli       containerd.io       docker-buildx-plugin       docker-compose-plugin:                                                                                                                                                                                                                                                         
#0 1.406 Docker CE Stable - x86_64                       2.9 kB/s | 2.4 kB     00:00                                                                                                                                                                                                                                                                                                                                                    
#0 2.450 No match for argument: docker-ce                                                                                                                                                                                                                                                                                                                                                                                               
#0 2.465 No match for argument: docker-ce-cli                                                                                                                                                                                                                                                                                                                                                                                           
#0 2.481 No match for argument: docker-buildx-plugin                                                                                                                                                                                                                                                                                                                                                                                    
#0 2.497 No match for argument: docker-compose-plugin
#0 2.521 Error: Unable to find a match: docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
------
Dockerfile:6
--------------------
   5 |               #--add-repo https://download.docker.com/linux/fedora/docker-ce.repo
   6 | >>> RUN dnf install -y \
   7 | >>>       docker-ce docker-ce-cli \
   8 | >>>       containerd.io \
   9 | >>>       docker-buildx-plugin \
  10 | >>>       docker-compose-plugin
  11 |     RUN bash --version \
--------------------
ERROR: failed to solve: process "/bin/sh -c dnf install -y     docker-ce docker-ce-cli       containerd.io       docker-buildx-plugin       docker-compose-plugin" did not complete successfully: exit code: 1

Going to Index of linux/fedora/, I can see the repository has been updated 2 days ago. That might be a hint since the timing matches perfectly.

Thank you,

You are using the latest tag and Fedora 38 came out recently. Always use a specific version for every image. Use “latest” only when you don’t care what version you have and just want to test something for a short time.

USe this FROM instruction:

FROM fedora:37

Docker is not supported on Fedora 38 yet.

1 Like