diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index 7bd961946..55ba78fc2 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 942c028a8..3bc705e34 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 843652763..dd26d0e07 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 9f0764b27..dcdd03d08 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 263969268..e74030cce 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 09f7b5bfe..9501088dd 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 9cd67861c..3ed20ae3b 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 02c5012e1..af61b5579 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 1262a2b6e..db6916b02 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 fdf43fb0c..9f610587f 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 ec4f1da92..6a755d86f 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 33d496eb4..f6e08498b 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 8c7666655..d01a9e5df 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 353452ea0..4fedfdffb 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 b19d490bd..9b0122a39 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 4bb178a84..5cb3d0209 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 a36cbe6b9..fe67f9045 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 34b05d4b6..9195197e2 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 5a480e3d1..b06244155 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 fd0d52335..fae74de1f 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 c701bdc54..44b4bd34b 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 f04fe95ad..c52c1e88c 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 && \ mkdir -p /etc/zabbix/web/certs && \ diff --git a/web-apache-mysql/centos/Dockerfile b/web-apache-mysql/centos/Dockerfile index ede959802..831d3c26d 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 e14215c65..6a4c7f457 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 97de1a7ac..e7c2857fa 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 && \ mkdir -p /etc/zabbix/web/certs && \ diff --git a/web-apache-pgsql/centos/Dockerfile b/web-apache-pgsql/centos/Dockerfile index 32fc3ef4b..3e7ce79c0 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 4b27df5eb..863c1d9b1 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 16b0c9aec..f19f458cd 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 /etc/zabbix/web/certs && \ diff --git a/web-nginx-mysql/centos/Dockerfile b/web-nginx-mysql/centos/Dockerfile index 9a5d3e876..91ae36923 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 40dac807c..fe2c93e10 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 3afe41e26..4f1edcb21 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 /etc/zabbix/web/certs && \ diff --git a/web-nginx-pgsql/centos/Dockerfile b/web-nginx-pgsql/centos/Dockerfile index 26fe74a10..26bf00836 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 ead0f6f1f..4007c7b1b 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 ad3c63812..6038086c6 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 /etc/zabbix/web && \