2024-05-01 10:56:02 +02:00
# SPDX-License-Identifier: MIT
# Copyright (c) 2024 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon.
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
# It is maintained by the BCI team and generated by
# https://github.com/SUSE/BCI-dockerfile-generator
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
2024-05-06 09:03:03 +02:00
#!ExclusiveArch: aarch64 x86_64
2024-06-05 15:00:24 +02:00
#!BuildTag: opensuse/bci/spack:0.21.2
#!BuildTag: opensuse/bci/spack:0.21.2-%RELEASE%
2024-05-01 10:56:02 +02:00
#!BuildTag: opensuse/bci/spack:%%spack_minor%%
#!BuildTag: opensuse/bci/spack:%%spack_minor%%-%RELEASE%
#!BuildTag: opensuse/bci/spack:latest
FROM opensuse/tumbleweed:latest
MAINTAINER openSUSE (https://www.opensuse.org/)
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=org.opensuse.bci.spack
LABEL org.opencontainers.image.title= "openSUSE Tumbleweed BCI Spack development"
LABEL org.opencontainers.image.description= "Spack is a flexible package manager for supercomputers, based on the openSUSE Tumbleweed Base Container Image."
2024-06-05 15:00:24 +02:00
LABEL org.opencontainers.image.version= "0.21.2"
2024-05-01 10:56:02 +02:00
LABEL org.opencontainers.image.url= "https://www.opensuse.org"
LABEL org.opencontainers.image.created= "%BUILDTIME%"
LABEL org.opencontainers.image.vendor= "openSUSE Project"
LABEL org.opencontainers.image.source= "%SOURCEURL%"
LABEL io.artifacthub.package.readme-url= "https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/spack-image/README.md"
LABEL io.artifacthub.package.logo-url= "https://spack.io/assets/images/spack-logo-white.svg"
2024-06-05 15:00:24 +02:00
LABEL org.opensuse.reference= "registry.opensuse.org/opensuse/bci/spack:0.21.2-%RELEASE%"
2024-05-01 10:56:02 +02:00
LABEL org.openbuildservice.disturl= "%DISTURL%"
LABEL org.opensuse.lifecycle-url= "https://en.opensuse.org/Lifetime"
LABEL org.opensuse.release-stage= "released"
# endlabelprefix
RUN set -euo pipefail; zypper -n in spack bison cmake-full flex libtool makeinfo patchelf lsb-release zstd libzip-devel libcurl-devel libopenssl-devel ncurses-devel tack xz-devel; zypper -n clean; rm -rf /var/log/{ lastlog,tallylog,zypper.log,zypp/history,YaST2}
ENV SPACK_ROOT = "/usr"
ENV CURRENTLY_BUILDING_DOCKER_IMAGE = "1"
ENV container = "docker"
ENTRYPOINT [ "/bin/bash" , "/usr/share/spack/docker/entrypoint.bash" ]
CMD [ "interactive-shell" ]
RUN set -euo pipefail; ln -s $SPACK_ROOT /share/spack/docker/entrypoint.bash \
/usr/local/bin/docker-shell \
&& ln -s $SPACK_ROOT /share/spack/docker/entrypoint.bash \
/usr/local/bin/interactive-shell \
&& ln -s $SPACK_ROOT /share/spack/docker/entrypoint.bash \
/usr/local/bin/spack-env \
&& echo 'source $SPACK_ROOT/share/spack/spack-completion.bash' > /root/.bashrc
RUN set -euo pipefail; mkdir -p /root/.spack \
&& cp $SPACK_ROOT /share/spack/docker/modules.yaml \
/root/.spack/modules.yaml \
&& rm -rf /root/*.* /run/nologin
2024-06-05 15:00:24 +02:00
# sanity check that the version from the tag is equal to the version of spack that we expect
RUN set -euo pipefail; [ " $( rpm -q --qf '%{version}' spack | cut -d '.' -f -3) " = "0.21.2" ]
2024-05-01 10:56:02 +02:00
WORKDIR /root
SHELL [ "docker-shell" ]