Rebased Dovecot on Alpine 3.17 instead Bullseye (ARM64 Support)

This commit is contained in:
DerLinkman 2023-05-02 14:37:35 +00:00
parent da49b76423
commit a602dd4656
3 changed files with 106 additions and 101 deletions

View File

@ -1,119 +1,124 @@
FROM debian:bullseye-slim FROM alpine:3.17
LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>" LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive
# renovate: datasource=github-tags depName=dovecot/core versioning=semver-coerced
ARG DOVECOT=2.3.20
# renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced
ARG GOSU_VERSION=1.16 ARG GOSU_VERSION=1.16
ENV LC_ALL C
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# Add groups and users before installing Dovecot to not break compatibility # Add groups and users before installing Dovecot to not break compatibility
RUN groupadd -g 5000 vmail \ RUN addgroup -g 5000 vmail \
&& groupadd -g 401 dovecot \ && addgroup -g 401 dovecot \
&& groupadd -g 402 dovenull \ && addgroup -g 402 dovenull \
&& groupadd -g 999 sogo \ && sed -i "s/999/99/" /etc/group \
&& usermod -a -G sogo nobody \ && addgroup -g 999 sogo \
&& useradd -g vmail -u 5000 vmail -d /var/vmail \ && addgroup nobody sogo \
&& useradd -c "Dovecot unprivileged user" -d /dev/null -u 401 -g dovecot -s /bin/false dovecot \ && adduser -D -u 5000 -G vmail -h /var/vmail vmail \
&& useradd -c "Dovecot login user" -d /dev/null -u 402 -g dovenull -s /bin/false dovenull \ && adduser -D -G dovecot -u 401 -h /dev/null -s /sbin/nologin dovecot \
&& touch /etc/default/locale \ && adduser -D -G dovenull -u 402 -h /dev/null -s /sbin/nologin dovenull \
&& apt-get update \ && apk add --no-cache --update \
&& apt-get -y --no-install-recommends install \ build-base \
build-essential \ bash \
apt-transport-https \ bind-tools \
ca-certificates \ ca-certificates \
cpanminus \
curl \ curl \
dnsutils \ cyrus-sasl-dev \
dirmngr \ gcc \
gettext \ gettext-dev \
gnupg2 \ gnupg \
gnupg-dirmngr \
jq \ jq \
libauthen-ntlm-perl \ libintl \
libcgi-pm-perl \ libssl1.1 \
libcrypt-openssl-rsa-perl \ libstdc++ \
libcrypt-ssleay-perl \ libxml2-dev \
libdata-uniqid-perl \ lua \
libdbd-mysql-perl \ lua-cjson \
libdbi-perl \
libdigest-hmac-perl \
libdist-checkconflicts-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
libfile-tail-perl \
libhtml-parser-perl \
libio-compress-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libio-tee-perl \
libipc-run-perl \
libjson-webtoken-perl \
liblockfile-simple-perl \
libmail-imapclient-perl \
libmodule-implementation-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
libpackage-stash-perl \
libpackage-stash-xs-perl \
libpar-packer-perl \
libparse-recdescent-perl \
libproc-processtable-perl \
libreadonly-perl \
libregexp-common-perl \
libssl-dev \
libsys-meminfo-perl \
libterm-readkey-perl \
libtest-deep-perl \
libtest-fatal-perl \
libtest-mock-guard-perl \
libtest-mockobject-perl \
libtest-nowarnings-perl \
libtest-pod-perl \
libtest-requires-perl \
libtest-simple-perl \
libtest-warn-perl \
libtry-tiny-perl \
libunicode-string-perl \
liburi-perl \
libwww-perl \
lua-sql-mysql \
lua-socket \ lua-socket \
lua-sql-mysql \
lua5.3-sql-mysql \
make \
mariadb-connector-c \
mariadb-dev \
mariadb-client \ mariadb-client \
# libressl-dev \
openssl-dev \
pcre-dev \
perl \
perl-ntlm \
perl-cgi \
perl-crypt-openssl-rsa \
perl-utils \
perl-crypt-ssleay \
perl-data-uniqid \
perl-dbd-mysql \
perl-dbi \
perl-digest-hmac \
perl-dist-checkconflicts \
perl-encode-imaputf7 \
perl-file-copy-recursive \
perl-file-tail \
perl-io-socket-inet6 \
perl-io-gzip \
perl-io-socket-ssl \
perl-io-tee \
perl-ipc-run \
perl-json-webtoken \
#perl-lockfile-simple \
perl-mail-imapclient \
perl-module-implementation \
perl-module-scandeps \
perl-net-ssleay \
perl-package-stash \
perl-package-stash-xs \
perl-par-packer \
perl-parse-recdescent \
libproc \
perl-readonly \
perl-regexp-common \
perl-sys-meminfo \
perl-term-readkey \
perl-test-deep \
perl-test-fatal \
perl-test-mockobject \
perl-test-mock-guard \
perl-test-pod \
perl-test-requires \
perl-test-simple \
perl-test-warn \
perl-try-tiny \
perl-unicode-string \
perl-app-cpanminus \
procps \ procps \
python3-pip \ python3 \
redis-server \ python3-dev \
supervisor \ py3-pip \
redis \
syslog-ng \ syslog-ng \
syslog-ng-core \ syslog-ng-redis \
syslog-ng-mod-redis \ syslog-ng-json \
supervisor \
tzdata \
wget \ wget \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ dovecot \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \ dovecot-dev \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
&& apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \
&& echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
dovecot-lua \
dovecot-managesieved \
dovecot-sieve \
dovecot-lmtpd \ dovecot-lmtpd \
dovecot-lua \
dovecot-ldap \ dovecot-ldap \
dovecot-mysql \ dovecot-mysql \
dovecot-core \ dovecot-sql \
dovecot-submissiond \
dovecot-pigeonhole-plugin \
dovecot-pop3d \ dovecot-pop3d \
dovecot-imapd \ dovecot-fts-solr \
dovecot-solr \ && arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& pip3 install mysql-connector-python html2text jinja2 redis \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$arch" \
&& apt-get autoremove --purge -y \ && chmod +x /usr/local/bin/gosu \
&& apt-get autoclean \ && gosu nobody true
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /root/.cache/ RUN cpan LockFile::Simple
# imapsync dependencies
RUN cpan Crypt::OpenSSL::PKCS12 RUN pip3 install mysql-connector-python html2text jinja2 redis
COPY trim_logs.sh /usr/local/bin/trim_logs.sh COPY trim_logs.sh /usr/local/bin/trim_logs.sh
COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh
@ -135,4 +140,4 @@ COPY quota_notify.py /usr/local/bin/quota_notify.py
COPY repl_health.sh /usr/local/bin/repl_health.sh COPY repl_health.sh /usr/local/bin/repl_health.sh
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf

View File

@ -1,4 +1,4 @@
@version: 3.28 @version: 3.38
@include "scl.conf" @include "scl.conf"
options { options {
chain_hostnames(off); chain_hostnames(off);

View File

@ -1,4 +1,4 @@
@version: 3.28 @version: 3.38
@include "scl.conf" @include "scl.conf"
options { options {
chain_hostnames(off); chain_hostnames(off);