CentOS / sig-cloud-instance-images

CentOS cloud images
777 stars 559 forks source link

[centos8] Updating rpm appears to break repository access #159

Closed gquintard closed 4 years ago

gquintard commented 4 years ago

Hi,

Apologies if this isn't the proper place to report a bug. I have a minimal Dockerfile that fails:

FROM centos:8
RUN yum install -y rpm
RUN yum install -y zip -v

If rpm isn't updated, then zip is correctly installed. Here's the log:

DNF version: 4.0.9
cachedir: /var/cache/dnf
repo: downloading from remote: AppStream
CentOS-8.0 - AppStream                           28  B/s |  38  B     00:01    
Cannot download 'http://mirrorlist.centos.org/?release=8.0&arch=x86_64&repo=AppStream&infra=container': Cannot prepare internal mirrorlist: No URLs in mirrorlist.
repo: downloading from remote: BaseOS
CentOS-8.0 - Base                                34  B/s |  38  B     00:01    
Cannot download 'http://mirrorlist.centos.org/?release=8.0&arch=x86_64&repo=BaseOS&infra=container': Cannot prepare internal mirrorlist: No URLs in mirrorlist.
repo: downloading from remote: extras
CentOS-8.0 - Extras                              35  B/s |  38  B     00:01    
Cannot download 'http://mirrorlist.centos.org/?release=8.0&arch=x86_64&repo=extras&infra=container': Cannot prepare internal mirrorlist: No URLs in mirrorlist.
Failed to synchronize cache for repo 'AppStream', ignoring this repo.
Failed to synchronize cache for repo 'BaseOS', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
No module defaults found
No match for argument: zip
Error: Unable to find a match
The command '/bin/sh -c yum install -y zip -v' returned a non-zero code: 1

curling http://mirrorlist.centos.org/?release=8.0&arch=x86_64&repo=extras&infra=container indeed returns:

Invalid release/repo/arch combination

but changing release=8.0 to release=8 returns a valid response.

I'm not a centos expert, so I tried to add as much relevant info as possible, but I probably missed some, please let me know if that's the case.

gquintard commented 4 years ago

docker pull centos:8 fixed the issue, if that helps anyone.

closing.