diff --git a/agent/centos/Dockerfile b/agent/centos/Dockerfile index cc07c97b4..84b4413d7 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 40e5b3fd1..a05b52c5d 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 d287c208b..e93ef98e6 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 570638b6f..200a52088 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 4c96bc7ed..5e2be4271 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 75761b60d..f51e76c23 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 b101452cd..ea87fac81 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 9aa940064..27aba9143 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" \ @@ -56,8 +66,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 b50302022..f35bc02a9 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 7cf435f10..e404ea809 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 2792816b9..a430c040e 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 dac720303..a56ae8371 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 68d653c20..9f29287fc 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 5f269071f..1289fd985 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 c20ea66b1..a8f8628fa 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" \