sympa-docker/Dockerfile

95 lines
2.4 KiB
Docker
Raw Permalink Normal View History

2020-07-06 12:13:35 +00:00
FROM debian:buster
ENV DEBIAN_FRONTEND=noninteractive
ENV RUNLEVEL=1
2020-10-08 12:32:27 +00:00
ENV PERL_MM_USE_DEFAULT=1
2020-07-06 12:13:35 +00:00
RUN echo exit 0 > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d
RUN apt update && \
apt install -y --no-install-recommends rsyslog && \
rm -rf /var/lib/apt/lists/*
COPY rsyslog.conf /etc/rsyslog.conf
RUN service rsyslog start
RUN echo lists.example.com > /etc/mailname
RUN apt update && \
apt install -yq --no-install-recommends perl \
nginx \
spawn-fcgi \
doc-base \
locales \
logrotate \
procps \
libdb5.1 \
procmail \
sasl2-bin \
postfix \
sympa && \
rm -rf /var/lib/apt/lists/*
2020-10-08 12:32:27 +00:00
RUN cpan install SOAP::Lite
2020-07-06 12:13:35 +00:00
COPY rsyslog.d /etc/rsyslog.d
COPY sympa.conf.template /etc/sympa/sympa/sympa.conf.template
2020-07-12 12:23:44 +00:00
COPY main.cf.template /etc/postfix/main.cf.template
2020-07-06 12:13:35 +00:00
COPY master.cf /etc/postfix/master.cf
COPY entrypoint.sh /root/entrypoint.sh
RUN chmod 0744 /root/entrypoint.sh
ENTRYPOINT ["/root/entrypoint.sh"]
RUN mkdir -p /etc/mail/sympa && \
mkdir -p /var/spool/sympa && \
mkdir -p /etc/sympa/robots && \
chown -R sympa:sympa /var/spool/sympa \
/etc/mail/sympa \
/var/spool/sympa \
/var/lib/sympa \
/etc/sympa/robots
COPY list_aliases.tt2 /etc/sympa/list_aliases.tt2
COPY transport.sympa.template /etc/sympa/transport.sympa.template
COPY virtual.sympa.template /etc/sympa/virtual.sympa.template
COPY robot.conf.template /etc/sympa/robot.conf.template
2020-10-08 12:32:27 +00:00
COPY trusted_applications.conf.template /etc/sympa/trusted_applications.conf.template
2020-07-06 12:13:35 +00:00
COPY nginx.conf.template /etc/nginx/site.conf.template
2020-07-15 12:54:13 +00:00
RUN mkdir /etc/sympa/transport && \
touch /etc/sympa/transport/sympa_transport && \
ln -s /etc/sympa/transport/sympa_transport /etc/sympa/sympa_transport
2020-07-06 12:13:35 +00:00
COPY wwsympa /etc/init.d/wwsympa
RUN chmod +x /etc/init.d/wwsympa
2020-10-08 12:32:27 +00:00
COPY sympasoap /etc/init.d/sympasoap
RUN chmod +x /etc/init.d/sympasoap
2020-07-06 12:13:35 +00:00
RUN touch /etc/sympa/transport.sympa \
2020-07-15 12:54:13 +00:00
/etc/sympa/virtual.sympa && \
chown sympa:sympa /etc/sympa/*.sympa
2020-07-06 12:13:35 +00:00
RUN postmap hash:/etc/sympa/transport.sympa && \
postmap hash:/etc/sympa/virtual.sympa
2020-07-13 13:59:55 +00:00
COPY whitelist-1.1/custom_actions /etc/sympa/custom_actions
COPY whitelist-1.1/scenari /etc/sympa/scenari
COPY whitelist-1.1/web_tt2 /etc/sympa/web_tt2
2020-07-13 13:51:33 +00:00
RUN touch /etc/sympa/search_filters/whitelist.txt /etc/sympa/search_filters/modlist.txt
RUN chown -R sympa:sympa /etc/sympa
2020-07-06 12:13:35 +00:00
EXPOSE 25 80 465
VOLUME /var/lib/sympa \
/var/spool/sympa \
2020-07-15 12:54:13 +00:00
/etc/sympa/robots \
2020-10-08 12:32:27 +00:00
/etc/sympa/transport \
/etc/sympa/trusted_applications
2020-07-06 12:13:35 +00:00
ENV DOMAINS="localhost"