FROM registry.fk.jochum.dev/docker_hub_cache/library/debian:bullseye-slim LABEL maintainer "René Jochum " ENV DEBIAN_FRONTEND noninteractive # Configure Proxy RUN set -ex; \ sed -i 's/deb.debian.org/ftp.ch.debian.org/g' /etc/apt/sources.list && \ apt-get update --allow-releaseinfo-change && \ apt-get install -qy netcat-openbsd && \ sed -i 's/ftp.ch.debian.org/deb.debian.org/g' /etc/apt/sources.list || exit 0 && \ if [ -z "$APT_CACHER" ]; then APT_CACHER="apt-cacher.apt-cacher.svc.cluster.local"; fi && \ if nc -w1 -z $APT_CACHER 3142 1>/dev/null 2>&1; then \ echo 'Acquire::HTTP::Proxy "http://'$APT_CACHER':3142";' >> /etc/apt/apt.conf.d/01proxy && \ echo 'Acquire::HTTPS::Proxy "false";' >> /etc/apt/apt.conf.d/01proxy; else exit 0; fi RUN set -ex; \ echo "postfix postfix/mailname string mail.example.com" | debconf-set-selections && \ echo "postfix postfix/main_mailer_type string 'No configuration'" | debconf-set-selections && \ apt-get update --allow-releaseinfo-change && \ apt-get install -qy -o 'DPkg::Options::=--force-confold' -o 'DPkg::Options::=--force-confdef' postfix postfix-pgsql postfix-mysql postfix-pcre python3-minimal python3-jinja2 RUN rm -f /etc/apt/apt.conf.d/01proxy COPY conf /conf COPY start.py /start.py EXPOSE 25/tcp 465/tcp 587/tcp VOLUME ["/overrides", "/cert"] CMD /start.py