forked from openhpc/ohpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.ohpc-gnu12
26 lines (19 loc) · 1009 Bytes
/
Dockerfile.ohpc-gnu12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM docker.io/library/rockylinux:8
MAINTAINER The OpenHPC Project
ARG arch
# This is based on https://gist.github.com/chuckatkins/994c8d88fb88f15433b08539162e8ac6
# Put these in the OpenHPC base image:
# z01_lmod_load_default.sh - Load the default modules in the profile
# bash-login-wrapper.sh - Here's where the magic happens; Use as the entrypoint to wrap
# all commands in a login shell
COPY z01_lmod_load_default.sh /etc/profile.d/
COPY bash-login-wrapper.sh /usr/bin/
RUN yum -y install http://repos.openhpc.community/OpenHPC/2/CentOS_8/$arch/ohpc-release-2-1.el8.$arch.rpm
RUN yum install -y 'dnf-command(config-manager)' && \
yum config-manager --set-enabled powertools && \
yum upgrade -y && \
yum -y install openssh-clients && \
yum -y install gnu12-compilers-ohpc lmod-ohpc && \
yum clean all
RUN echo 'export LMOD_SYSTEM_DEFAULT_MODULES="gnu12"' > /etc/profile.d/a01_lmod_set_default.sh
ENTRYPOINT ["/usr/bin/bash-login-wrapper.sh"]