mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 16:45:05 +02:00
Allow to start Zabbix processes under root and other users
This commit is contained in:
@ -10,9 +10,10 @@ LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
RUN set -eux && \
|
||||
addgroup zabbix && \
|
||||
addgroup -S -g 1000 zabbix && \
|
||||
adduser -S \
|
||||
-D -G zabbix \
|
||||
-u 999 \
|
||||
-h /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
|
@ -375,6 +375,12 @@ update_zbx_config() {
|
||||
|
||||
update_config_var $ZBX_CONFIG "TLSPSKIdentity" "${ZBX_TLSPSKIDENTITY}"
|
||||
update_config_var $ZBX_CONFIG "TLSPSKFile" "${ZBX_TLSPSKFILE}"
|
||||
|
||||
if [ "$(id -u)" != '0' ]; then
|
||||
update_config_var $ZBX_CONFIG "User" "$(whoami)"
|
||||
else
|
||||
update_config_var $ZBX_CONFIG "AllowRoot" "1"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_proxy() {
|
||||
|
Reference in New Issue
Block a user