-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathDockerfile.el9
70 lines (63 loc) · 2.37 KB
/
Dockerfile.el9
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM rockylinux:9
LABEL org.opencontainers.image.source="https://github.com/neilmunday/slurm-mail" \
org.opencontainers.image.description="A Rocky 9 Slurm container intended for testing Slurm-Mail" \
org.opencontainers.image.title="rocky9-slurm" \
maintainer="Neil Munday"
ARG SLURM_VER=24.11.1
# download, build, install and clean-up
RUN dnf install -y dnf-plugins-core && \
dnf update -y && \
dnf install -y epel-release && \
dnf config-manager --set-enabled crb && \
dnf install -y \
autoconf \
automake \
gcc \
mariadb-devel \
mariadb-server \
munge-devel \
pam-devel \
perl \
python3 \
readline-devel \
rpm-build \
s-nail \
supervisor \
tini \
wget && \
wget https://download.schedmd.com/slurm/slurm-${SLURM_VER}.tar.bz2 -O /root/slurm-${SLURM_VER}.tar.bz2 && \
rpmbuild -tb /root/slurm-${SLURM_VER}.tar.bz2 && \
dnf localinstall -y /root/rpmbuild/RPMS/x86_64/slurm-${SLURM_VER}*.el9.x86_64.rpm \
/root/rpmbuild/RPMS/x86_64/slurm-slurmctld-${SLURM_VER}*.el9.x86_64.rpm \
/root/rpmbuild/RPMS/x86_64/slurm-slurmd-${SLURM_VER}*.el9.x86_64.rpm \
/root/rpmbuild/RPMS/x86_64/slurm-slurmdbd-${SLURM_VER}*.el9.x86_64.rpm && \
dnf -y erase \
gcc \
mariab-devel \
make \
munge-devel \
pam-devel \
readline-devel \
rpm-build \
wget && \
dnf clean all && \
rm -rf /root/rpmbuild /root/slurm*.tar.bz2 && \
groupadd -r slurm && \
useradd -r -g slurm -d /var/empty/slurm -m -s /bin/bash slurm && \
groupadd test && \
useradd -g test -d /home/test -m test && \
install -d -o slurm -g slurm /etc/slurm /var/spool/slurm /var/log/slurm && \
dd if=/dev/urandom bs=1 count=1024 > /etc/munge/munge.key 2>/dev/null && \
chown munge:munge /etc/munge/munge.key && \
chmod 0400 /etc/munge/munge.key
COPY supervisord.conf /etc/
COPY --chown=slurm slurm.*.conf /etc/slurm/
COPY --chown=slurm slurmdbd.conf /etc/slurm/
COPY --chown=root entrypoint.sh /usr/local/sbin/
RUN MAJOR_VER=`echo ${SLURM_VER} | egrep -o "^[0-9]+"` && \
mv /etc/slurm/slurm.${MAJOR_VER}.conf /etc/slurm/slurm.conf && \
rm -f /etc/slurm/slurm.*.conf && \
chmod 600 /etc/slurm/slurm*.conf
RUN /usr/bin/mysql_install_db --user=mysql
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/sbin/entrypoint.sh"]
CMD ["tail -f /dev/null"]