-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Dockerfile.slurm-mail.ub22
35 lines (24 loc) · 1.19 KB
/
Dockerfile.slurm-mail.ub22
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
ARG SLURM_VER
FROM ghcr.io/neilmunday/slurm-mail/slurm-ub22:$SLURM_VER
ARG SMTP_SERVER=localhost
ARG SMTP_PORT=25
ARG DISABLE_CRON=0
ARG SLURM_MAIL_PKG
RUN apt-get update && apt-get install -y cron chrony logrotate python3-yaml python3-aiosmtpd && \
mkdir -p /root/testing/output && \
sed -i "s#MailProg=/usr/bin/mailx#MailProg=/usr/bin/slurm-spool-mail#" /etc/slurm/slurm.conf && \
echo "alias ll='ls -l'" >> /root/.bashrc && \
mkdir /shared
COPY supervisord.ub.conf /etc/supervisord.conf
COPY mail-server.py /usr/local/sbin/
RUN chmod 0700 /usr/local/sbin/mail-server.py
COPY run-tests.py tests.yml /root/testing/
COPY $SLURM_MAIL_PKG /root/
RUN dpkg --force-all -i /root/$SLURM_MAIL_PKG && \
sed -i "s/includeOutputLines = 0/includeOutputLines = 20/" /etc/slurm-mail/slurm-mail.conf && \
sed -i "s/verbose = false/verbose = true/" /etc/slurm-mail/slurm-mail.conf && \
sed -i "s/smtpServer = localhost/smtpServer = $SMTP_SERVER/" /etc/slurm-mail/slurm-mail.conf && \
sed -i "s/smtpPort = 25/smtpPort = $SMTP_PORT/" /etc/slurm-mail/slurm-mail.conf && \
rm -f /root/$SLURM_MAIL_PKG
RUN if [ "$DISABLE_CRON" = 1 ]; then rm /etc/cron.d/slurm-mail; fi
CMD ["tail -f /dev/null"]