diff --git a/Dockerfiles/web-apache-mysql/alpine/Dockerfile b/Dockerfiles/web-apache-mysql/alpine/Dockerfile index 89e753ba6..134944c35 100644 --- a/Dockerfiles/web-apache-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-mysql/alpine/Dockerfile @@ -98,7 +98,6 @@ RUN set -eux && \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-mysql/centos/Dockerfile b/Dockerfiles/web-apache-mysql/centos/Dockerfile index 3b4d58eaf..145a55df9 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -107,7 +107,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-mysql/ol/Dockerfile b/Dockerfiles/web-apache-mysql/ol/Dockerfile index 08a4ee77c..74f62dbc8 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -94,7 +94,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index 36228bb7e..28082ffc0 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -37,6 +37,7 @@ 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 && \ + export PYTHONDONTWRITEBYTECODE=1 && \ INSTALL_PKGS="bash \ tzdata \ curl \ @@ -87,7 +88,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ + find /usr -name '*.pyc' -type f -exec bash -c 'for pyc_file; do dpkg -S "$pyc_file" &> /dev/null || rm -f "$pyc_file"; done' -- '{}' + && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile index cbb2fe882..78a60688c 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile @@ -97,7 +97,6 @@ RUN set -eux && \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index 145f97414..668d4b2ed 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -107,7 +107,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-pgsql/ol/Dockerfile b/Dockerfiles/web-apache-pgsql/ol/Dockerfile index 23ae57d2b..c1a48143e 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -94,7 +94,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile index 63b275616..5603f94a3 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -37,6 +37,7 @@ 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 && \ + export PYTHONDONTWRITEBYTECODE=1 && \ INSTALL_PKGS="bash \ tzdata \ curl \ @@ -105,7 +106,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ + find /usr -name '*.pyc' -type f -exec bash -c 'for pyc_file; do dpkg -S "$pyc_file" &> /dev/null || rm -f "$pyc_file"; done' -- '{}' + && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile index d775b7bda..bed086c1d 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile @@ -93,7 +93,6 @@ RUN set -eux && \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-mysql/centos/Dockerfile b/Dockerfiles/web-nginx-mysql/centos/Dockerfile index ffe2e0aff..7ffdfd6d3 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -102,7 +102,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-mysql/ol/Dockerfile b/Dockerfiles/web-nginx-mysql/ol/Dockerfile index 6f2552512..f53616b99 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -89,7 +89,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile index 5f7b7e4ca..956a67ecc 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -133,7 +133,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile index e9fbb0eb9..42d66294a 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -37,6 +37,7 @@ 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 && \ + export PYTHONDONTWRITEBYTECODE=1 && \ INSTALL_PKGS="bash \ tzdata \ ca-certificates \ @@ -87,7 +88,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ + find /usr -name '*.pyc' -type f -exec bash -c 'for pyc_file; do dpkg -S "$pyc_file" &> /dev/null || rm -f "$pyc_file"; done' -- '{}' + && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile index 2caeb0794..fc15574ab 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile @@ -92,7 +92,6 @@ RUN set -eux && \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index ce2d4dadf..1693dc7d2 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -102,7 +102,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile index aead2f491..df383aff4 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -89,7 +89,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile b/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile index dee958b74..effd86a19 100644 --- a/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile @@ -134,7 +134,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \ diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index bef11bfa2..0d7441a44 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -37,6 +37,7 @@ 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 && \ + export PYTHONDONTWRITEBYTECODE=1 && \ INSTALL_PKGS="bash \ tzdata \ ca-certificates \ @@ -106,7 +107,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \ cd ${ZABBIX_WWW_ROOT}/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ - rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \ + find /usr -name '*.pyc' -type f -exec bash -c 'for pyc_file; do dpkg -S "$pyc_file" &> /dev/null || rm -f "$pyc_file"; done' -- '{}' + && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.po' | xargs rm -f && \ find ${ZABBIX_WWW_ROOT}/locale -name '*.sh' | xargs rm -f && \ ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "${ZABBIX_WWW_ROOT}/conf/zabbix.conf.php" && \