gnu-social/docker/mail/Dockerfile

43 lines
841 B
Docker
Raw Normal View History

FROM debian:buster-slim
ENV DEBIAN_FRONTEND=noninteractive
2020-10-31 17:19:13 +00:00
# Install packages
RUN \
apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
dovecot-core \
dovecot-imapd \
dovecot-lmtpd \
dovecot-pop3d \
opendkim \
opendkim-tools \
2020-10-31 17:19:13 +00:00
openssl \
postfix \
rsyslog \
supervisor \
telnet \
&& apt-get autoclean \
&& apt-get autoremove
2020-10-31 17:19:13 +00:00
# Setup folders and users
RUN \
groupadd -g 2222 vmail \
2020-10-31 17:19:13 +00:00
&& useradd -d /var/mail -M -s /usr/sbin/nologin -u 2222 -g 2222 vmail \
&& usermod -aG vmail postfix \
&& usermod -aG vmail dovecot \
&& usermod -aG vmail opendkim\
&& mkdir -p -m 751 /var/mail/ \
&& mkdir -p -m 755 /etc/mail/ \
&& chown vmail:vmail /var/mail
# Copy config files
COPY rootfs/ /
2020-10-31 17:19:13 +00:00
# Expose ports
EXPOSE 25 143 587 993
2020-10-31 17:19:13 +00:00
# Run start script
ENTRYPOINT /usr/bin/start.sh