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:
Massimiliano Culpo
2021-09-30 23:34:47 +02:00
committed by GitHub
parent 7bda430de0
commit 8ade8a77dd
7 changed files with 51 additions and 39 deletions

View File

@@ -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"]