Dovecot: compile fts_xapian from source to match Dovecot ABI (#3373)

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
This commit is contained in:
Thomas Butter 2023-06-01 10:50:31 +02:00 committed by GitHub
parent e68062282a
commit efed9d8012
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 24 deletions

View file

@ -1,18 +1,18 @@
# syntax=docker.io/docker/dockerfile:1
# This Dockerfile provides two stages: stage-base and stage-final
# This Dockerfile provides four stages: stage-base, stage-compile, stage-main and stage-final
# This is in preparation for more granular stages (eg ClamAV and Fail2Ban split into their own)
#
# Base stage provides all packages, config, and adds scripts
#
FROM docker.io/debian:11-slim AS stage-base
ARG DEBIAN_FRONTEND=noninteractive
ARG DOVECOT_COMMUNITY_REPO=1
ARG LOG_LEVEL=trace
FROM docker.io/debian:11-slim AS stage-base
ARG DEBIAN_FRONTEND
ARG DOVECOT_COMMUNITY_REPO
ARG LOG_LEVEL
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
# -----------------------------------------------
@ -25,11 +25,37 @@ RUN <<EOF
adduser --quiet --system --group --disabled-password --home /var/lib/clamav --no-create-home --uid 200 clamav
EOF
COPY target/scripts/build/* /build/
COPY target/scripts/build/packages.sh /build/
COPY target/scripts/helpers/log.sh /usr/local/bin/helpers/log.sh
RUN /bin/bash /build/packages.sh && rm -r /build
# -----------------------------------------------
# --- Compile deb packages ----------------------
# -----------------------------------------------
FROM stage-base AS stage-compile
ARG LOG_LEVEL
ARG DEBIAN_FRONTEND
COPY target/scripts/build/compile.sh /build/
RUN /bin/bash /build/compile.sh
#
# main stage provides all packages, config, and adds scripts
#
FROM stage-base AS stage-main
ARG DEBIAN_FRONTEND
ARG LOG_LEVEL
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
# -----------------------------------------------
# --- ClamAV & FeshClam -------------------------
# -----------------------------------------------
@ -56,6 +82,11 @@ EOF
# --- Dovecot -----------------------------------
# -----------------------------------------------
# install fts_xapian plugin
COPY --from=stage-compile dovecot-fts-xapian-1.5.5_1.5.5_*.deb /
RUN dpkg -i /dovecot-fts-xapian-1.5.5_1.5.5_*.deb && rm /dovecot-fts-xapian-1.5.5_1.5.5_*.deb
COPY target/dovecot/*.inc target/dovecot/*.conf /etc/dovecot/conf.d/
COPY target/dovecot/dovecot-purge.cron /etc/cron.d/dovecot-purge.disabled
RUN chmod 0 /etc/cron.d/dovecot-purge.disabled
@ -265,7 +296,7 @@ COPY target/scripts/startup/setup.d /usr/local/bin/setup.d
# Final stage focuses only on image config
#
FROM stage-base AS stage-final
FROM stage-main AS stage-final
ARG VCS_REVISION=unknown
ARG VCS_VERSION=edge