Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Update docker components
Browse files Browse the repository at this point in the history
  • Loading branch information
felddy committed May 30, 2019
1 parent baf3142 commit 000d670
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,36 @@ FROM debian:buster-slim
MAINTAINER Mark Feldhousen <mark.feldhousen@trio.dhs.gov>

RUN apt-get update && \
apt-get install --no-install-recommends -y \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
ca-certificates \
dovecot-imapd \
dovecot-lmtpd \
gettext-base \
mailutils \
opendkim \
opendkim-tools \
opendmarc \
postfix \
procmail \
sasl2-bin \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN adduser mailarchive --quiet --disabled-password \
--shell /usr/sbin/nologin --gecos "Mail Archive"

USER root
WORKDIR /root

# make backups of configurations. These are modified at startup.
RUN mv /etc/postfix/master.cf /etc/postfix/master.cf.orig
RUN mv /etc/default/opendkim /etc/default/opendkim.orig
RUN mv /etc/default/opendmarc /etc/default/opendmarc.orig

COPY ./templates ./templates/
COPY ./src/docker-entrypoint.sh .

VOLUME ["/var/log", "/var/spool/postfix"]
EXPOSE 25/TCP 587/TCP
EXPOSE 25/TCP 587/TCP 993/TCP

ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["postfix", "-v", "start-fg"]
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ secrets:
file: ./secrets/fullchain.pem
privkey_pem:
file: ./secrets/privkey.pem
mailarchive_passwd_txt:
file: ./secrets/mailarchive_passwd.txt


services:
Expand All @@ -18,7 +20,10 @@ services:
restart: always
environment:
- PRIMARY_DOMAIN=example.com
- RELAY_IP=
- RELAY_IP=172.16.202.1/32
networks:
front:
ipv4_address: 172.16.202.2
ports:
- target: "25"
published: "1025"
Expand All @@ -28,8 +33,22 @@ services:
published: "1587"
protocol: tcp
mode: host
- target: "993"
published: "1993"
protocol: tcp
mode: host
secrets:
- source: fullchain_pem
target: fullchain.pem
- source: privkey_pem
target: privkey.pem
- source: mailarchive_passwd_txt
target: mailarchive_passwd.txt

networks:
front:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.202.0/24

0 comments on commit 000d670

Please # to comment.