This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
email/opendkim/OpenDKIM-Docker/Dockerfile
Georg 8930fb602e
Init Modoboa + OpenDKIM-Docker
Signed-off-by: Georg <georg@lysergic.dev>
2021-10-24 23:43:37 +02:00

54 lines
1.3 KiB
Docker

FROM alpine:3.14
COPY sources/* /opt/OpenDKIM-Docker/
COPY opendkim.conf /etc/opendkim/opendkim.conf
ADD syscid-ca.crt /usr/local/share/ca-certificates/syscid.crt
RUN apk add --no-cache \
alpine-sdk \
ca-certificates \
curl \
automake \
autoconf \
db-dev \
libtool \
mariadb-dev \
readline-dev \
gettext \
&& cd /opt/OpenDKIM-Docker \
&& tar xzf opendbx-1.4.6.tar.gz \
&& cd opendbx-1.4.6/ \
&& CPPFLAGS="-I/usr/include/mysql" ./configure --with-backends="mysql" \
&& make -j4 \
&& make install
RUN apk add --no-cache \
openssl-dev \
libmilter-dev \
&& cd /opt/OpenDKIM-Docker/ \
&& tar xzf 2.11.0-Beta2.tar.gz \
&& cd OpenDKIM-2.11.0-Beta2 \
&& autoreconf -vif \
&& CPPFLAGS="-I/usr/include/openssl" ./configure \
--sysconfdir=/etc/opendkim \
--with-odbx \
--with-openssl \
--with-sql-backend \
&& make -j4 \
&& make install
RUN mkdir /run/opendkim \
mkdir /var/lib/opendkim \
&& addgroup -S opendkim && adduser -S opendkim -h /var/lib/opendkim -G opendkim \
&& chown opendkim:opendkim /run/opendkim \
&& chown opendkim:opendkim /var/lib/opendkim \
&& chown opendkim:opendkim /etc/opendkim
RUN update-ca-certificates
EXPOSE 8960
ENTRYPOINT ["/usr/local/sbin/opendkim"]
CMD ["-f", "-v", "-x", "/etc/opendkim/opendkim.conf"]