From b7cb725fb3e4a567131892c6176362dc02998ec5 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Wed, 25 Dec 2024 14:28:21 +0900 Subject: [PATCH] Add verification for binary Zabbix components after installing dependencies --- Dockerfiles/agent/alpine/Dockerfile | 3 ++- Dockerfiles/agent/centos/Dockerfile | 3 ++- Dockerfiles/agent/ol/Dockerfile | 3 ++- Dockerfiles/agent/rhel/Dockerfile | 3 ++- Dockerfiles/agent/ubuntu/Dockerfile | 6 +++--- Dockerfiles/agent2/alpine/Dockerfile | 3 ++- Dockerfiles/agent2/centos/Dockerfile | 3 ++- Dockerfiles/agent2/ol/Dockerfile | 3 ++- Dockerfiles/agent2/rhel/Dockerfile | 3 ++- Dockerfiles/agent2/ubuntu/Dockerfile | 6 +++--- Dockerfiles/build-base/centos/Dockerfile | 4 ++-- Dockerfiles/build-base/ol/Dockerfile | 4 ++-- Dockerfiles/build-base/rhel/Dockerfile | 4 ++-- Dockerfiles/build-base/ubuntu/Dockerfile | 6 ++---- Dockerfiles/java-gateway/centos/Dockerfile | 4 ++-- Dockerfiles/java-gateway/ol/Dockerfile | 4 ++-- Dockerfiles/java-gateway/rhel/Dockerfile | 4 ++-- Dockerfiles/java-gateway/ubuntu/Dockerfile | 7 +++---- Dockerfiles/proxy-mysql/alpine/Dockerfile | 3 ++- Dockerfiles/proxy-mysql/centos/Dockerfile | 3 ++- Dockerfiles/proxy-mysql/ol/Dockerfile | 3 ++- Dockerfiles/proxy-mysql/rhel/Dockerfile | 3 ++- Dockerfiles/proxy-mysql/ubuntu/Dockerfile | 6 +++--- Dockerfiles/proxy-sqlite3/alpine/Dockerfile | 3 ++- Dockerfiles/proxy-sqlite3/centos/Dockerfile | 3 ++- Dockerfiles/proxy-sqlite3/ol/Dockerfile | 3 ++- Dockerfiles/proxy-sqlite3/rhel/Dockerfile | 3 ++- Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile | 5 +++-- Dockerfiles/server-mysql/alpine/Dockerfile | 3 ++- Dockerfiles/server-mysql/centos/Dockerfile | 3 ++- Dockerfiles/server-mysql/ol/Dockerfile | 3 ++- Dockerfiles/server-mysql/rhel/Dockerfile | 3 ++- Dockerfiles/server-mysql/ubuntu/Dockerfile | 6 +++--- Dockerfiles/server-pgsql/alpine/Dockerfile | 3 ++- Dockerfiles/server-pgsql/centos/Dockerfile | 3 ++- Dockerfiles/server-pgsql/ol/Dockerfile | 3 ++- Dockerfiles/server-pgsql/rhel/Dockerfile | 3 ++- Dockerfiles/server-pgsql/ubuntu/Dockerfile | 6 +++--- Dockerfiles/snmptraps/centos/Dockerfile | 4 ++-- Dockerfiles/snmptraps/ol/Dockerfile | 4 ++-- Dockerfiles/snmptraps/rhel/Dockerfile | 4 ++-- Dockerfiles/snmptraps/ubuntu/Dockerfile | 3 ++- Dockerfiles/web-apache-mysql/centos/Dockerfile | 4 ++-- Dockerfiles/web-apache-mysql/ol/Dockerfile | 4 ++-- Dockerfiles/web-apache-mysql/ubuntu/Dockerfile | 7 +++---- Dockerfiles/web-apache-pgsql/centos/Dockerfile | 4 ++-- Dockerfiles/web-apache-pgsql/ol/Dockerfile | 4 ++-- Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile | 7 +++---- Dockerfiles/web-nginx-mysql/centos/Dockerfile | 4 ++-- Dockerfiles/web-nginx-mysql/ol/Dockerfile | 4 ++-- Dockerfiles/web-nginx-mysql/rhel/Dockerfile | 4 ++-- Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile | 7 +++---- Dockerfiles/web-nginx-pgsql/centos/Dockerfile | 4 ++-- Dockerfiles/web-nginx-pgsql/ol/Dockerfile | 4 ++-- Dockerfiles/web-nginx-pgsql/rhel/Dockerfile | 4 ++-- Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile | 7 +++---- Dockerfiles/web-service/alpine/Dockerfile | 3 ++- Dockerfiles/web-service/centos/Dockerfile | 3 ++- Dockerfiles/web-service/ol/Dockerfile | 3 ++- Dockerfiles/web-service/rhel/Dockerfile | 3 ++- Dockerfiles/web-service/ubuntu/Dockerfile | 7 ++++--- 61 files changed, 135 insertions(+), 111 deletions(-) diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index 3344b0cb8f..2c7d8bdaad 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -82,7 +82,8 @@ RUN set -eux && \ ${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \ ${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/centos/Dockerfile b/Dockerfiles/agent/centos/Dockerfile index e9a5da30ea..72ba3ac501 100644 --- a/Dockerfiles/agent/centos/Dockerfile +++ b/Dockerfiles/agent/centos/Dockerfile @@ -35,6 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -99,7 +100,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/ol/Dockerfile b/Dockerfiles/agent/ol/Dockerfile index 1e8255bed1..82dc4f7d17 100644 --- a/Dockerfiles/agent/ol/Dockerfile +++ b/Dockerfiles/agent/ol/Dockerfile @@ -36,6 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_ COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -87,7 +88,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/rhel/Dockerfile b/Dockerfiles/agent/rhel/Dockerfile index 4528ada718..586ea59004 100644 --- a/Dockerfiles/agent/rhel/Dockerfile +++ b/Dockerfiles/agent/rhel/Dockerfile @@ -54,6 +54,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -125,7 +126,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/ubuntu/Dockerfile b/Dockerfiles/agent/ubuntu/Dockerfile index 96798b9e77..5cb60e6b1b 100644 --- a/Dockerfiles/agent/ubuntu/Dockerfile +++ b/Dockerfiles/agent/ubuntu/Dockerfile @@ -34,7 +34,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/sbin/zabbix_agentd COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "${ZABBIX_CONF_DIR}/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -83,8 +84,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ ${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent2/alpine/Dockerfile b/Dockerfiles/agent2/alpine/Dockerfile index 70441d6ea8..542abcea86 100644 --- a/Dockerfiles/agent2/alpine/Dockerfile +++ b/Dockerfiles/agent2/alpine/Dockerfile @@ -77,7 +77,8 @@ RUN set -eux && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \ ${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/agent2/centos/Dockerfile b/Dockerfiles/agent2/centos/Dockerfile index 3dac4dc0ce..eb0b8744b6 100644 --- a/Dockerfiles/agent2/centos/Dockerfile +++ b/Dockerfiles/agent2/centos/Dockerfile @@ -35,6 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -98,7 +99,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/agent2/ol/Dockerfile b/Dockerfiles/agent2/ol/Dockerfile index afd06399f4..61847010b0 100644 --- a/Dockerfiles/agent2/ol/Dockerfile +++ b/Dockerfiles/agent2/ol/Dockerfile @@ -36,6 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -85,7 +86,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/agent2/rhel/Dockerfile b/Dockerfiles/agent2/rhel/Dockerfile index d14b4f155e..5d80364b44 100644 --- a/Dockerfiles/agent2/rhel/Dockerfile +++ b/Dockerfiles/agent2/rhel/Dockerfile @@ -54,6 +54,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ iputils \ @@ -119,7 +120,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ ${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/agent2/ubuntu/Dockerfile b/Dockerfiles/agent2/ubuntu/Dockerfile index 5b72f4dcd1..75b39dded1 100644 --- a/Dockerfiles/agent2/ubuntu/Dockerfile +++ b/Dockerfiles/agent2/ubuntu/Dockerfile @@ -34,7 +34,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/sbin/", "/usr/sbi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bin/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX_CONF_DIR}/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -81,8 +82,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ ${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \ ${ZABBIX_USER_HOME_DIR}/ && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/build-base/centos/Dockerfile b/Dockerfiles/build-base/centos/Dockerfile index d53684d8bf..6a8d78d165 100644 --- a/Dockerfiles/build-base/centos/Dockerfile +++ b/Dockerfiles/build-base/centos/Dockerfile @@ -19,6 +19,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov /usr/sbin/policy-rc.d && \ INSTALL_PKGS="bash \ @@ -56,9 +57,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \ - chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ EXPOSE 10052/TCP diff --git a/Dockerfiles/proxy-mysql/alpine/Dockerfile b/Dockerfiles/proxy-mysql/alpine/Dockerfile index fc3965bca7..c046e21865 100644 --- a/Dockerfiles/proxy-mysql/alpine/Dockerfile +++ b/Dockerfiles/proxy-mysql/alpine/Dockerfile @@ -103,7 +103,8 @@ RUN set -eux && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-mysql/centos/Dockerfile b/Dockerfiles/proxy-mysql/centos/Dockerfile index e7ce8d0a2e..220db65c69 100644 --- a/Dockerfiles/proxy-mysql/centos/Dockerfile +++ b/Dockerfiles/proxy-mysql/centos/Dockerfile @@ -45,6 +45,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ libevent \ @@ -123,7 +124,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-mysql/ol/Dockerfile b/Dockerfiles/proxy-mysql/ol/Dockerfile index a78427e4cf..2e82668416 100644 --- a/Dockerfiles/proxy-mysql/ol/Dockerfile +++ b/Dockerfiles/proxy-mysql/ol/Dockerfile @@ -46,6 +46,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ libevent \ @@ -110,7 +111,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-mysql/rhel/Dockerfile b/Dockerfiles/proxy-mysql/rhel/Dockerfile index a5ccaf915f..7756295ba5 100644 --- a/Dockerfiles/proxy-mysql/rhel/Dockerfile +++ b/Dockerfiles/proxy-mysql/rhel/Dockerfile @@ -64,6 +64,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -152,7 +153,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile index f977b99c00..1d07676e3c 100644 --- a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile @@ -44,7 +44,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", "/usr/share/doc/zabbix-proxy-mysql/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -107,8 +108,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile index 70b978e987..b52cc8f816 100644 --- a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile @@ -99,7 +99,8 @@ RUN set -eux && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/centos/Dockerfile b/Dockerfiles/proxy-sqlite3/centos/Dockerfile index 5a28375c6f..fffc2f9d11 100644 --- a/Dockerfiles/proxy-sqlite3/centos/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/centos/Dockerfile @@ -43,6 +43,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ libevent \ @@ -117,7 +118,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/ol/Dockerfile b/Dockerfiles/proxy-sqlite3/ol/Dockerfile index dc639c8e48..6b6d1b464e 100644 --- a/Dockerfiles/proxy-sqlite3/ol/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ol/Dockerfile @@ -44,6 +44,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ libevent \ @@ -104,7 +105,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile index 5dead16c76..6074465de9 100644 --- a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile @@ -62,6 +62,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -148,7 +149,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile index 5859a7054a..17ead97516 100644 --- a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile @@ -42,7 +42,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/sbin/zabbix_proxy" COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -103,7 +104,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/alpine/Dockerfile b/Dockerfiles/server-mysql/alpine/Dockerfile index 1ce5a17d2e..ee8a2cdd4c 100644 --- a/Dockerfiles/server-mysql/alpine/Dockerfile +++ b/Dockerfiles/server-mysql/alpine/Dockerfile @@ -107,7 +107,8 @@ RUN set -eux && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/centos/Dockerfile b/Dockerfiles/server-mysql/centos/Dockerfile index e6831d86a1..c0984abb0b 100644 --- a/Dockerfiles/server-mysql/centos/Dockerfile +++ b/Dockerfiles/server-mysql/centos/Dockerfile @@ -45,6 +45,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ fping \ @@ -136,7 +137,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/ol/Dockerfile b/Dockerfiles/server-mysql/ol/Dockerfile index 4007f735d8..071b7d30a5 100644 --- a/Dockerfiles/server-mysql/ol/Dockerfile +++ b/Dockerfiles/server-mysql/ol/Dockerfile @@ -46,6 +46,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/cr COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ fping \ @@ -117,7 +118,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/rhel/Dockerfile b/Dockerfiles/server-mysql/rhel/Dockerfile index 47bc3faf37..12e11d3990 100644 --- a/Dockerfiles/server-mysql/rhel/Dockerfile +++ b/Dockerfiles/server-mysql/rhel/Dockerfile @@ -64,6 +64,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -164,7 +165,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/ubuntu/Dockerfile b/Dockerfiles/server-mysql/ubuntu/Dockerfile index a759b852e1..935a233492 100644 --- a/Dockerfiles/server-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/server-mysql/ubuntu/Dockerfile @@ -44,7 +44,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/create.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -113,8 +114,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/alpine/Dockerfile b/Dockerfiles/server-pgsql/alpine/Dockerfile index 06a9704863..1a90bd35d9 100644 --- a/Dockerfiles/server-pgsql/alpine/Dockerfile +++ b/Dockerfiles/server-pgsql/alpine/Dockerfile @@ -106,7 +106,8 @@ RUN set -eux && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ - chmod g=u ${ZABBIX_CONF_DIR} + chmod g=u ${ZABBIX_CONF_DIR} && \ + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/centos/Dockerfile b/Dockerfiles/server-pgsql/centos/Dockerfile index 93230d2417..d26c5ff6db 100644 --- a/Dockerfiles/server-pgsql/centos/Dockerfile +++ b/Dockerfiles/server-pgsql/centos/Dockerfile @@ -45,6 +45,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ fping \ @@ -141,7 +142,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/ol/Dockerfile b/Dockerfiles/server-pgsql/ol/Dockerfile index 5c180d0b59..7ef76876c0 100644 --- a/Dockerfiles/server-pgsql/ol/Dockerfile +++ b/Dockerfiles/server-pgsql/ol/Dockerfile @@ -46,6 +46,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgres COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ fping \ @@ -123,7 +124,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/rhel/Dockerfile b/Dockerfiles/server-pgsql/rhel/Dockerfile index b085e8f5a7..fbe8d9c2b0 100644 --- a/Dockerfiles/server-pgsql/rhel/Dockerfile +++ b/Dockerfiles/server-pgsql/rhel/Dockerfile @@ -64,6 +64,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -170,7 +171,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - microdnf -y clean all + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/ubuntu/Dockerfile b/Dockerfiles/server-pgsql/ubuntu/Dockerfile index e70718c350..570ac91fb1 100644 --- a/Dockerfiles/server-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/server-pgsql/ubuntu/Dockerfile @@ -44,7 +44,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/*", "/usr/bi COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/conf/", "${ZABBIX_CONF_DIR}/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgresql/", "/usr/share/doc/zabbix-server-postgresql/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -113,8 +114,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chgrp 0 ${ZABBIX_CONF_DIR} && \ chmod -R g=u ${ZABBIX_CONF_DIR}/zabbix_server_modules.conf ${ZABBIX_USER_HOME_DIR} && \ chmod g=u ${ZABBIX_CONF_DIR} && \ - apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/snmptraps/centos/Dockerfile b/Dockerfiles/snmptraps/centos/Dockerfile index d670791436..990af2eaca 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/Dockerfile @@ -22,6 +22,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov /usr/sbin/policy-rc.d && \ INSTALL_PKGS="bash \ diff --git a/Dockerfiles/web-apache-mysql/centos/Dockerfile b/Dockerfiles/web-apache-mysql/centos/Dockerfile index 18129ceb0c..4051d4c83c 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -30,6 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl-minimal \ @@ -124,8 +125,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-mysql/ol/Dockerfile b/Dockerfiles/web-apache-mysql/ol/Dockerfile index 0bd447c9ba..f8181a88d0 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -31,6 +31,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -111,8 +112,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index bf3639598e..2a5beaa215 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -101,9 +102,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/8.3/ && \ chgrp -R 0 /etc/apache2/ /etc/php/8.3/ && \ - chmod -R g=u /etc/apache2/ /etc/php/8.3/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /etc/apache2/ /etc/php/8.3/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index df22df57d9..c9f703de63 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -30,6 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl-minimal \ @@ -125,8 +126,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-pgsql/ol/Dockerfile b/Dockerfiles/web-apache-pgsql/ol/Dockerfile index e1378c8990..b758325009 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -31,6 +31,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -112,8 +113,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile index 1390e123d2..c611482895 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -101,9 +102,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/8.3/ && \ chgrp -R 0 /etc/apache2/ /etc/php/8.3/ && \ - chmod -R g=u /etc/apache2/ /etc/php/8.3/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /etc/apache2/ /etc/php/8.3/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-mysql/centos/Dockerfile b/Dockerfiles/web-nginx-mysql/centos/Dockerfile index 5f75931d42..8337557d29 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -30,6 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl-minimal \ @@ -120,8 +121,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-mysql/ol/Dockerfile b/Dockerfiles/web-nginx-mysql/ol/Dockerfile index 356405114c..2463aa4180 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -31,6 +31,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -107,8 +108,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile index bffae22231..f3d46dc70e 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -49,6 +49,7 @@ COPY ["conf/etc/", "/etc/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -151,8 +152,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile index fab6537ff6..166518aa7a 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -99,9 +100,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ - chmod -R g=u /var/lib/php/session/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /var/lib/php/session/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index 119b4a93d4..3dfa5a01b6 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -30,6 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl-minimal \ @@ -121,8 +122,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile index aceccbe781..43bdfd70e2 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -31,6 +31,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -108,8 +109,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile b/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile index 0c5ab51f29..bf732382c0 100644 --- a/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile @@ -49,6 +49,7 @@ COPY ["conf/etc/", "/etc/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -152,8 +153,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ microdnf -y remove \ findutils \ - glibc-locale-source && \ - microdnf -y clean all + glibc-locale-source EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index 98eac708f3..eab6dc7c5b 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -29,7 +29,8 @@ STOPSIGNAL SIGTERM COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ @@ -99,9 +100,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ - chmod -R g=u /var/lib/php/session/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /var/lib/php/session/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-service/alpine/Dockerfile b/Dockerfiles/web-service/alpine/Dockerfile index 5c05efdddd..c5d1233fee 100644 --- a/Dockerfiles/web-service/alpine/Dockerfile +++ b/Dockerfiles/web-service/alpine/Dockerfile @@ -57,7 +57,8 @@ RUN set -eux && \ mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \ chown --quiet -R zabbix:root ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_USER_HOME_DIR}/ && \ - chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ + chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ && \ + /usr/sbin/zabbix_web_service -V EXPOSE 10053/TCP diff --git a/Dockerfiles/web-service/centos/Dockerfile b/Dockerfiles/web-service/centos/Dockerfile index 112ddd71e3..d740268acf 100644 --- a/Dockerfiles/web-service/centos/Dockerfile +++ b/Dockerfiles/web-service/centos/Dockerfile @@ -33,6 +33,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/sbin/zabbix_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ chromium-headless \ @@ -72,7 +73,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ && \ - microdnf -y clean all + /usr/sbin/zabbix_web_service -V EXPOSE 10053/TCP diff --git a/Dockerfiles/web-service/ol/Dockerfile b/Dockerfiles/web-service/ol/Dockerfile index 8ba6829422..2028b70dfd 100644 --- a/Dockerfiles/web-service/ol/Dockerfile +++ b/Dockerfiles/web-service/ol/Dockerfile @@ -34,6 +34,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/conf/", "${Z COPY ["conf/etc/yum.repos.d/oracle-epel-ol9.repo", "/etc/yum.repos.d/oracle-epel-ol9.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ chromium-headless" && \ @@ -66,7 +67,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ && \ - microdnf -y clean all + /usr/sbin/zabbix_web_service -V EXPOSE 10053/TCP diff --git a/Dockerfiles/web-service/rhel/Dockerfile b/Dockerfiles/web-service/rhel/Dockerfile index 4f738e1189..a9d735e8aa 100644 --- a/Dockerfiles/web-service/rhel/Dockerfile +++ b/Dockerfiles/web-service/rhel/Dockerfile @@ -52,6 +52,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/sbin/zabbix_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/conf/", "${ZABBIX_CONF_DIR}/"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ --mount=type=bind,target=/run/secrets/,src=secrets/ \ set -eux && \ INSTALL_PKGS="bash \ @@ -97,7 +98,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_USER_HOME_DIR}/ && \ - microdnf -y clean all + /usr/sbin/zabbix_web_service -V EXPOSE 10053/TCP diff --git a/Dockerfiles/web-service/ubuntu/Dockerfile b/Dockerfiles/web-service/ubuntu/Dockerfile index fbbaeae1d4..dd31faa0a0 100644 --- a/Dockerfiles/web-service/ubuntu/Dockerfile +++ b/Dockerfiles/web-service/ubuntu/Dockerfile @@ -32,14 +32,15 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/sbin/zabbix_ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/web_service/conf/", "${ZABBIX_CONF_DIR}/"] COPY ["conf/etc/apt/preferences.d/chromium.pref", "/etc/apt/preferences.d/chromium.pref"] -RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ +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 \ chromium \ chromium-sandbox" && \ - INSTALL_TEMP_PKGS="gnupg" && \ + INSTALL_TEMP_PKGS="gnupg dirmngr gpg gpgconf" && \ apt-get -y update && \ DEBIAN_FRONTEND=noninteractive apt-get -y \ --no-install-recommends install \ @@ -76,7 +77,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ ${INSTALL_TEMP_PKGS} && \ rm -rf ~/.gnupg && \ apt-get -y autoremove && \ - apt-get -y clean + /usr/sbin/zabbix_web_service -V EXPOSE 10053/TCP