diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index 1b2ccc336..87b516374 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -68,6 +68,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/centos/Dockerfile b/Dockerfiles/agent/centos/Dockerfile index 046a96072..320ffc71b 100644 --- a/Dockerfiles/agent/centos/Dockerfile +++ b/Dockerfiles/agent/centos/Dockerfile @@ -33,6 +33,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -72,7 +73,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -y clean all + /usr/sbin/zabbix_agentd -V EXPOSE 10050/TCP diff --git a/Dockerfiles/agent/ol/Dockerfile b/Dockerfiles/agent/ol/Dockerfile index 6579b8dcd..0bf84e6a4 100644 --- a/Dockerfiles/agent/ol/Dockerfile +++ b/Dockerfiles/agent/ol/Dockerfile @@ -34,6 +34,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent/conf/", "/etc/zabb COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ tini \ @@ -74,7 +75,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 87166f2af..48df58ba4 100644 --- a/Dockerfiles/agent/rhel/Dockerfile +++ b/Dockerfiles/agent/rhel/Dockerfile @@ -52,6 +52,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 \ tini \ @@ -100,7 +101,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 fe6ae03c0..60b5b9e41 100644 --- a/Dockerfiles/agent/ubuntu/Dockerfile +++ b/Dockerfiles/agent/ubuntu/Dockerfile @@ -32,7 +32,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 \ @@ -67,8 +68,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 cc36c418d..af445dc5d 100644 --- a/Dockerfiles/agent2/alpine/Dockerfile +++ b/Dockerfiles/agent2/alpine/Dockerfile @@ -70,6 +70,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_agent2 -V EXPOSE 10050/TCP 31999/TCP diff --git a/Dockerfiles/agent2/centos/Dockerfile b/Dockerfiles/agent2/centos/Dockerfile index c75f608d2..47718a915 100644 --- a/Dockerfiles/agent2/centos/Dockerfile +++ b/Dockerfiles/agent2/centos/Dockerfile @@ -33,6 +33,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -75,7 +76,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -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 c7d8787c6..b83ae12bc 100644 --- a/Dockerfiles/agent2/ol/Dockerfile +++ b/Dockerfiles/agent2/ol/Dockerfile @@ -34,6 +34,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/agent2/conf/", "${ZABBIX COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ tini \ @@ -77,7 +78,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 2eed9504d..7cccd8b9a 100644 --- a/Dockerfiles/agent2/rhel/Dockerfile +++ b/Dockerfiles/agent2/rhel/Dockerfile @@ -52,6 +52,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 \ tini \ @@ -104,7 +105,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 e6b5f3961..f03091a92 100644 --- a/Dockerfiles/agent2/ubuntu/Dockerfile +++ b/Dockerfiles/agent2/ubuntu/Dockerfile @@ -32,7 +32,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="tini \ @@ -70,8 +71,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 b12348fd9..4e2748ba2 100644 --- a/Dockerfiles/build-base/centos/Dockerfile +++ b/Dockerfiles/build-base/centos/Dockerfile @@ -18,6 +18,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov /usr/sbin/policy-rc.d && \ INSTALL_PKGS="bash \ @@ -58,9 +59,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \ - chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ EXPOSE 10052/TCP diff --git a/Dockerfiles/proxy-mysql/alpine/Dockerfile b/Dockerfiles/proxy-mysql/alpine/Dockerfile index 966286f44..83a709bc7 100644 --- a/Dockerfiles/proxy-mysql/alpine/Dockerfile +++ b/Dockerfiles/proxy-mysql/alpine/Dockerfile @@ -91,6 +91,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-mysql/centos/Dockerfile b/Dockerfiles/proxy-mysql/centos/Dockerfile index 8f92e4b6c..ebfdf09a3 100644 --- a/Dockerfiles/proxy-mysql/centos/Dockerfile +++ b/Dockerfiles/proxy-mysql/centos/Dockerfile @@ -37,6 +37,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="libevent \ @@ -97,7 +98,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -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 19d803e6c..3193b8dca 100644 --- a/Dockerfiles/proxy-mysql/ol/Dockerfile +++ b/Dockerfiles/proxy-mysql/ol/Dockerfile @@ -38,6 +38,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/proxy/database/mysql/", COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="libevent \ tini \ @@ -98,7 +99,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 0e26d5f69..665135bcd 100644 --- a/Dockerfiles/proxy-mysql/rhel/Dockerfile +++ b/Dockerfiles/proxy-mysql/rhel/Dockerfile @@ -56,6 +56,8 @@ 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 \ tini \ @@ -129,8 +131,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 4cb4486f7..48f406bd7 100644 --- a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile @@ -36,7 +36,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 \ @@ -93,8 +94,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 27fb3a599..27ae1feae 100644 --- a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile @@ -88,6 +88,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_proxy -V EXPOSE 10051/TCP diff --git a/Dockerfiles/proxy-sqlite3/centos/Dockerfile b/Dockerfiles/proxy-sqlite3/centos/Dockerfile index efb9cd842..bca67fec2 100644 --- a/Dockerfiles/proxy-sqlite3/centos/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/centos/Dockerfile @@ -36,6 +36,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="libevent \ @@ -92,7 +93,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -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 4bb4a0155..553e82f52 100644 --- a/Dockerfiles/proxy-sqlite3/ol/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ol/Dockerfile @@ -37,6 +37,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/general/bin/", "/usr/bin COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="libevent \ tini \ @@ -94,7 +95,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 83119aa20..79fabc553 100644 --- a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile @@ -55,6 +55,8 @@ 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 \ tini \ @@ -125,7 +127,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 9989c7ac4..2b3c93b0e 100644 --- a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile @@ -35,7 +35,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 \ @@ -90,7 +91,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 18067a0a3..e2751fa43 100644 --- a/Dockerfiles/server-mysql/alpine/Dockerfile +++ b/Dockerfiles/server-mysql/alpine/Dockerfile @@ -96,6 +96,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-mysql/centos/Dockerfile b/Dockerfiles/server-mysql/centos/Dockerfile index 301bc6639..80833e0f4 100644 --- a/Dockerfiles/server-mysql/centos/Dockerfile +++ b/Dockerfiles/server-mysql/centos/Dockerfile @@ -37,6 +37,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="fping \ @@ -105,7 +106,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -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 8529cc832..e7ef143ea 100644 --- a/Dockerfiles/server-mysql/ol/Dockerfile +++ b/Dockerfiles/server-mysql/ol/Dockerfile @@ -38,6 +38,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/mysql/cr COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ fping \ @@ -107,7 +108,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 14b2a738e..8ab279b7e 100644 --- a/Dockerfiles/server-mysql/rhel/Dockerfile +++ b/Dockerfiles/server-mysql/rhel/Dockerfile @@ -56,6 +56,8 @@ 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 \ tini \ @@ -135,7 +137,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 2281a7bf9..06cafb35d 100644 --- a/Dockerfiles/server-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/server-mysql/ubuntu/Dockerfile @@ -36,7 +36,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 \ @@ -100,8 +101,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 8a4dcccc2..e748dc60a 100644 --- a/Dockerfiles/server-pgsql/alpine/Dockerfile +++ b/Dockerfiles/server-pgsql/alpine/Dockerfile @@ -96,6 +96,7 @@ RUN set -eux && \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ + /usr/sbin/zabbix_server -V EXPOSE 10051/TCP diff --git a/Dockerfiles/server-pgsql/centos/Dockerfile b/Dockerfiles/server-pgsql/centos/Dockerfile index d245baf38..eb0e23538 100644 --- a/Dockerfiles/server-pgsql/centos/Dockerfile +++ b/Dockerfiles/server-pgsql/centos/Dockerfile @@ -37,6 +37,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="fping \ @@ -104,7 +105,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ - dnf -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 75dbbfc6e..cbcb09f35 100644 --- a/Dockerfiles/server-pgsql/ol/Dockerfile +++ b/Dockerfiles/server-pgsql/ol/Dockerfile @@ -38,6 +38,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}-output/server/database/postgres COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="fping \ file-libs \ @@ -104,7 +105,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 43abef9eb..951fe1933 100644 --- a/Dockerfiles/server-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/server-pgsql/ubuntu/Dockerfile @@ -36,7 +36,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 \ @@ -100,8 +101,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chgrp -R 0 ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_DIR}/ && \ chmod -R g=u ${ZABBIX_CONF_DIR}/ ${ZABBIX_USER_HOME_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 630cf94f9..db15da792 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/Dockerfile @@ -23,6 +23,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 0cdb20563..df9916227 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -31,6 +31,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -105,8 +106,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ dnf -y remove \ findutils \ - glibc-locale-source && \ - dnf -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 7e06226c8..221b75ab5 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -32,6 +32,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.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 /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 dca438533..9bd33ce7c 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -30,7 +30,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 \ @@ -100,9 +101,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \ - chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /etc/apache2/ /etc/php/7.4/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index f9ac843d0..c4d10d062 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -31,6 +31,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -105,8 +106,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ dnf -y remove \ findutils \ - glibc-locale-source && \ - dnf -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 b48e86929..f61722f64 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -32,6 +32,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -106,8 +107,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 da9c7343f..2b3b5fbe9 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -30,7 +30,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 \ @@ -100,9 +101,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \ - chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \ - apt-get -y autoremove && \ - apt-get -y clean + chmod -R g=u /etc/apache2/ /etc/php/7.4/ EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-mysql/centos/Dockerfile b/Dockerfiles/web-nginx-mysql/centos/Dockerfile index 5db776003..8779ae9b4 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -31,6 +31,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -100,8 +101,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ dnf -y remove \ findutils \ - glibc-locale-source && \ - dnf -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 fb971d01b..d5969d4ce 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -32,6 +32,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -102,8 +103,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 7823217fe..baf5369c9 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -50,6 +50,8 @@ 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 \ tzdata \ @@ -134,8 +136,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 40a7f7abd..693175045 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -30,7 +30,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 \ @@ -125,9 +126,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ purge \ gpg \ dirmngr \ - gpg-agent && \ - apt-get -y autoremove && \ - apt-get -y clean + gpg-agent EXPOSE 8080/TCP 8443/TCP diff --git a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index 21beeebf9..bfda7bea7 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -31,6 +31,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 && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ @@ -99,8 +100,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ chmod -R g=u /var/lib/php/session/ && \ dnf -y remove \ findutils \ - glibc-locale-source && \ - dnf -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 8e419f3aa..e76627ffc 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -32,6 +32,7 @@ COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ + --mount=type=tmpfs,target=/var/cache/yum/ \ set -eux && \ INSTALL_PKGS="bash \ curl \ @@ -101,8 +102,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 c6b6d171b..69784a261 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -30,7 +30,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 \ @@ -125,9 +126,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ purge \ gpg \ dirmngr \ - gpg-agent && \ - apt-get -y autoremove && \ - apt-get -y clean + gpg-agent EXPOSE 8080/TCP 8443/TCP