You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM node:latest
  2. ENV HOSTNAME=${HOSTNAME:-haraka.localdomain}
  3. ENV EMAIL=${EMAIL:-test@email.tld}
  4. ENV USE_LETSENCRYPT=${USE_LETSENCRYPT:-false}
  5. COPY haraka.sh /haraka.sh
  6. COPY certbot-renew.sh /etc/cron.daily/certbot-renew.sh
  7. RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list && \
  8. apt-get update && apt-get upgrade -y && apt-get -t jessie-backports install -y --no-install-recommends supervisor certbot cron && \
  9. mkdir /var/log/supervisord && \
  10. mkdir /var/run/supervisord && \
  11. groupadd -r haraka && \
  12. useradd --comment "Haraka Server User" \
  13. --home /haraka \
  14. --shell /bin/false \
  15. --gid haraka \
  16. -r \
  17. -m \
  18. haraka && \
  19. chown -R haraka:haraka /haraka && \
  20. chmod +x /haraka.sh /etc/cron.daily/certbot-renew.sh && \
  21. rm -rf /var/lib/apt/lists/*
  22. COPY supervisord.conf /etc/supervisor/supervisord.conf
  23. # Port 80 is used for LetsEncrypt
  24. EXPOSE 25 80 587
  25. VOLUME /haraka
  26. VOLUME /etc/letsencrypt
  27. ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
  28. # Install Haraka and it's plugins
  29. USER node
  30. ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
  31. ENV PATH=$PATH:/home/node/.npm-global/bin
  32. RUN npm -g install \
  33. Haraka \
  34. haraka-net-utils \
  35. haraka-plugin-rspamd \
  36. haraka-plugin-rcpt-ldap \
  37. haraka-plugin-auth-ldap