31 lines
907 B
Docker
31 lines
907 B
Docker
FROM quay.io/thallian/confd-env:latest
|
|
|
|
RUN apk add --no-cache dovecot dovecot-ldap libressl ssmtp g++ openldap-dev dovecot-dev make tar
|
|
|
|
ADD i_zero.patch /usr/include/dovecot/i_zero.patch
|
|
WORKDIR /usr/include/dovecot
|
|
RUN patch -p1 < i_zero.patch
|
|
RUN rm /usr/include/dovecot/i_zero.patch
|
|
|
|
RUN mkdir /tmp/pigeonhole
|
|
RUN wget -qO- https://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.18.tar.gz | tar -xz -C /tmp/pigeonhole --strip 1
|
|
WORKDIR /tmp/pigeonhole
|
|
RUN ./configure --with-ldap=yes --with-dovecot=/usr/lib/dovecot
|
|
RUN make && make install
|
|
RUN rm -r /tmp/pigeonhole
|
|
WORKDIR /
|
|
|
|
RUN apk del g++ openldap-dev dovecot-dev make tar
|
|
|
|
RUN addgroup -g 1111 vmail
|
|
RUN adduser -u 1111 -h /var/lib/vmail -D -G vmail vmail
|
|
|
|
RUN mkdir /var/lib/vmail/sieve-after/
|
|
RUN chown vmail:vmail /var/lib/vmail/sieve-after/
|
|
|
|
EXPOSE 143 4190 6334 7777
|
|
|
|
VOLUME /var/lib/vmail/mail/ /etc/ssl/mail
|
|
|
|
ADD /rootfs /
|