Build container images on Github Actions and push to multiple registries (#26247)
Modifications: - Modify the workflow to build container images without pushing when the workflow file itself is modified - Strip the leading ghcr.io/spack/ from env.container env.versioned to prepare pushing to multiple registries - Fixed CentOS 7 and Amazon Linux builds - Login and push to Docker Hub as well as Github Action - Add a badge to README.md with the status of docker images
This commit is contained in:

committed by
GitHub

parent
7bda430de0
commit
8ade8a77dd
@@ -21,16 +21,15 @@ RUN yum update -y \
|
||||
gnupg2 \
|
||||
hostname \
|
||||
iproute \
|
||||
Lmod \
|
||||
make \
|
||||
patch \
|
||||
python \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
tcl \
|
||||
unzip \
|
||||
which \
|
||||
&& pip install boto3 \
|
||||
&& pip3 install boto3 \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& yum clean all
|
||||
|
||||
@@ -64,6 +63,7 @@ WORKDIR /root
|
||||
SHELL ["docker-shell"]
|
||||
|
||||
# TODO: add a command to Spack that (re)creates the package cache
|
||||
RUN spack bootstrap untrust spack-install
|
||||
RUN spack spec hdf5+mpi
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
|
||||
|
@@ -23,16 +23,16 @@ RUN yum update -y \
|
||||
gnupg2 \
|
||||
hostname \
|
||||
iproute \
|
||||
Lmod \
|
||||
make \
|
||||
patch \
|
||||
python \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
patchelf \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
tcl \
|
||||
unzip \
|
||||
which \
|
||||
&& pip install boto3 \
|
||||
&& pip3 install boto3 \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& yum clean all
|
||||
|
||||
@@ -66,6 +66,7 @@ WORKDIR /root
|
||||
SHELL ["docker-shell"]
|
||||
|
||||
# TODO: add a command to Spack that (re)creates the package cache
|
||||
RUN spack bootstrap untrust spack-install
|
||||
RUN spack spec hdf5+mpi
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
|
||||
|
@@ -1,20 +1,20 @@
|
||||
FROM opensuse/leap:15.2
|
||||
FROM opensuse/leap:15.3
|
||||
MAINTAINER Christian Goll <cgoll@suse.com>
|
||||
|
||||
ENV DOCKERFILE_BASE=opensuse \
|
||||
DOCKERFILE_DISTRO=opensuse_leap \
|
||||
DOCKERFILE_DISTRO_VERSION=15.2 \
|
||||
DOCKERFILE_DISTRO_VERSION=15.3 \
|
||||
SPACK_ROOT=/opt/spack \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
CURRENTLY_BUILDING_DOCKER_IMAGE=1 \
|
||||
container=docker
|
||||
|
||||
RUN zypper ref && \
|
||||
zypper up -y && \
|
||||
zypper in -y python3-base python3-boto3\
|
||||
xz gzip tar bzip2 curl patch \
|
||||
gcc-c++ gcc-fortran make cmake automake &&\
|
||||
zypper clean
|
||||
RUN zypper ref && \
|
||||
zypper up -y && \
|
||||
zypper in -y python3-base python3-boto3 \
|
||||
xz gzip tar bzip2 curl patch patchelf file \
|
||||
gcc-c++ gcc-fortran make cmake automake && \
|
||||
zypper clean
|
||||
|
||||
# clean up manpages
|
||||
RUN rm -rf /var/cache/zypp/* \
|
||||
@@ -51,8 +51,8 @@ RUN [ -f ~/.profile ] \
|
||||
WORKDIR /root
|
||||
SHELL ["docker-shell"]
|
||||
|
||||
# Find tools which are in distro
|
||||
RUN ${SPACK_ROOT}/bin/spack external find --scope system
|
||||
# Disable bootstrapping from sources
|
||||
RUN ${SPACK_ROOT}/bin/spack bootstrap untrust spack-install
|
||||
|
||||
# TODO: add a command to Spack that (re)creates the package cache
|
||||
RUN ${SPACK_ROOT}/bin/spack spec hdf5+mpi
|
||||
|
@@ -21,9 +21,7 @@ RUN apt-get -yqq update \
|
||||
git \
|
||||
gnupg2 \
|
||||
iproute2 \
|
||||
lmod \
|
||||
locales \
|
||||
lua-posix \
|
||||
make \
|
||||
python3 \
|
||||
python3-pip \
|
||||
@@ -69,6 +67,7 @@ WORKDIR /root
|
||||
SHELL ["docker-shell"]
|
||||
|
||||
# TODO: add a command to Spack that (re)creates the package cache
|
||||
RUN spack bootstrap untrust spack-install
|
||||
RUN spack spec hdf5+mpi
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
|
||||
|
@@ -21,9 +21,7 @@ RUN apt-get -yqq update \
|
||||
git \
|
||||
gnupg2 \
|
||||
iproute2 \
|
||||
lmod \
|
||||
locales \
|
||||
lua-posix \
|
||||
make \
|
||||
python3 \
|
||||
python3-pip \
|
||||
@@ -65,14 +63,11 @@ RUN [ -f ~/.profile ] \
|
||||
&& sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile \
|
||||
|| true
|
||||
|
||||
# [WORKAROUND]
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
|
||||
RUN ln -s posix_c.so /usr/lib/$(uname -m)-linux-gnu/lua/5.2/posix.so
|
||||
|
||||
WORKDIR /root
|
||||
SHELL ["docker-shell"]
|
||||
|
||||
# TODO: add a command to Spack that (re)creates the package cache
|
||||
RUN spack bootstrap untrust spack-install
|
||||
RUN spack spec hdf5+mpi
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
|
||||
|
Reference in New Issue
Block a user