ARG DEBIAN_VERSION=20210408 FROM docker.io/debian:bullseye-${DEBIAN_VERSION}-slim ENV container=docker ENV LC_ALL=C ENV DEBIAN_FRONTEND=noninteractive RUN apt-get -y update && apt-get -y install \ tini \ dovecot-core \ dovecot-imapd \ dovecot-lmtpd \ dovecot-ldap \ dovecot-managesieved \ dovecot-mysql \ dovecot-pgsql \ dovecot-sqlite \ dovecot-pop3d \ dovecot-sieve \ dovecot-solr \ dovecot-submissiond \ ca-certificates \ ssl-cert \ && rm -rf /etc/dovecot \ && mkdir /srv/mail && chown dovecot:dovecot /srv/mail \ && rm -rf /var/lib/apt/lists/* VOLUME [/etc/dovecot /srv/mail /var/mail] ENTRYPOINT ["/sbin/tini" "--"] CMD ["/usr/sbin/dovecot" "-F"]