diff --git a/agent/centos/Dockerfile b/agent/centos/Dockerfile index e8db06943..34cedba22 100644 --- a/agent/centos/Dockerfile +++ b/agent/centos/Dockerfile @@ -12,6 +12,16 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib64/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ @@ -31,8 +41,8 @@ RUN set -eux && \ zlib \ tzdata \ openssl-libs && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \ export GNUPGHOME="$(mktemp -d)" && \ for server in $(shuf -e ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ diff --git a/agent/ubuntu/Dockerfile b/agent/ubuntu/Dockerfile index 0088e1e2b..bca310510 100644 --- a/agent/ubuntu/Dockerfile +++ b/agent/ubuntu/Dockerfile @@ -10,7 +10,17 @@ LABEL org.opencontainers.image.title="Zabbix agent" \ STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/java-gateway/ubuntu/Dockerfile b/java-gateway/ubuntu/Dockerfile index 0abadc7dc..29ec2aa30 100644 --- a/java-gateway/ubuntu/Dockerfile +++ b/java-gateway/ubuntu/Dockerfile @@ -10,7 +10,7 @@ LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/proxy-mysql/centos/Dockerfile b/proxy-mysql/centos/Dockerfile index 3d8408442..fad34536e 100644 --- a/proxy-mysql/centos/Dockerfile +++ b/proxy-mysql/centos/Dockerfile @@ -12,6 +12,16 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib64/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ @@ -51,8 +61,8 @@ RUN set -eux && \ pcre \ zlib \ unixODBC && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \ export GNUPGHOME="$(mktemp -d)" && \ for server in $(shuf -e ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ diff --git a/proxy-mysql/ubuntu/Dockerfile b/proxy-mysql/ubuntu/Dockerfile index b3e6d1f94..347879485 100644 --- a/proxy-mysql/ubuntu/Dockerfile +++ b/proxy-mysql/ubuntu/Dockerfile @@ -10,7 +10,17 @@ LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/proxy-sqlite3/centos/Dockerfile b/proxy-sqlite3/centos/Dockerfile index 1b3a1f169..78bd005ba 100644 --- a/proxy-sqlite3/centos/Dockerfile +++ b/proxy-sqlite3/centos/Dockerfile @@ -12,6 +12,16 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib64/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ @@ -48,8 +58,8 @@ RUN set -eux && \ pcre \ zlib \ unixODBC && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \ export GNUPGHOME="$(mktemp -d)" && \ for server in $(shuf -e ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index 1704399a1..68a488319 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -10,7 +10,17 @@ LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/server-mysql/centos/Dockerfile b/server-mysql/centos/Dockerfile index 3e239a8ff..96b94458c 100644 --- a/server-mysql/centos/Dockerfile +++ b/server-mysql/centos/Dockerfile @@ -12,6 +12,16 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib64/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ @@ -55,8 +65,8 @@ RUN set -eux && \ pcre \ zlib \ unixODBC && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \ export GNUPGHOME="$(mktemp -d)" && \ for server in $(shuf -e ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ diff --git a/server-mysql/ubuntu/Dockerfile b/server-mysql/ubuntu/Dockerfile index 51607067b..9db6025c0 100644 --- a/server-mysql/ubuntu/Dockerfile +++ b/server-mysql/ubuntu/Dockerfile @@ -10,6 +10,17 @@ LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/server-pgsql/centos/Dockerfile b/server-pgsql/centos/Dockerfile index 978e17872..a6ccfa64e 100644 --- a/server-pgsql/centos/Dockerfile +++ b/server-pgsql/centos/Dockerfile @@ -12,6 +12,16 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib64/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ @@ -55,8 +65,8 @@ RUN set -eux && \ postgresql-libs \ zlib \ unixODBC && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" -o /sbin/tini && \ - curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc" -o /tmp/tini.asc && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \ + curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \ export GNUPGHOME="$(mktemp -d)" && \ for server in $(shuf -e ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ diff --git a/server-pgsql/ubuntu/Dockerfile b/server-pgsql/ubuntu/Dockerfile index 82c2c5e17..46c2d3cd5 100644 --- a/server-pgsql/ubuntu/Dockerfile +++ b/server-pgsql/ubuntu/Dockerfile @@ -10,6 +10,17 @@ LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ + ARCH_SUFFIX="$(arch)"; \ + case "$ARCH_SUFFIX" in \ + i686) export ARCH_SUFFIX='i386' ;; \ + x86_64) [ -f /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ] && export ARCH_SUFFIX='amd64' || export ARCH_SUFFIX='i386' ;; \ + aarch64) export ARCH_SUFFIX='arm64' ;; \ + armv7l) export ARCH_SUFFIX='armhf' ;; \ + ppc64el|ppc64le) export ARCH_SUFFIX='ppc64le' ;; \ + s390x) export ARCH_SUFFIX='s390x' ;; \ + *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ + esac; \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/web-apache-mysql/ubuntu/Dockerfile b/web-apache-mysql/ubuntu/Dockerfile index 4dc044b43..3de0274ac 100644 --- a/web-apache-mysql/ubuntu/Dockerfile +++ b/web-apache-mysql/ubuntu/Dockerfile @@ -10,7 +10,7 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/web-apache-pgsql/ubuntu/Dockerfile b/web-apache-pgsql/ubuntu/Dockerfile index 97983f6c4..868f88e1c 100644 --- a/web-apache-pgsql/ubuntu/Dockerfile +++ b/web-apache-pgsql/ubuntu/Dockerfile @@ -10,7 +10,7 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/web-nginx-mysql/ubuntu/Dockerfile b/web-nginx-mysql/ubuntu/Dockerfile index 31d9bf366..8588578d3 100644 --- a/web-nginx-mysql/ubuntu/Dockerfile +++ b/web-nginx-mysql/ubuntu/Dockerfile @@ -10,6 +10,7 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ diff --git a/web-nginx-pgsql/ubuntu/Dockerfile b/web-nginx-pgsql/ubuntu/Dockerfile index 3cba39181..83bef7225 100644 --- a/web-nginx-pgsql/ubuntu/Dockerfile +++ b/web-nginx-pgsql/ubuntu/Dockerfile @@ -10,6 +10,7 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ + echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ groupadd --system --gid 1995 zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \