From 18b7bd6663170c1d630b0b53e8373bc77ee57f80 Mon Sep 17 00:00:00 2001 From: Helen Kirk Date: Tue, 9 Apr 2024 10:20:48 -0700 Subject: [PATCH] Code to create and locally save a centos5 container, while it still exists online --- .../Dockerfiles/casa/centos5/CentOS-Base.repo | 73 +++++++++++++++++++ .../casa/centos5/CentOS-Debuginfo.repo | 21 ++++++ .../casa/centos5/CentOS-Sources.repo | 67 +++++++++++++++++ .../casa/centos5/CentOS-fasttrack.repo | 10 +++ .../Dockerfiles/casa/centos5/Dockerfile | 39 ++++++++++ .../Dockerfiles/casa/centos5/Makefile | 26 +++++++ .../Dockerfiles/casa/centos5/README | 12 +++ .../Dockerfiles/casa/centos5/libselinux.repo | 11 +++ 8 files changed, 259 insertions(+) create mode 100644 science-containers/Dockerfiles/casa/centos5/CentOS-Base.repo create mode 100644 science-containers/Dockerfiles/casa/centos5/CentOS-Debuginfo.repo create mode 100644 science-containers/Dockerfiles/casa/centos5/CentOS-Sources.repo create mode 100644 science-containers/Dockerfiles/casa/centos5/CentOS-fasttrack.repo create mode 100644 science-containers/Dockerfiles/casa/centos5/Dockerfile create mode 100644 science-containers/Dockerfiles/casa/centos5/Makefile create mode 100644 science-containers/Dockerfiles/casa/centos5/README create mode 100644 science-containers/Dockerfiles/casa/centos5/libselinux.repo diff --git a/science-containers/Dockerfiles/casa/centos5/CentOS-Base.repo b/science-containers/Dockerfiles/casa/centos5/CentOS-Base.repo new file mode 100644 index 0000000..1d1fb07 --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/CentOS-Base.repo @@ -0,0 +1,73 @@ +# CentOS-Base.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# +# If the mirrorlist= does not work for you, as a fall back you can try the +# remarked out baseurl= line instead. +# +# + +[base] +name=CentOS-$releasever - Base +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os +#baseurl=https://vault.centos.org/5.11/os/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/os/x86_64/ +#baseurl=http://linuxsoft.cern.ch/centos-vault/5.11/os/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/os/x86_64/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#released updates +[updates] +name=CentOS-$releasever - Updates +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates +#baseurl=https://vault.centos.org/5.11/updates/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/updates/x86_64/ +#baseurl=http://linuxsoft.cern.ch/centos-vault/5.11/updates/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/updates/x86_64/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras +#baseurl=https://vault.centos.org/5.11/extras/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/extras/x86_64/ +#baseurl=http://linuxsoft.cern.ch/centos-vault/5.11/extras/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/extras/x86_64/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +##additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus +#baseurl=https://vault.centos.org/5.11/centosplus/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/centosplus/x86_64/ +#baseurl=http://linuxsoft.cern.ch/centos-vault/5.11/centosplus/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/centosplus/x86_64/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#contrib - packages by Centos Users +[contrib] +name=CentOS-$releasever - Contrib +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib +#baseurl=http://vault.centos.org/5.11/centosplus/$basearch/ +#baseurl=https://vault.centos.org/5.11/contrib/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/contrib/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/contrib/x86_64/ +#baseurl=http://linuxsoft.cern.ch/centos-vault/5.11/contrib/x86_64 +gpgcheck=1 +# enabled to be able to install xorg-x11-server-Xvfb, ImageMagick-c++ and sssd-client +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#libselinux portion of this .repo deleted. It is a repeat of the separate +# libeselinux.repo file (and also directs to the same centosplus directory +# as already referenced earlier in this file. diff --git a/science-containers/Dockerfiles/casa/centos5/CentOS-Debuginfo.repo b/science-containers/Dockerfiles/casa/centos5/CentOS-Debuginfo.repo new file mode 100644 index 0000000..42629b5 --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/CentOS-Debuginfo.repo @@ -0,0 +1,21 @@ +# CentOS-Debuginfo.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# + +# All debug packages from all the various CentOS-5 releases +# are merged into a single repo, split by BaseArch +# +# Note: packages in the debuginfo repo are currently not signed +# + +[base-debuginfo] +name=CentOS-5 - Debuginfo +#baseurl=http://debuginfo.centos.org/5/$basearch/ +baseurl=http://debuginfo.centos.org/5/x86_64/ +gpgcheck=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +enabled=0 diff --git a/science-containers/Dockerfiles/casa/centos5/CentOS-Sources.repo b/science-containers/Dockerfiles/casa/centos5/CentOS-Sources.repo new file mode 100644 index 0000000..07dec5f --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/CentOS-Sources.repo @@ -0,0 +1,67 @@ +# CentOS-Sources.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# +# If the mirrorlist= does not work for you, as a fall back you can try the +# remarked out baseurl= line instead. +# +# + +[base-source] +name=CentOS-$releasever - Base Sources +#baseurl=http://vault.centos.org/centos/$releasever/os/Source/ +#baseurl=http://vault.centos.org/5.11/os/Source/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/os/Source +#baseurl=http://archive.kernel.org/centos-vault/5.11/os/SRPMS/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/os/Source/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#released updates +[updates-source] +name=CentOS-$releasever - Updates Sources +#baseurl=http://vault.centos.org/centos/$releasever/updates/Source/ +#baseurl=http://vault.centos.org/5.11/updates/Source/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/updates/Source/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/updates/Source/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#additional packages that may be useful +[extras-source] +name=CentOS-$releasever - Extras Sources +#baseurl=http://vault.centos.org/centos/$releasever/extras/Source/ +#baseurl=http://vault.centos.org/5.11/extras/Source/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/extras/Source/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/extras/Source/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#additional packages that extend functionality of existing packages +[centosplus-source] +name=CentOS-$releasever - Plus Sources +#baseurl=http://vault.centos.org/centos/$releasever/centosplus/Source/ +#baseurl=http://vault.centos.org/5.11/centosplus/Source/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/centosplus/Source/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/centosplus/Source/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + +#added for compatibility with the libselinux +#additional packages that extend functionality of existing packages +[libselinux-source] +name=CentOS-$releasever - libselinux Sources +#baseurl=http://vault.centos.org/centos/$releasever/centosplus/Source/ +#baseurl=http://vault.centos.org/5.11/centosplus/Source/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/centosplus/Source/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/centosplus/Source/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 diff --git a/science-containers/Dockerfiles/casa/centos5/CentOS-fasttrack.repo b/science-containers/Dockerfiles/casa/centos5/CentOS-fasttrack.repo new file mode 100644 index 0000000..f0cee5e --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/CentOS-fasttrack.repo @@ -0,0 +1,10 @@ +[fasttrack] +name=CentOS-5 - fasttrack +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=fasttrack +#baseurl=http://mirror.centos.org/centos/$releasever/fasttrack/$basearch/ +#baseurl=https://vault.centos.org/5.11/fasttrack/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/fasttrack/x86_64/ +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/fasttrack/x86_64/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 diff --git a/science-containers/Dockerfiles/casa/centos5/Dockerfile b/science-containers/Dockerfiles/casa/centos5/Dockerfile new file mode 100644 index 0000000..5823f1d --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/Dockerfile @@ -0,0 +1,39 @@ +FROM centos:5 +#this Dockerfile runs through the build of a centos5 container and saves it +# on images.canfar.net, to use as a base for the subsequent builds of +# older casa versions, because the web-based centos5 distributions are +# becoming unstable and unmaintained + + +# Override old repo info with current urls +# NB: this revised process is completely eliminating two of the original repos +# which are CentOS-Media.repo, for configuring CD installation, and +# CentOS-Vault.repo, which provides urls for all previous versions of +# CentOS 5 (current version here is 5.11) +# Default baseurl no longer works with yum, but luckily at least two +# of the other mirror sites do +# imagemagick-c++ won't yum install on http://archive.kernel.org/centos-vault +# everything incl imagemagick works on http://mirror.nsc.liu.se/centos-store/ +# (didn't do a full test of the only other mirror site, http://linuxsoft.cern.ch/centos-vault) + + +RUN rm /etc/yum.repos.d/* +ADD CentOS-Base.repo /etc/yum.repos.d/ +ADD CentOS-Debuginfo.repo /etc/yum.repos.d/ +ADD CentOS-Sources.repo /etc/yum.repos.d/ +ADD CentOS-fasttrack.repo /etc/yum.repos.d/ +ADD libselinux.repo /etc/yum.repos.d/ + +RUN yum clean all -y +#commented out - likely unnecessary? +#RUN yum makecache -y +RUN yum update -y + +RUN yum install -y freetype libSM libXi libXrender libXrandr \ + libXfixes libXcursor libXinerama fontconfig \ + libxslt xauth xorg-x11-server-Xvfb dbus-x11 \ + tkinter xterm perl +RUN yum install -y ImageMagick-c++ + +RUN yum install -y sssd-client acl which + diff --git a/science-containers/Dockerfiles/casa/centos5/Makefile b/science-containers/Dockerfiles/casa/centos5/Makefile new file mode 100644 index 0000000..b4a5623 --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/Makefile @@ -0,0 +1,26 @@ +VERSIONS = \ + 5 + +DOCKER_REPO_BASE=images.canfar.net/skaha/centos + +.PHONY: build clean run + +all: build + +build: + @- $(foreach V,$(VERSIONS), \ + docker build -t ${DOCKER_REPO_BASE}:$(V) .; \ + ) + +clean: + @- $(foreach V,$(VERSIONS), \ + docker rmi ${DOCKER_REPO_BASE}:$(V) ; \ + ) + +upload: build + @- $(foreach V,$(VERSIONS), \ + docker push ${DOCKER_REPO_BASE}:$(V) ; \ + ) + +clean_all: clean +upload_all: upload diff --git a/science-containers/Dockerfiles/casa/centos5/README b/science-containers/Dockerfiles/casa/centos5/README new file mode 100644 index 0000000..d23fc25 --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/README @@ -0,0 +1,12 @@ +At present, the files in this directory are to build a basic CentOS5 container +with all of the basic linux software dependencies needed for early CASA +versions (3.4 to 4.2). +The CentOS5 repos have lately been starting to fail (2/4 mirrors fail during +current builds, with various packages, etc). So this base container will +allow us to address any future casa container upgrades without having to +count on the ongoing stability of the remaining two centos5 mirror sites. + +UPDATE Feb 7, 2024: this code no longer builds a CentOS5 repo either, but +the one that built earlier is on harbor at skaha/centos. The coding here +is left in place in case it becomes necessary to try to rebuild again using +another mirror site which is perhaps not broken yet. diff --git a/science-containers/Dockerfiles/casa/centos5/libselinux.repo b/science-containers/Dockerfiles/casa/centos5/libselinux.repo new file mode 100644 index 0000000..f501169 --- /dev/null +++ b/science-containers/Dockerfiles/casa/centos5/libselinux.repo @@ -0,0 +1,11 @@ +[libselinux] +name=CentOS-$releasever - libselinux +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus +#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ +#baseurl=https://vault.centos.org/5.11/centosplus/x86_64/ +#baseurl=http://archive.kernel.org/centos-vault/5.11/centosplus/x86_64 +baseurl=http://mirror.nsc.liu.se/centos-store/5.11/centosplus/x86_64/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 +includepkgs=libselinux*