dovecot/Dockerfile

85 lines
2.0 KiB
Docker
Raw Normal View History

2018-02-15 20:40:42 +00:00
FROM alpine as builder
RUN apk --no-cache add \
rpcgen \
g++ \
make \
libressl \
libressl-dev \
lua-dev \
openldap-dev \
libsodium-dev \
linux-pam-dev \
zlib-dev \
bzip2-dev \
xz-dev \
lz4-dev \
icu-dev
RUN mkdir /tmp/dovecot
RUN wget -qO- https://www.dovecot.org/releases/2.3/dovecot-2.3.0.tar.gz | tar -xz -C /tmp/dovecot --strip 2
RUN mkdir /tmp/pigeonhole
RUN wget -qO- https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-0.5.0.1.tar.gz | tar -xz -C /tmp/pigeonhole --strip 1
RUN cd /tmp/dovecot && \
2018-02-16 07:39:00 +00:00
./configure --prefix '' \
--with-lua \
--with-zlib \
--with-bzlib \
--with-pam \
--with-ssl=openssl \
--with-sodium \
--without-sql \
--with-ldap \
--with-lzma \
--with-lz4 \
--with-icu \
--without-shadow \
--with-ssldir=/etc/ssl/dovecot \
--with-rundir=/run/dovecot \
--without-shared-libs && \
2018-02-15 20:40:42 +00:00
make && \
make install
RUN cd /tmp/pigeonhole && \
./configure --with-ldap=yes --with-dovecot=/lib/dovecot && \
make && make install
2016-07-06 08:58:48 +00:00
2018-02-15 20:40:42 +00:00
FROM registry.gitlab.com/thallian/docker-confd-env:master
2017-09-25 08:16:16 +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
COPY --from=builder /sbin/dovecot /sbin/dovecot
#COPY --from=builder /share/doc/dovecot/example-config/ /etc/dovecot/
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 \
2018-02-16 07:47:04 +00:00
lz4 \
2018-02-16 07:10:09 +00:00
libressl \
libressl2.6-libssl \
libressl2.6-libcrypto \
2018-02-16 07:28:24 +00:00
ssmtp \
ca-certificates \
2018-02-16 07:39:00 +00:00
lua \
lua-ldap
2016-07-06 08:58:48 +00:00
2018-02-15 20:40:42 +00:00
RUN addgroup -g 2222 dovecot
RUN adduser -u 2222 -h /home/dovecot -D -G dovecot dovecot
2017-09-25 09:15:10 +00:00
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
RUN mkdir /var/lib/vmail/sieve-after/
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 /