diff --git a/Dockerfiles/web-apache-mysql/alpine/Dockerfile b/Dockerfiles/web-apache-mysql/alpine/Dockerfile index a3f38528a..ba04d0191 100644 --- a/Dockerfiles/web-apache-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-mysql/alpine/Dockerfile @@ -95,7 +95,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 83f6a6227..f4c8041a0 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/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-mysql/ol/Dockerfile b/Dockerfiles/web-apache-mysql/ol/Dockerfile index 53f61f122..0fb848a48 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/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-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index 2df487887..4cc845e95 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 \ @@ -84,7 +85,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 f05691750..a50f8da1d 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/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-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index f928e4e9b..075da167f 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -110,7 +110,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 97a19f3bc..79c55a0c7 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -97,7 +97,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 0ac30580e..cf3bc7b00 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 \ @@ -102,7 +103,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 a6148b228..9acf2ec33 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile @@ -90,7 +90,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 d0964181c..dc2803d9f 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/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-mysql/ol/Dockerfile b/Dockerfiles/web-nginx-mysql/ol/Dockerfile index 8ed4a452d..0efce249b 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -92,7 +92,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 ee5fdb8cf..aad933efd 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -136,7 +136,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 707e1673b..592ee74e2 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 \ @@ -84,7 +85,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 c40d354de..890229b11 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/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-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index 0dad2751a..0297fb5d0 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -106,7 +106,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 91fc448a1..58367da28 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -93,7 +93,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 4ec5b5962..25730ce88 100644 --- a/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/rhel/Dockerfile @@ -138,7 +138,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 514c9f35c..255b7af96 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 \ @@ -103,7 +104,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" && \