diff --git a/.github/workflows/test-containers.yml b/.github/workflows/test-containers.yml index dab7519c..51d6c3f1 100644 --- a/.github/workflows/test-containers.yml +++ b/.github/workflows/test-containers.yml @@ -8,4 +8,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the Docker image - run: docker build . --file containers/Dockerfile.EESSI-client-pilot-centos7 + run: docker build . --file containers/Dockerfile.EESSI-client-pilot-centos7-x86_64 diff --git a/containers/Dockerfile.EESSI-client-pilot-centos7-arm64v8 b/containers/Dockerfile.EESSI-client-pilot-centos7-aarch64 similarity index 90% rename from containers/Dockerfile.EESSI-client-pilot-centos7-arm64v8 rename to containers/Dockerfile.EESSI-client-pilot-centos7-aarch64 index d89c6330..23ca37d4 100644 --- a/containers/Dockerfile.EESSI-client-pilot-centos7-arm64v8 +++ b/containers/Dockerfile.EESSI-client-pilot-centos7-aarch64 @@ -3,7 +3,7 @@ FROM docker.io/arm64v8/centos:7 RUN yum install -y http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-release-latest.noarch.rpm \ && yum install -y cvmfs cvmfs-fuse3 --nogpgcheck \ && yum install -y cvmfs-config-default sudo vim openssh-clients \ - && yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.1/cvmfs-config-eessi-0.2.1-1.noarch.rpm + && yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.3/cvmfs-config-eessi-0.2.3-1.noarch.rpm RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \ && echo 'CVMFS_HTTP_PROXY="DIRECT"' >> /etc/cvmfs/default.local diff --git a/containers/Dockerfile.EESSI-client-pilot-centos7 b/containers/Dockerfile.EESSI-client-pilot-centos7-x86_64 similarity index 89% rename from containers/Dockerfile.EESSI-client-pilot-centos7 rename to containers/Dockerfile.EESSI-client-pilot-centos7-x86_64 index 569bbe58..e0cf2415 100644 --- a/containers/Dockerfile.EESSI-client-pilot-centos7 +++ b/containers/Dockerfile.EESSI-client-pilot-centos7-x86_64 @@ -2,7 +2,7 @@ FROM docker.io/library/centos:7.8.2003 RUN yum install -y http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-release-latest.noarch.rpm \ && yum install -y cvmfs cvmfs-config-default cvmfs-fuse3 sudo vim openssh-clients \ - && yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.1/cvmfs-config-eessi-0.2.1-1.noarch.rpm + && yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.3/cvmfs-config-eessi-0.2.3-1.noarch.rpm RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \ && echo 'CVMFS_HTTP_PROXY="DIRECT"' >> /etc/cvmfs/default.local diff --git a/containers/README.md b/containers/README.md index 49105af5..73bbb6da 100644 --- a/containers/README.md +++ b/containers/README.md @@ -7,26 +7,24 @@ This directory contains recipes for containers that are useful in the scope of t Container to provide easy access to EESSI pilot repository, see https://hub.docker.com/repository/docker/eessi/client-pilot and https://eessi.github.io/docs/pilot. -### Build container +### Build container + push to Docker Hub -```shell -export EESSI_PILOT_VERSION=2020.09 -docker build --no-cache -f Dockerfile.EESSI-client-pilot-centos7 -t eessi/client-pilot:centos7-${EESSI_PILOT_VERSION} . -``` - -### Push to Docker Hub (requires credentials) +Note: the `docker push` part of the script assumes your Docker Hub creditionals are known +(can be done via `docker login docker.io`, for example). -``` -docker push eessi/client-pilot:centos7-${EESSI_PILOT_VERSION} +```shell +export EESSI_PILOT_VERSION=2020.10 +./docker_build_push.sh ${EESSI_PILOT_VERSION} ``` ### Run (using Singularity) ``` +export EESSI_PILOT_VERSION=2020.10 mkdir -p /tmp/$USER/{var-lib-cvmfs,var-run-cvmfs,home} export SINGULARITY_BIND="/tmp/$USER/var-run-cvmfs:/var/run/cvmfs,/tmp/$USER/var-lib-cvmfs:/var/lib/cvmfs" export SINGULARITY_HOME="/tmp/$USER/home:/home/$USER" export EESSI_CONFIG="container:cvmfs2 cvmfs-config.eessi-hpc.org /cvmfs/cvmfs-config.eessi-hpc.org" export EESSI_PILOT="container:cvmfs2 pilot.eessi-hpc.org /cvmfs/pilot.eessi-hpc.org" -singularity shell --fusemount "$EESSI_CONFIG" --fusemount "$EESSI_PILOT" docker://eessi/client-pilot:centos7-${EESSI_PILOT_VERSION} +singularity shell --fusemount "$EESSI_CONFIG" --fusemount "$EESSI_PILOT" docker://eessi/client-pilot:centos7-$(uname -m)-${EESSI_PILOT_VERSION} ``` diff --git a/containers/docker_build_push.sh b/containers/docker_build_push.sh new file mode 100755 index 00000000..6a0a2f87 --- /dev/null +++ b/containers/docker_build_push.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "ERROR: Usage: $0 (for example: $0 2020.10)" >&2 + exit 1 +fi +eessi_pilot_version=$1 + +os="centos7" +cpu_arch=$(uname -m) +tag="eessi/client-pilot:${os}-${cpu_arch}-${eessi_pilot_version}" + +docker build --no-cache -f Dockerfile.EESSI-client-pilot-${os}-${cpu_arch} -t ${tag} . + +docker push ${tag}