1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-07 23:03:10 +02:00

fix: move early instructions into packages.sh

This is required because `adduser` is not available by default on Debian
13.

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach
2025-08-02 13:48:09 +02:00
parent 187cbe37e8
commit bd5639e826
2 changed files with 5 additions and 5 deletions

View File

@ -21,11 +21,6 @@ SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
# ----------------------------------------------- # -----------------------------------------------
COPY target/bin/sedfile /usr/local/bin/sedfile COPY target/bin/sedfile /usr/local/bin/sedfile
RUN <<EOF
chmod +x /usr/local/bin/sedfile
adduser --quiet --system --group --disabled-password --home /var/lib/clamav --no-create-home --uid 200 clamav
EOF
COPY target/scripts/build/packages.sh /build/ COPY target/scripts/build/packages.sh /build/
COPY target/scripts/helpers/log.sh /usr/local/bin/helpers/log.sh COPY target/scripts/helpers/log.sh /usr/local/bin/helpers/log.sh

View File

@ -28,12 +28,17 @@ function _pre_installation_steps() {
local EARLY_PACKAGES=( local EARLY_PACKAGES=(
# Avoid logging unnecessary warnings: # Avoid logging unnecessary warnings:
apt-utils apt-utils
# we need this early for the creation of accounts like 'clamav'
adduser
# Required for adding third-party repos (/etc/apt/sources.list.d) as alternative package sources (eg: Dovecot CE and Rspamd): # Required for adding third-party repos (/etc/apt/sources.list.d) as alternative package sources (eg: Dovecot CE and Rspamd):
apt-transport-https ca-certificates curl gnupg apt-transport-https ca-certificates curl gnupg
# Avoid problems with SA / Amavis (https://github.com/docker-mailserver/docker-mailserver/pull/3403#pullrequestreview-1596689953): # Avoid problems with SA / Amavis (https://github.com/docker-mailserver/docker-mailserver/pull/3403#pullrequestreview-1596689953):
systemd-standalone-sysusers systemd-standalone-sysusers
) )
apt-get "${QUIET}" install --no-install-recommends "${EARLY_PACKAGES[@]}" 2>/dev/null apt-get "${QUIET}" install --no-install-recommends "${EARLY_PACKAGES[@]}" 2>/dev/null
chmod +x /usr/local/bin/sedfile
adduser --quiet --system --group --disabled-password --home /var/lib/clamav --no-create-home --uid 200 clamav
} }
# Install third-party commands to /usr/local/bin # Install third-party commands to /usr/local/bin