summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Goll <cgoll@suse.de>2021-12-16 10:47:15 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-12-23 16:02:09 +0100
commit37fbe30c4a5b6b9c453078270f7511cc5a1eb146 (patch)
treecd56c7f0d7903df748d1d38e7a0aa23ac82493f2
parent314867e6358377d6a46de442bb04314f75959e25 (diff)
downloadspack-37fbe30c4a5b6b9c453078270f7511cc5a1eb146.tar.gz
spack-37fbe30c4a5b6b9c453078270f7511cc5a1eb146.tar.bz2
spack-37fbe30c4a5b6b9c453078270f7511cc5a1eb146.tar.xz
spack-37fbe30c4a5b6b9c453078270f7511cc5a1eb146.zip
Added opensuse/leap:15 to spack containerize (#27837)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r--lib/spack/docs/containers.rst3
-rw-r--r--lib/spack/spack/container/images.json18
-rw-r--r--share/spack/docker/leap-15.dockerfile21
-rw-r--r--share/spack/templates/container/leap-15.dockerfile21
4 files changed, 58 insertions, 5 deletions
diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst
index 3d32de0841..57a9cad189 100644
--- a/lib/spack/docs/containers.rst
+++ b/lib/spack/docs/containers.rst
@@ -129,6 +129,9 @@ are currently supported are summarized in the table below:
* - CentOS 7
- ``centos:7``
- ``spack/centos7``
+ * - openSUSE Leap
+ - ``opensuse/leap``
+ - ``spack/leap15``
All the images are tagged with the corresponding release of Spack:
diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json
index ee4e5a2caa..b82596f20c 100644
--- a/lib/spack/spack/container/images.json
+++ b/lib/spack/spack/container/images.json
@@ -28,6 +28,19 @@
"develop": "latest"
}
},
+ "opensuse/leap:15": {
+ "bootstrap": {
+ "template": "container/leap-15.dockerfile"
+ },
+ "os_package_manager": "zypper",
+ "build": "spack/leap15",
+ "build_tags": {
+ "develop": "latest"
+ },
+ "final": {
+ "image": "opensuse/leap:latest"
+ }
+ },
"nvidia/cuda:11.2.1": {
"bootstrap": {
"template": "container/cuda_11_2_1.dockerfile",
@@ -85,6 +98,11 @@
"update": "yum update -y && amazon-linux-extras install epel -y",
"install": "yum install -y",
"clean": "rm -rf /var/cache/yum && yum clean all"
+ },
+ "zypper": {
+ "update": "zypper update -y",
+ "install": "zypper install -y",
+ "clean": "rm -rf /var/cache/zypp && zypper clean -a"
}
}
}
diff --git a/share/spack/docker/leap-15.dockerfile b/share/spack/docker/leap-15.dockerfile
index 65375c359b..1bf41c6149 100644
--- a/share/spack/docker/leap-15.dockerfile
+++ b/share/spack/docker/leap-15.dockerfile
@@ -2,7 +2,7 @@ FROM opensuse/leap:15.3
MAINTAINER Christian Goll <cgoll@suse.com>
ENV DOCKERFILE_BASE=opensuse \
- DOCKERFILE_DISTRO=opensuse_leap \
+ DOCKERFILE_DISTRO=leap \
DOCKERFILE_DISTRO_VERSION=15.3 \
SPACK_ROOT=/opt/spack \
DEBIAN_FRONTEND=noninteractive \
@@ -11,10 +11,21 @@ ENV DOCKERFILE_BASE=opensuse \
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
+ zypper in -y \
+ bzip2\
+ curl\
+ file\
+ gcc-c++\
+ gcc-fortran\
+ make\
+ gzip\
+ patch\
+ patchelf\
+ python3-base \
+ python3-boto3\
+ tar\
+ xz\
+&& zypper clean
# clean up manpages
RUN rm -rf /var/cache/zypp/* \
diff --git a/share/spack/templates/container/leap-15.dockerfile b/share/spack/templates/container/leap-15.dockerfile
new file mode 100644
index 0000000000..38e4f1c009
--- /dev/null
+++ b/share/spack/templates/container/leap-15.dockerfile
@@ -0,0 +1,21 @@
+{% extends "container/bootstrap-base.dockerfile" %}
+{% block install_os_packages %}
+RUN zypper ref && \
+ zypper up -y && \
+ zypper in -y \
+ bzip2\
+ curl\
+ file\
+ gcc-c++\
+ gcc-fortran\
+ make\
+ git\
+ gzip\
+ patch\
+ patchelf\
+ python3-base \
+ python3-boto3\
+ tar\
+ xz\
+&& zypper clean
+{% endblock %}