diff --git a/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-Base.repo b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-Base.repo new file mode 100644 index 0000000..c748288 --- /dev/null +++ b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-Base.repo @@ -0,0 +1,40 @@ +# 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 packages for reinstall +[base] +name=CentOS-$releasever - Base +baseurl=https://archive.kernel.org/centos-vault/7.9.2009/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +#released updates +[updates] +name=CentOS-$releasever - Updates +baseurl=https://archive.kernel.org/centos-vault/7.9.2009/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +baseurl=https://archive.kernel.org/centos-vault/7.9.2009/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +#additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus +baseurl=https://archive.kernel.org/centos-vault/7.9.2009/centosplus/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 diff --git a/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-SCL.repo b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-SCL.repo new file mode 100644 index 0000000..9ae0f53 --- /dev/null +++ b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/CentOS-SCL.repo @@ -0,0 +1,6 @@ +[C7.9.2009-sclo] +name=CentOS-7.9.2009 - SCLO +baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/rh/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo +enabled=1 diff --git a/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/Dockerfile b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/Dockerfile new file mode 100644 index 0000000..66fad61 --- /dev/null +++ b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/Dockerfile @@ -0,0 +1,59 @@ +FROM centos:7.9.2009 + +COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo + +RUN yum update -y \ + && yum install -y \ + bzip2 \ + file \ + git \ + patch \ + python3 \ + vim \ + gettext + +COPY CentOS-SCL.repo /etc/yum.repos.d/CentOS-SCL.repo + +RUN yum install -y centos-release-scl \ + && rm -f rm /etc/yum.repos.d/CentOS-SCLo*.repo \ + && yum install -y devtoolset-10 + +RUN rm -rf rm -f /lib64/libcrypt.so \ + && ldconfig -v + +RUN python3 -m pip install boto3 + +ENV BOOTSTRAP_DIR=/usr/local/spack-tools + +COPY /spack.yaml /spack.yaml.pre + +RUN envsubst < spack.yaml.pre > spack.yaml \ + && rm spack.yaml.pre + +RUN export S=/tmp/spack \ + && git clone https://github.com/spack/spack $S \ + && (cd $S && git checkout 4f9aa6004b4324bc819fcb25f4ed9acaa6cf11bc) \ + && . $S/share/spack/setup-env.sh \ + && export SPACK_DISABLE_LOCAL_CONFIG=1 \ + && spack config add 'config:build_stage:$spack/build_stage' \ + && spack config add "config:db_lock_timeout:360" \ + && spack config add "config:connect_timeout:60" \ + && spack mirror add bootstrap https://cache.e4s.io/spack-bootstrap/centos7-glibc2.17-libcrypt1/2024.11.20/pad256 \ + && spack buildcache keys -it \ + && spack -e . concretize -f | tee concretize.log \ + && spack -e . install --cache-only \ + && spack clean -a \ + && mv spack.yaml spack.lock concretize.log $BOOTSTRAP_DIR/ \ + && rm -rf $S .spack-env Makefile ~/.spack + +RUN cd /tmp \ + && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + && unzip awscliv2.zip \ + && ./aws/install \ + && rm -rf awscliv2.zip aws + +RUN echo source scl_source enable devtoolset-10 >> /etc/bashrc \ + && echo export PATH=$BOOTSTRAP_DIR/view/bin:'${PATH}' >> /etc/bashrc + +ENV PATH=$BOOTSTRAP_DIR/view/bin:$PATH +ENV LC_ALL=en_US.UTF-8 diff --git a/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/build.sh b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/build.sh new file mode 100755 index 0000000..e5aa75e --- /dev/null +++ b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash -e + +BUILD_DATE=$(printf '%(%Y.%m.%d)T' -1) +BUILD_TAG=${BUILD_TAG:-${BUILD_DATE}} +BUILD_NAME=centos7-builder-amd64-gcc10.2.1-glibc2.17-libcrypt1 + +REGISTRY=${REGISTRY:-ghcr.io/spack/spack} +OUTPUT_IMAGE="${REGISTRY}/${BUILD_NAME}:${BUILD_TAG}" + +docker build \ + -t "${OUTPUT_IMAGE}" \ + . diff --git a/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/spack.yaml b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/spack.yaml new file mode 100644 index 0000000..2df3c2e --- /dev/null +++ b/Dockerfiles/centos7-builder-amd64-gcc-10.2.1-glibc2.17-libcrypt1/spack.yaml @@ -0,0 +1,24 @@ +spack: + view: + default: + root: $BOOTSTRAP_DIR/view + link: roots + + config: + install_tree: + root: $BOOTSTRAP_DIR/install + + concretizer: + reuse: true + unify: when_possible + + packages: + all: + require: '%gcc target=x86_64' + + specs: + - gmake + - gnupg + - libtree + - patchelf + - git