2021-08-15 12:06:56 +00:00
|
|
|
FROM alpine:3.14 as builder
|
2018-02-15 20:40:42 +00:00
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
rpcgen \
|
|
|
|
g++ \
|
|
|
|
make \
|
2019-02-05 09:04:06 +00:00
|
|
|
openssl \
|
|
|
|
openssl-dev \
|
2018-02-15 20:40:42 +00:00
|
|
|
lua-dev \
|
|
|
|
libsodium-dev \
|
|
|
|
linux-pam-dev \
|
|
|
|
zlib-dev \
|
|
|
|
bzip2-dev \
|
|
|
|
xz-dev \
|
|
|
|
lz4-dev \
|
2018-02-27 19:50:43 +00:00
|
|
|
icu-dev \
|
|
|
|
inotify-tools-dev
|
2018-02-15 20:40:42 +00:00
|
|
|
|
2021-08-15 12:06:56 +00:00
|
|
|
ENV SHA256_SUM_DOVECOT=03a71d53055bd9ec528d55e07afaf15c09dec9856cba734904bfd05acbc6cf12
|
|
|
|
ENV DOVECOT_FILENAME=dovecot-2.3.16.tar.gz
|
2019-09-10 13:00:24 +00:00
|
|
|
RUN wget https://www.dovecot.org/releases/2.3/$DOVECOT_FILENAME
|
|
|
|
RUN echo "$SHA256_SUM_DOVECOT $DOVECOT_FILENAME" | sha256sum -c - || exit 1
|
2018-02-15 20:40:42 +00:00
|
|
|
RUN mkdir /tmp/dovecot
|
2019-09-10 13:00:24 +00:00
|
|
|
RUN tar xzf $DOVECOT_FILENAME -C /tmp/dovecot --strip 1
|
2018-02-15 20:40:42 +00:00
|
|
|
|
2021-08-15 12:06:56 +00:00
|
|
|
ENV SHA256_SUM_PIGEONHOLE=5ca36780e23b99e6206440f1b3fe3c6598eda5b699b99cebb15d418ba3c6e938
|
|
|
|
ENV PIGEONHOLE_FILENAME=dovecot-2.3-pigeonhole-0.5.16.tar.gz
|
2019-09-10 13:00:24 +00:00
|
|
|
RUN wget https://pigeonhole.dovecot.org/releases/2.3/$PIGEONHOLE_FILENAME
|
|
|
|
RUN echo "$SHA256_SUM_PIGEONHOLE $PIGEONHOLE_FILENAME" | sha256sum -c - || exit 1
|
2018-02-15 20:40:42 +00:00
|
|
|
RUN mkdir /tmp/pigeonhole
|
2019-09-10 13:00:24 +00:00
|
|
|
RUN tar xzf $PIGEONHOLE_FILENAME -C /tmp/pigeonhole --strip 1
|
2018-02-15 20:40:42 +00:00
|
|
|
|
|
|
|
RUN cd /tmp/dovecot && \
|
2018-02-16 07:39:00 +00:00
|
|
|
./configure --prefix '' \
|
2018-02-27 19:50:43 +00:00
|
|
|
--with-notify=inotify \
|
2018-02-16 07:39:00 +00:00
|
|
|
--with-lua \
|
|
|
|
--with-zlib \
|
|
|
|
--with-bzlib \
|
|
|
|
--with-pam \
|
|
|
|
--with-ssl=openssl \
|
|
|
|
--with-sodium \
|
|
|
|
--without-sql \
|
|
|
|
--with-lzma \
|
|
|
|
--with-lz4 \
|
|
|
|
--with-icu \
|
|
|
|
--without-shadow \
|
2018-02-16 11:11:13 +00:00
|
|
|
--with-ssldir=/etc/ssl/mail \
|
2018-02-16 07:39:00 +00:00
|
|
|
--with-rundir=/run/dovecot \
|
2018-02-16 11:11:13 +00:00
|
|
|
--disable-static && \
|
2018-02-15 20:40:42 +00:00
|
|
|
make && \
|
|
|
|
make install
|
|
|
|
|
|
|
|
RUN cd /tmp/pigeonhole && \
|
2018-02-16 11:41:41 +00:00
|
|
|
./configure --prefix '' \
|
2018-02-16 11:11:13 +00:00
|
|
|
--with-dovecot=/lib/dovecot \
|
|
|
|
--disable-static && \
|
2018-02-15 20:40:42 +00:00
|
|
|
make && make install
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2018-11-26 17:43:34 +00:00
|
|
|
FROM thallian/confd-env:latest
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2018-02-15 20:40:42 +00:00
|
|
|
COPY --from=builder /lib/dovecot/ /lib/dovecot/
|
2018-02-16 09:36:55 +00:00
|
|
|
COPY --from=builder /libexec/dovecot/ /libexec/dovecot/
|
2018-02-15 20:40:42 +00:00
|
|
|
COPY --from=builder /bin/doveadm /bin/doveadm
|
|
|
|
COPY --from=builder /bin/doveconf /bin/doveconf
|
2018-02-16 11:11:13 +00:00
|
|
|
COPY --from=builder /bin/dsync /bin/dsync
|
2018-02-15 20:40:42 +00:00
|
|
|
COPY --from=builder /sbin/dovecot /sbin/dovecot
|
2018-02-16 11:43:40 +00:00
|
|
|
COPY --from=builder /bin/sieve* /bin/
|
2017-09-25 08:16:16 +00:00
|
|
|
|
2018-02-15 20:40:42 +00:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
libsodium \
|
2018-02-16 07:10:09 +00:00
|
|
|
libbz2 \
|
|
|
|
zlib \
|
2021-08-23 11:02:07 +00:00
|
|
|
xz-libs \
|
|
|
|
lz4-libs \
|
2018-02-16 07:47:04 +00:00
|
|
|
lz4 \
|
2018-02-16 10:41:27 +00:00
|
|
|
linux-pam \
|
2019-02-05 09:04:06 +00:00
|
|
|
openssl \
|
2018-06-07 09:51:19 +00:00
|
|
|
ssmtp \
|
2018-02-16 07:28:24 +00:00
|
|
|
ca-certificates \
|
2018-02-16 07:39:00 +00:00
|
|
|
lua \
|
2021-08-23 16:45:54 +00:00
|
|
|
lua-rapidjson \
|
|
|
|
curl \
|
2018-02-27 19:50:43 +00:00
|
|
|
inotify-tools
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2018-02-16 10:21:15 +00:00
|
|
|
RUN addgroup -g 150 dovecot
|
|
|
|
RUN adduser -u 140 -h /dev/null -H -s /sbin/nologin -D -G dovecot dovecot
|
2017-09-25 09:15:10 +00:00
|
|
|
|
2018-02-16 10:21:15 +00:00
|
|
|
RUN addgroup -g 151 dovenull
|
|
|
|
RUN adduser -u 141 -h /dev/null -H -s /sbin/nologin -D -G dovenull dovenull
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2017-09-25 09:15:10 +00:00
|
|
|
RUN addgroup -g 2222 access
|
|
|
|
RUN addgroup dovecot access
|
|
|
|
|
2016-07-14 07:59:48 +00:00
|
|
|
RUN addgroup -g 1111 vmail
|
|
|
|
RUN adduser -u 1111 -h /var/lib/vmail -D -G vmail vmail
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2018-02-16 07:28:24 +00:00
|
|
|
RUN mkdir -p /etc/dovecot/conf.d
|
2016-07-14 07:59:48 +00:00
|
|
|
RUN mkdir /var/lib/vmail/sieve-after/
|
2018-02-16 07:28:24 +00:00
|
|
|
|
2018-02-16 11:01:36 +00:00
|
|
|
RUN chown -R vmail:vmail /var/lib/vmail/sieve-after/
|
2016-07-06 08:58:48 +00:00
|
|
|
|
2017-06-13 11:59:39 +00:00
|
|
|
EXPOSE 143 4190 6334 7777
|
2016-07-06 08:58:48 +00:00
|
|
|
|
|
|
|
VOLUME /var/lib/vmail/mail/ /etc/ssl/mail
|
|
|
|
|
|
|
|
ADD /rootfs /
|