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.2KB

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