dovecot/Containerfile

108 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-02-18 10:57:05 +00:00
FROM docker.io/alpine:3.19 as builder
2018-02-15 20:40:42 +00:00
RUN apk --no-cache add \
2022-11-23 13:27:31 +00:00
rpcgen \
g++ \
make \
openssl \
openssl-dev \
2023-02-16 21:39:21 +00:00
lua5.1-dev \
2022-11-23 13:27:31 +00:00
libsodium-dev \
linux-pam-dev \
zlib-dev \
bzip2-dev \
xz-dev \
lz4-dev \
icu-dev \
inotify-tools-dev
2018-02-15 20:40:42 +00:00
2023-09-26 14:05:12 +00:00
ENV SHA256_SUM_DOVECOT=05b11093a71c237c2ef309ad587510721cc93bbee6828251549fc1586c36502d
ENV DOVECOT_FILENAME=dovecot-2.3.21.tar.gz
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
RUN tar xzf $DOVECOT_FILENAME -C /tmp/dovecot --strip 1
2018-02-15 20:40:42 +00:00
2023-09-26 14:05:12 +00:00
ENV SHA256_SUM_PIGEONHOLE=1ca71d2659076712058a72030288f150b2b076b0306453471c5261498d3ded27
ENV PIGEONHOLE_FILENAME=dovecot-2.3-pigeonhole-0.5.21.tar.gz
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
RUN tar xzf $PIGEONHOLE_FILENAME -C /tmp/pigeonhole --strip 1
2018-02-15 20:40:42 +00:00
RUN cd /tmp/dovecot && \
2023-02-16 21:39:21 +00:00
./configure --prefix '' \
--with-notify=inotify \
--with-lua \
--with-zlib \
--with-bzlib \
--with-pam \
--with-ssl=openssl \
--with-sodium \
--without-sql \
--with-lzma \
--with-lz4 \
--with-icu \
--without-shadow \
--with-ssldir=/etc/ssl/mail \
--with-rundir=/run/dovecot \
--disable-static && \
make && \
make install
2018-02-15 20:40:42 +00:00
RUN cd /tmp/pigeonhole && \
2023-02-16 21:39:21 +00:00
./configure --prefix '' \
--with-dovecot=/lib/dovecot \
--disable-static && \
make && make install
2016-07-06 08:58:48 +00:00
2024-02-18 10:57:05 +00:00
FROM docker.io/thallian/confd-env:3.19-3.1.6.2
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 \
2023-09-26 14:05:12 +00:00
libsodium \
libbz2 \
zlib \
xz-libs \
lz4-libs \
lz4 \
linux-pam \
openssl \
ssmtp \
ca-certificates \
lua5.1-libs \
lua5.1-rapidjson \
curl \
inotify-tools \
libssl3
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
2022-09-29 13:57:02 +00:00
RUN mkdir /var/lib/vmail/sieve-after/
2018-02-16 07:28:24 +00:00
2022-09-29 13:57:02 +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 /