docker-library / official-images

Primary source of truth for the Docker "Official Images" program
https://hub.docker.com/u/library
Apache License 2.0
6.44k stars 2.34k forks source link

CentOS 5 has reached EOL #2815

Closed frewsxcv closed 7 years ago

frewsxcv commented 7 years ago

https://wiki.centos.org/FAQ/General#head-fe8a0be91ee3e7dea812e8694491e1dde5b75e6d

Not sure what the policy is here for EOL distros.

Attempts to use the hosted repositories fail:

[00:01:07] Sending build context to Docker daemon 18.94 kB
[00:01:08] Step 1 : FROM centos:5
[00:01:08]  ---> 1ae98b2c895d
[00:01:08] Step 2 : WORKDIR /build
[00:01:08]  ---> Using cache
[00:01:08]  ---> 153bd766622b
[00:01:08] Step 3 : RUN yum upgrade -y && yum install -y       curl       bzip2       gcc       gcc-c++       make       glibc-devel       perl       zlib-devel       file       xz       which       pkgconfig       wget       autoconf       gettext
[00:01:08]  ---> Running in e14615c13966
[00:01:08] Loaded plugins: fastestmirror
[00:01:08] Determining fastest mirrors
[00:01:09]  * base: mirror.steadfast.net
[00:01:09]  * extras: repo.us.bigstepcloud.com
[00:01:09]  * libselinux: repo.us.bigstepcloud.com
[00:01:09]  * updates: repos.forethought.net
[00:01:09] http://mirror.steadfast.net/centos/5.11/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:09] Trying other mirror.
[00:01:09] http://mirror.trouble-free.net/centos/5.11/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:09] Trying other mirror.
[00:01:09] http://mirror.cs.vt.edu/pub/CentOS/5.11/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:09] Trying other mirror.
[00:01:11] http://repo.us.bigstepcloud.com/centos/5.11/extras/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:11] Trying other mirror.
[00:01:11] http://repo.us.bigstepcloud.com/centos/5.11/centosplus/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:11] Trying other mirror.
[00:01:11] http://centos.chi.host-engine.com/5.11/centosplus/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:11] Trying other mirror.
[00:01:11] http://mirror.cs.uwp.edu/pub/centos/5.11/centosplus/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:11] Trying other mirror.
[00:01:12] http://repos.forethought.net/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.steadfast.net/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.nexcess.net/CentOS/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.us.oneandone.net/linux/distributions/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.cs.pitt.edu/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.vtti.vt.edu/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.metrocast.net/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:12] http://mirror.millry.co/CentOS/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:12] Trying other mirror.
[00:01:14] http://centos.blazar.mx/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:14] Trying other mirror.
[00:01:14] http://mirror.hostduplex.com/centos/5.11/updates/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
[00:01:14] Trying other mirror.
[00:01:14] Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates. Please verify its path and try again
[00:01:14] The command '/bin/sh -c yum upgrade -y && yum install -y       curl       bzip2       gcc       gcc-c++       make       glibc-devel       perl       zlib-devel       file       xz       which       pkgconfig       wget       autoconf       gettext' returned a non-zero code: 1
TimNN commented 7 years ago

The repositories seem to be archived at http://vault.centos.org/, so we currently use the following to make things work again:

RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
RUN sed -i 's/#\(baseurl.*\)mirror.centos.org/\1vault.centos.org/' /etc/yum.repos.d/*.repo
yosifkit commented 7 years ago

cc CentOS image maintainer: @jperrin. Will there be a "bump" to the centos:5 and centos:5.11 images to make them work with vault.centos.org? Or are they going to be dropped now that it is EOL?

jperrin commented 7 years ago

It will be dropped now that it's EOL.

alexcrichton commented 7 years ago

@jperrin thanks for the info. To clarify, does that mean that commands like FROM centos:5 will just stop working?

If so, out of curiosity, we use centos:5 to get a super old glib to produce "maximally compatible" libraries. Do you know of an alternate method of doing so?

jperrin commented 7 years ago

The glib in centos:6 should be old enough to get you a build compatible with everything sane.

My preference would be for the centos:5 and centos:5.11 containers to be removed, but for the moment all we've done is archive the repos to vault. You could simply drop a custom repository file in place that points to vault for your installs, rather than the default mirrorlist.

This would add a new line to the dockerfile, and another layer to the container, but shouldn't be that big a change.

frewsxcv commented 7 years ago

Looks like CentOS 5 things are gone from the vault now.

frewsxcv commented 7 years ago

Disregard last comment. Turns out we were looking at the wrong vault URL. http://vault.centos.org/5.11/ still has contents.

ppanyukov commented 7 years ago

@TimNN The last line there seems to point to non-existing things. I think these lines should be:

sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
sed -i 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=http://vault.centos.org/5.11|' /etc/yum.repos.d/*.repo

EDIT: fixed the last line

tianon commented 7 years ago

See also https://github.com/docker-library/official-images/pull/2865 where CentOS 5 was removed from the list of supported versions (although tags for using it are still available currently).

alanfranz commented 7 years ago

Hello, just a small notification: I had opened

https://github.com/CentOS/sig-cloud-instance-images/issues/79

raising exactly the same issue, by following the "Where to file issues" link; there was no update to such issue. Did I misunderstand the link, or should it stand corrected?