diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index 6ddac02f8..f18d4ba91 100644 --- a/agent/alpine/Dockerfile +++ b/agent/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix agent" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/zabbix_agentd.d && \ mkdir -p /var/lib/zabbix && \ diff --git a/agent/centos/Dockerfile b/agent/centos/Dockerfile index bd097f175..cc07c97b4 100644 --- a/agent/centos/Dockerfile +++ b/agent/centos/Dockerfile @@ -12,10 +12,13 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/zabbix_agentd.d && \ diff --git a/agent/ubuntu/Dockerfile b/agent/ubuntu/Dockerfile index 731370d0f..40e5b3fd1 100644 --- a/agent/ubuntu/Dockerfile +++ b/agent/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/zabbix_agentd.d && \ diff --git a/java-gateway/alpine/Dockerfile b/java-gateway/alpine/Dockerfile index ddb5d9cd1..0e1002186 100644 --- a/java-gateway/alpine/Dockerfile +++ b/java-gateway/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix/ && \ mkdir -p /usr/sbin/zabbix_java/ && \ mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \ diff --git a/java-gateway/centos/Dockerfile b/java-gateway/centos/Dockerfile index 4f26d57f6..e7799326a 100644 --- a/java-gateway/centos/Dockerfile +++ b/java-gateway/centos/Dockerfile @@ -10,10 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix/ && \ mkdir -p /usr/sbin/zabbix_java/ && \ diff --git a/java-gateway/ubuntu/Dockerfile b/java-gateway/ubuntu/Dockerfile index 3da3688b4..d287c208b 100644 --- a/java-gateway/ubuntu/Dockerfile +++ b/java-gateway/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix/ && \ mkdir -p /usr/sbin/zabbix_java/ && \ diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index 169581768..cd7971d4c 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ diff --git a/proxy-mysql/centos/Dockerfile b/proxy-mysql/centos/Dockerfile index 392793a45..570638b6f 100644 --- a/proxy-mysql/centos/Dockerfile +++ b/proxy-mysql/centos/Dockerfile @@ -12,10 +12,13 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/proxy-mysql/ubuntu/Dockerfile b/proxy-mysql/ubuntu/Dockerfile index 98f2b2dd4..4c96bc7ed 100644 --- a/proxy-mysql/ubuntu/Dockerfile +++ b/proxy-mysql/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index 06c879529..f91b44593 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ diff --git a/proxy-sqlite3/centos/Dockerfile b/proxy-sqlite3/centos/Dockerfile index 5a2e2543d..75761b60d 100644 --- a/proxy-sqlite3/centos/Dockerfile +++ b/proxy-sqlite3/centos/Dockerfile @@ -12,10 +12,13 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index 915ed18c6..b101452cd 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index f9a39d4ce..821124919 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G dialout -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ adduser zabbix dialout && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/server-mysql/centos/Dockerfile b/server-mysql/centos/Dockerfile index 8307716e0..9aa940064 100644 --- a/server-mysql/centos/Dockerfile +++ b/server-mysql/centos/Dockerfile @@ -12,10 +12,13 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ - -g zabbix -G dialout -G root \ - -d /var/lib/zabbix/ -u 1997 \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root,dialout \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/server-mysql/ubuntu/Dockerfile b/server-mysql/ubuntu/Dockerfile index fc71a145c..b50302022 100644 --- a/server-mysql/ubuntu/Dockerfile +++ b/server-mysql/ubuntu/Dockerfile @@ -10,14 +10,14 @@ LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root,dialout \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ - usermod -G zabbix,dialout zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 13f4671dd..4a75ffd79 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -10,12 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G dialout -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ adduser zabbix dialout && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/server-pgsql/centos/Dockerfile b/server-pgsql/centos/Dockerfile index c264874a7..7cf435f10 100644 --- a/server-pgsql/centos/Dockerfile +++ b/server-pgsql/centos/Dockerfile @@ -12,10 +12,13 @@ STOPSIGNAL SIGTERM ENV TINI_VERSION=v0.19.0 RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ - -g zabbix -G dialout -G root \ - -d /var/lib/zabbix/ -u 1997 \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root,dialout \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ diff --git a/server-pgsql/ubuntu/Dockerfile b/server-pgsql/ubuntu/Dockerfile index d98a91ae4..2792816b9 100644 --- a/server-pgsql/ubuntu/Dockerfile +++ b/server-pgsql/ubuntu/Dockerfile @@ -10,14 +10,14 @@ LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root,dialout \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ - usermod -G zabbix,dialout zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ diff --git a/snmptraps/alpine/Dockerfile b/snmptraps/alpine/Dockerfile index ce21756f4..5e8333d4c 100644 --- a/snmptraps/alpine/Dockerfile +++ b/snmptraps/alpine/Dockerfile @@ -19,12 +19,16 @@ LABEL org.opencontainers.image.title="zabbix-snmptraps-alpine" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ apk update && \ apk add --clean-protected --no-cache \ tzdata \ diff --git a/snmptraps/centos/Dockerfile b/snmptraps/centos/Dockerfile index da503594e..00b9eca6c 100644 --- a/snmptraps/centos/Dockerfile +++ b/snmptraps/centos/Dockerfile @@ -19,10 +19,13 @@ LABEL org.opencontainers.image.title="zabbix-snmptraps-centos" \ STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ yum --quiet makecache && \ yum -y install epel-release && \ diff --git a/snmptraps/ubuntu/Dockerfile b/snmptraps/ubuntu/Dockerfile index 691cd6600..1d6297a9a 100644 --- a/snmptraps/ubuntu/Dockerfile +++ b/snmptraps/ubuntu/Dockerfile @@ -20,12 +20,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ apt-get -y update && \ DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ diff --git a/web-apache-mysql/alpine/Dockerfile b/web-apache-mysql/alpine/Dockerfile index af13ca841..dd850cf55 100644 --- a/web-apache-mysql/alpine/Dockerfile +++ b/web-apache-mysql/alpine/Dockerfile @@ -10,13 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ - -H \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ apk add --clean-protected --no-cache \ diff --git a/web-apache-mysql/centos/Dockerfile b/web-apache-mysql/centos/Dockerfile index 585a926fc..24410911e 100644 --- a/web-apache-mysql/centos/Dockerfile +++ b/web-apache-mysql/centos/Dockerfile @@ -10,10 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-apache-mysql/ubuntu/Dockerfile b/web-apache-mysql/ubuntu/Dockerfile index 4ef90fd23..dac720303 100644 --- a/web-apache-mysql/ubuntu/Dockerfile +++ b/web-apache-mysql/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-apache-pgsql/alpine/Dockerfile b/web-apache-pgsql/alpine/Dockerfile index 1b936489b..7310713c9 100644 --- a/web-apache-pgsql/alpine/Dockerfile +++ b/web-apache-pgsql/alpine/Dockerfile @@ -10,13 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ - -H \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ apk add --clean-protected --no-cache \ diff --git a/web-apache-pgsql/centos/Dockerfile b/web-apache-pgsql/centos/Dockerfile index ff022cf54..833bee1d0 100644 --- a/web-apache-pgsql/centos/Dockerfile +++ b/web-apache-pgsql/centos/Dockerfile @@ -10,10 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-apache-pgsql/ubuntu/Dockerfile b/web-apache-pgsql/ubuntu/Dockerfile index 10ba027d3..68d653c20 100644 --- a/web-apache-pgsql/ubuntu/Dockerfile +++ b/web-apache-pgsql/ubuntu/Dockerfile @@ -11,12 +11,13 @@ STOPSIGNAL SIGTERM RUN set -eux && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-nginx-mysql/alpine/Dockerfile b/web-nginx-mysql/alpine/Dockerfile index 25a82488c..6f88b09cd 100644 --- a/web-nginx-mysql/alpine/Dockerfile +++ b/web-nginx-mysql/alpine/Dockerfile @@ -10,13 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ - -H \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ mkdir -p /var/lib/php/session && \ diff --git a/web-nginx-mysql/centos/Dockerfile b/web-nginx-mysql/centos/Dockerfile index 4ba3cf7c7..4f0d909ad 100644 --- a/web-nginx-mysql/centos/Dockerfile +++ b/web-nginx-mysql/centos/Dockerfile @@ -10,10 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-nginx-mysql/ubuntu/Dockerfile b/web-nginx-mysql/ubuntu/Dockerfile index 0fb90b4e4..5f269071f 100644 --- a/web-nginx-mysql/ubuntu/Dockerfile +++ b/web-nginx-mysql/ubuntu/Dockerfile @@ -10,12 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-nginx-pgsql/alpine/Dockerfile b/web-nginx-pgsql/alpine/Dockerfile index 23173b99f..8e6d6694c 100644 --- a/web-nginx-pgsql/alpine/Dockerfile +++ b/web-nginx-pgsql/alpine/Dockerfile @@ -10,13 +10,16 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup -S -g 1995 zabbix && \ - adduser -S \ - -D -G zabbix -G root \ - -u 1997 \ - -h /var/lib/zabbix/ \ - -H \ + addgroup --system --gid 1995 zabbix && \ + adduser --system \ + --gecos "Zabbix monitoring system" \ + --disabled-password \ + --uid 1997 \ + --ingroup zabbix \ + --shell /sbin/nologin \ + --home /var/lib/zabbix/ \ zabbix && \ + adduser zabbix root && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ mkdir -p /var/lib/php/session && \ diff --git a/web-nginx-pgsql/centos/Dockerfile b/web-nginx-pgsql/centos/Dockerfile index d8f6864f0..34ad2fea1 100644 --- a/web-nginx-pgsql/centos/Dockerfile +++ b/web-nginx-pgsql/centos/Dockerfile @@ -10,10 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ - -d /var/lib/zabbix/ -u 1997 \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/web-nginx-pgsql/ubuntu/Dockerfile b/web-nginx-pgsql/ubuntu/Dockerfile index 9c6961546..c20ea66b1 100644 --- a/web-nginx-pgsql/ubuntu/Dockerfile +++ b/web-nginx-pgsql/ubuntu/Dockerfile @@ -10,12 +10,13 @@ LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup --system --gid 1995 --quiet zabbix && \ - adduser --quiet \ - --system --disabled-login \ - --ingroup zabbix --ingroup root \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root \ --uid 1997 \ - --home /var/lib/zabbix/ \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/web && \ diff --git a/zabbix-appliance/rhel/Dockerfile b/zabbix-appliance/rhel/Dockerfile index 391bf697c..bcb021272 100644 --- a/zabbix-appliance/rhel/Dockerfile +++ b/zabbix-appliance/rhel/Dockerfile @@ -76,10 +76,13 @@ RUN set -o xtrace && INSTALL_PKGS="OpenIPMI-libs \ --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ pip3 install supervisor && \ ln -s /usr/local/bin/supervisord /usr/bin/supervisord && \ - groupadd -g 1995 --system zabbix && \ - adduser -r --shell /sbin/nologin \ - -g zabbix -G dialout -G root \ - -d /var/lib/zabbix/ -u 1997 \ + groupadd --system --gid 1995 zabbix && \ + useradd \ + --system --comment "Zabbix monitoring system" \ + -g zabbix -G root,dialout \ + --uid 1997 \ + --shell /sbin/nologin \ + --home-dir /var/lib/zabbix/ \ zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /var/lib/zabbix && \