Dockerfile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. FROM debian:stretch-slim
  2. LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ENV LC_ALL C
  5. RUN dpkg-divert --local --rename --add /sbin/initctl \
  6. && ln -sf /bin/true /sbin/initctl \
  7. && dpkg-divert --local --rename --add /usr/bin/ischroot \
  8. && ln -sf /bin/true /usr/bin/ischroot
  9. RUN apt-get update && apt-get install -y --no-install-recommends \
  10. ca-certificates \
  11. curl \
  12. dirmngr \
  13. gnupg \
  14. libsasl2-modules \
  15. perl \
  16. postfix \
  17. postfix-mysql \
  18. postfix-pcre \
  19. python-gpgme \
  20. sasl2-bin \
  21. sudo \
  22. supervisor \
  23. syslog-ng \
  24. syslog-ng-core \
  25. syslog-ng-mod-redis \
  26. && rm -rf /var/lib/apt/lists/* \
  27. && touch /etc/default/locale \
  28. && printf '#!/bin/bash\n/usr/sbin/postconf -c /opt/postfix/conf "$@"' > /usr/local/sbin/postconf \
  29. && chmod +x /usr/local/sbin/postconf
  30. RUN addgroup --system --gid 600 zeyple \
  31. && adduser --system --home /var/lib/zeyple --no-create-home --uid 600 --gid 600 --disabled-login zeyple \
  32. && touch /var/log/zeyple.log \
  33. && chown zeyple: /var/log/zeyple.log \
  34. && mkdir -p /opt/mailman/var/data \
  35. && touch /opt/mailman/var/data/postfix_lmtp \
  36. && touch /opt/mailman/var/data/postfix_domains
  37. COPY zeyple.py /usr/local/bin/zeyple.py
  38. COPY zeyple.conf /etc/zeyple.conf
  39. COPY supervisord.conf /etc/supervisor/supervisord.conf
  40. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  41. COPY postfix.sh /opt/postfix.sh
  42. COPY whitelist_forwardinghosts.sh /usr/local/bin/whitelist_forwardinghosts.sh
  43. EXPOSE 588
  44. CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
  45. RUN rm -rf /tmp/* /var/tmp/*