diff --git a/Dockerfiles/agent/ubuntu/Dockerfile b/Dockerfiles/agent/ubuntu/Dockerfile index 4982761a..13022e12 100644 --- a/Dockerfiles/agent/ubuntu/Dockerfile +++ b/Dockerfiles/agent/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/agent2/ubuntu/Dockerfile b/Dockerfiles/agent2/ubuntu/Dockerfile index 5fb22fc1..8577a69c 100644 --- a/Dockerfiles/agent2/ubuntu/Dockerfile +++ b/Dockerfiles/agent2/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/build-base/ubuntu/Dockerfile b/Dockerfiles/build-base/ubuntu/Dockerfile index d14deaab..d78cbb47 100644 --- a/Dockerfiles/build-base/ubuntu/Dockerfile +++ b/Dockerfiles/build-base/ubuntu/Dockerfile @@ -26,8 +26,6 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov /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 diff --git a/Dockerfiles/java-gateway/ubuntu/Dockerfile b/Dockerfiles/java-gateway/ubuntu/Dockerfile index a09a00ce..32c5b926 100644 --- a/Dockerfiles/java-gateway/ubuntu/Dockerfile +++ b/Dockerfiles/java-gateway/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile index b4f2b073..80819cfd 100644 --- a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile index 11d302c0..ed522e01 100644 --- a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/server-mysql/ubuntu/Dockerfile b/Dockerfiles/server-mysql/ubuntu/Dockerfile index 3e35d43a..284d9dd8 100644 --- a/Dockerfiles/server-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/server-mysql/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/server-pgsql/ubuntu/Dockerfile b/Dockerfiles/server-pgsql/ubuntu/Dockerfile index bb620dff..a42470f2 100644 --- a/Dockerfiles/server-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/server-pgsql/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/snmptraps/ubuntu/Dockerfile b/Dockerfiles/snmptraps/ubuntu/Dockerfile index 6f7e43f7..8d3d8956 100644 --- a/Dockerfiles/snmptraps/ubuntu/Dockerfile +++ b/Dockerfiles/snmptraps/ubuntu/Dockerfile @@ -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 \ diff --git a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index e1e56211..23b5c1e9 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -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" \ diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile index 7828ed52..7e4dd502 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -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" \ diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile index 56b5b41b..6b548ec0 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -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" \ diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index bc617440..a2de08d3 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -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" \ diff --git a/Dockerfiles/web-service/ubuntu/Dockerfile b/Dockerfiles/web-service/ubuntu/Dockerfile index c309949c..245c8dbc 100644 --- a/Dockerfiles/web-service/ubuntu/Dockerfile +++ b/Dockerfiles/web-service/ubuntu/Dockerfile @@ -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 \