summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorChristian Goll <Christian.Goll@gmail.com>2020-12-01 23:03:35 +0100
committerGitHub <noreply@github.com>2020-12-01 14:03:35 -0800
commit235558df11de195e2979d179c53dda422c3e21ba (patch)
tree456207abee88ce9202be6826e6fd3bb7e973a8d0 /share
parent42ed6e25e16099c866af90e6222f5283f25026ae (diff)
downloadspack-235558df11de195e2979d179c53dda422c3e21ba.tar.gz
spack-235558df11de195e2979d179c53dda422c3e21ba.tar.bz2
spack-235558df11de195e2979d179c53dda422c3e21ba.tar.xz
spack-235558df11de195e2979d179c53dda422c3e21ba.zip
dockerfiles: add dockerfile for opensuse leap 15 (#20091)
* added dockerfile for opensuse leap 15 * updated maintainer info * Update share/spack/docker/leap-15.dockerfile * move copies and symlinks after package install also use ${SPACK_ROOT} for spack calls as this works with buildah Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Diffstat (limited to 'share')
-rw-r--r--share/spack/docker/leap-15.dockerfile61
1 files changed, 61 insertions, 0 deletions
diff --git a/share/spack/docker/leap-15.dockerfile b/share/spack/docker/leap-15.dockerfile
new file mode 100644
index 0000000000..1da72615ad
--- /dev/null
+++ b/share/spack/docker/leap-15.dockerfile
@@ -0,0 +1,61 @@
+FROM opensuse/leap:15.2
+MAINTAINER Christian Goll <cgoll@suse.com>
+
+ENV DOCKERFILE_BASE=opensuse \
+ DOCKERFILE_DISTRO=opensuse_leap \
+ DOCKERFILE_DISTRO_VERSION=15.2 \
+ 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
+
+# clean up manpages
+RUN rm -rf /var/cache/zypp/* \
+ rm -rf /usr/share/doc/packages/* \
+ rm -rf /usr/share/doc/manual/*
+
+# copy spack into container
+COPY bin $SPACK_ROOT/bin
+COPY etc $SPACK_ROOT/etc
+COPY lib $SPACK_ROOT/lib
+COPY share $SPACK_ROOT/share
+COPY var $SPACK_ROOT/var
+RUN mkdir -p $SPACK_ROOT/opt/spack
+
+RUN 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
+
+RUN mkdir -p /root/.spack \
+ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \
+ /root/.spack/modules.yaml \
+ && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git
+
+# [WORKAROUND]
+# https://superuser.com/questions/1241548/
+# xubuntu-16-04-ttyname-failed-inappropriate-ioctl-for-device#1253889
+RUN [ -f ~/.profile ] \
+ && sed -i 's/mesg n/( tty -s \\&\\& mesg n || true )/g' ~/.profile \
+ || true
+
+WORKDIR /root
+SHELL ["docker-shell"]
+
+# Find tools which are in distro
+RUN ${SPACK_ROOT}/bin/spack external find --scope system
+
+# TODO: add a command to Spack that (re)creates the package cache
+RUN ${SPACK_ROOT}/bin/spack spec hdf5+mpi
+
+ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
+CMD ["interactive-shell"]