-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Dockerfile.ub20
72 lines (63 loc) · 2.2 KB
/
Dockerfile.ub20
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
71
72
FROM ubuntu:20.04
LABEL org.opencontainers.image.source="https://github.com/neilmunday/slurm-mail" \
org.opencontainers.image.description="An Ubuntu 20 Slurm container intended for testing Slurm-Mail" \
org.opencontainers.image.title="ubuntu20-slurm" \
maintainer="Neil Munday"
ARG SLURM_VER=24.11.0
RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
autoconf \
automake \
bsd-mailx \
bzip2 \
gcc \
libmariadb-dev \
libmunge-dev \
lsb-release \
make \
mariadb-client \
mariadb-server \
munge \
perl \
python3 \
python3-all \
supervisor \
tar \
tini \
wget && \
mkdir -p /etc/slurm && \
wget https://download.schedmd.com/slurm/slurm-${SLURM_VER}.tar.bz2 -O /root/slurm-${SLURM_VER}.tar.bz2 && \
cd /root && \
tar xvf slurm-${SLURM_VER}.tar.bz2 && \
cd slurm-${SLURM_VER} && \
./configure --sysconfdir=/etc/slurm --prefix=/usr && \
make && \
make install && \
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 && \
apt-get remove -y \
autoconf \
automake \
gcc \
libmariadb-dev \
libmunge-dev && \
apt-get clean && \
rm -rfv /root/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 ["/usr/bin/tail", "-f", "/dev/null"]