Removed orphaned / deprecated steps in Ubuntu based containers

This commit is contained in:
Alexey Pustovalov 2026-07-17 16:28:39 +09:00
parent 27239c4155
commit 6a2999f61d
14 changed files with 37 additions and 85 deletions

View file

@ -41,7 +41,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/agent/conf/ ${ZABBIX_CONF_
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
tzdata \
@ -53,11 +52,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
libssl3t64 \
zlib1g \
iputils-ping" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
groupadd \
--system \

View file

@ -42,8 +42,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/ ${ZABBIX_CONF
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
tzdata \
@ -53,11 +51,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
iputils-ping \
smartmontools \
sudo" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
groupadd \
--system \

View file

@ -26,8 +26,6 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
curl \
autoconf \
@ -58,10 +56,8 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
libxml2-dev \
unixodbc-dev \
zlib1g-dev" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
go telemetry off

View file

@ -35,14 +35,10 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/java_gateway/sbin/ /usr/sb
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
openjdk-21-jre-headless" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \

View file

@ -51,8 +51,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/ /usr
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
gzip \
@ -80,11 +78,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
snmp-mibs-downloader \
traceroute \
mysql-client" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
rm -f \
/var/lib/mibs/ietf/VM-MIB \

View file

@ -49,8 +49,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/proxy/database/sqlite3/ /u
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
tzdata \
@ -77,11 +75,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
snmp-mibs-downloader \
traceroute \
sqlite3" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
rm -f \
/var/lib/mibs/ietf/VM-MIB \

View file

@ -51,8 +51,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/crea
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
gzip \
@ -80,11 +78,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
snmp-mibs-downloader \
traceroute \
mysql-client" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
rm -f \
/var/lib/mibs/ietf/VM-MIB \

View file

@ -50,8 +50,6 @@ COPY --from=builder /tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
gzip \
@ -79,11 +77,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
snmp-mibs-downloader \
traceroute \
postgresql-client" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
rm -f \
/var/lib/mibs/ietf/VM-MIB \

View file

@ -32,17 +32,13 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=from=config_templates,target=/tmp/conf,ro \
--mount=from=scripts,target=/tmp/scripts,ro \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
tzdata \
snmptrapd \
snmp-mibs-downloader" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_PKGS} && \
groupadd \
--system \

View file

@ -62,8 +62,6 @@ COPY conf/etc/ /etc/
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
curl \
@ -81,7 +79,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.5-mysql \
php8.5-xml \
mysql-client" && \
apt-get -y update && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \

View file

@ -61,8 +61,6 @@ COPY conf/etc/ /etc/
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
curl \
@ -80,7 +78,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.5-pgsql \
php8.5-xml \
postgresql-client" && \
apt-get -y update && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \

View file

@ -60,8 +60,6 @@ COPY conf/etc/ /etc/
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
curl \
@ -79,7 +77,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.5-mysql \
php8.5-xml \
mysql-client" && \
apt-get -y update && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \

View file

@ -59,8 +59,6 @@ COPY conf/etc/ /etc/
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
curl \
@ -78,7 +76,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.5-pgsql \
php8.5-xml \
postgresql-client" && \
apt-get -y update && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \

View file

@ -37,25 +37,21 @@ COPY conf/etc/apt/preferences.d/chromium.pref /etc/apt/preferences.d/chromium.pr
RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
--mount=type=cache,target=/var/lib/apt/,sharing=locked \
set -eux && \
printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d && \
chmod +x /usr/sbin/policy-rc.d && \
INSTALL_PKGS="bash \
ca-certificates \
chromium \
chromium-sandbox" && \
INSTALL_TEMP_PKGS="gnupg dirmngr gpg gpgconf" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends \
${INSTALL_TEMP_PKGS} && \
gpg --keyserver keyserver.ubuntu.com --recv-keys 78DBA3BC47EF2265 && \
gpg -o /etc/apt/keyrings/debian.gpg --export 78DBA3BC47EF2265 && \
echo "deb [signed-by=/etc/apt/keyrings/debian.gpg] http://deb.debian.org/debian trixie main" > /etc/apt/sources.list.d/debian.list && \
echo "deb [signed-by=/etc/apt/keyrings/debian.gpg] http://deb.debian.org/debian trixie-updates main" >> /etc/apt/sources.list.d/debian.list && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
@ -76,11 +72,10 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
${ZABBIX_USER_HOME_DIR}/enc_internal && \
chown --quiet -R zabbix:0 ${ZABBIX_USER_HOME_DIR}/ && \
chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
DEBIAN_FRONTEND=noninteractive apt-get purge -y \
${INSTALL_TEMP_PKGS} && \
rm -rf ~/.gnupg && \
apt-get -y autoremove && \
apt-get autoremove -y && \
/usr/sbin/zabbix_web_service -V
RUN --mount=from=entrypoints,target=/tmp/entrypoints,ro \