diff --git a/.dockerignore b/.dockerignore index dbcea137316718..290780ffe453fa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,3 +15,4 @@ !shell.nix !vcpkg-configuration.json !vcpkg.json +!dockerfiles/CentOS-Base.repo diff --git a/.github/workflows/prebuild-docker.yml b/.github/workflows/prebuild-docker.yml index a67d3bd8903574..3c57717d17acf6 100644 --- a/.github/workflows/prebuild-docker.yml +++ b/.github/workflows/prebuild-docker.yml @@ -27,6 +27,7 @@ jobs: "ubuntu-20.04", "rockylinux-8", "centos-8", + "centos-7" ] fail-fast: false diff --git a/dockerfiles/CentOS-Base.repo b/dockerfiles/CentOS-Base.repo new file mode 100644 index 00000000000000..66ec9ac2b943eb --- /dev/null +++ b/dockerfiles/CentOS-Base.repo @@ -0,0 +1,45 @@ +# /etc/yum.repos.d/CentOS-Base.repo + +[base] +name=CentOS-$releasever - Base +baseurl=http://vault.centos.org/7.9.2009/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[updates] +name=CentOS-$releasever - Updates +baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[extras] +name=CentOS-$releasever - Extras +baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[centosplus] +name=CentOS-$releasever - Plus +baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[contrib] +name=CentOS-$releasever - Contrib +baseurl=http://vault.centos.org/7.9.2009/contrib/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[sclo] +name=CentOS-$releasever - sclo +baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/sclo/ +gpgcheck=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +[rh] +name=CentOS-$releasever - rh +baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/rh/ +gpgcheck=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + diff --git a/dockerfiles/centos-7.dockerfile b/dockerfiles/centos-7.dockerfile index 124cac0fb9d513..55ded29d8a0388 100644 --- a/dockerfiles/centos-7.dockerfile +++ b/dockerfiles/centos-7.dockerfile @@ -1,9 +1,12 @@ FROM centos:centos7.9.2009 AS base_build +COPY dockerfiles/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo + # Build Tools --- +RUN yum clean all && yum update -y && yum install -y \ + https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm + RUN yum update -y && yum install -y \ - centos-release-scl \ - https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && \ yum group install -y "Development Tools" && yum install -y \ autoconf \ autoconf-archive \ @@ -18,10 +21,9 @@ RUN yum update -y && yum install -y \ unzip \ yum-utils \ zip && \ + yum install -y devtoolset-11 && \ yum -y clean all && rm -rf /var/cache -RUN yum install -y devtoolset-11 - RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc SHELL ["/bin/bash", "--login", "-c"]