Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:21.10

MAINTAINER [email protected]

Expand All @@ -13,6 +13,10 @@ RUN set -x; \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& echo "postfix postfix/mailname string $MAILNAME" | debconf-set-selections \
&& echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections \
&& hn=$(grep $(hostname) /etc/hosts | cut -f1) \
&& cp /etc/hosts /etc/hosts2 && sed -i '$ d' /etc/hosts2 && cp /etc/hosts2 /etc/hosts \
&& echo $hn $MAILNAME >> /etc/hosts \
&& echo $MAILNAME > /etc/hostname \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
postfix \
dovecot-core \
Expand All @@ -24,13 +28,11 @@ RUN set -x; \
&& rm -rf /var/cache/apt/archives/* /var/cache/apt/*.bin /var/lib/apt/lists/* \
&& rm -rf /usr/share/man/* && rm -rf /usr/share/doc/* \
&& touch /var/log/auth.log \

# Create mail user
&& adduser $MAIL_FS_USER --home $MAIL_FS_HOME --shell /bin/false --disabled-password --gecos "" \
&& chown -R ${MAIL_FS_USER}: $MAIL_FS_HOME \
&& usermod -aG $MAIL_FS_USER postfix \
&& usermod -aG $MAIL_FS_USER dovecot \

&& echo "Installed: OK"

ADD postfix /etc/postfix
Expand Down