diff --git a/Dockerfiles/web-apache-mysql/alpine/Dockerfile b/Dockerfiles/web-apache-mysql/alpine/Dockerfile index a0e757f1d..b9152d248 100644 --- a/Dockerfiles/web-apache-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-mysql/alpine/Dockerfile @@ -94,7 +94,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 ed1742f44..d038e3982 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -108,7 +108,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 ef1c6559f..3c61d1825 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -95,7 +95,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 ce7464106..346ba5bbe 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -36,6 +36,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 \ @@ -83,7 +84,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 624d8c169..5c13c3dbb 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/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-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index 1d5c33d34..106d83958 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -109,7 +109,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 c546c2ce4..d8737e027 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -96,7 +96,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 73952a46b..ba0a5eccb 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -36,6 +36,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 \ @@ -82,7 +83,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 ed4f1f084..7760be8fc 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile @@ -89,7 +89,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 eb8217799..9f32325fe 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -104,7 +104,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 80fcff285..05e6eff96 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -91,7 +91,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 38e075b7d..f2a61172b 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -129,7 +129,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 6ceb1b798..a863c8c48 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -36,6 +36,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 \ @@ -83,7 +84,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 c13fe370e..70008adbc 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile @@ -88,7 +88,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 58c9d3f97..4bb9d92a9 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -105,7 +105,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 d3ef9dd77..fdba27c41 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-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-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index 12b80e694..fe22738fe 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -36,6 +36,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 \ @@ -83,7 +84,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" && \