mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-22 15:53:35 +01:00
Merge branch 'trunk' of https://github.com/zabbix/zabbix-docker into trunk
This commit is contained in:
commit
1beb35eb96
@ -385,6 +385,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -421,6 +421,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -381,6 +381,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -417,6 +417,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -387,6 +387,8 @@ services:
|
||||
- "10053:10053"
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
|
@ -421,6 +421,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -381,6 +381,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -417,6 +417,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -377,6 +377,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -415,6 +415,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -375,6 +375,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -411,6 +411,8 @@ services:
|
||||
- all
|
||||
ports:
|
||||
- "10053:10053"
|
||||
volumes:
|
||||
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
deploy:
|
||||
|
@ -59,7 +59,6 @@ RUN set -eux && \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/zabbix \
|
||||
--prefix=/usr \
|
||||
--enable-ipv6 \
|
||||
--enable-webservice \
|
||||
--silent && \
|
||||
make -j"$(nproc)" -s && \
|
||||
|
@ -84,43 +84,27 @@ update_config_var() {
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
prepare_zbx_web_service_config() {
|
||||
echo "** Preparing Zabbix web service configuration file"
|
||||
ZBX_WEB_SERVICE_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFile"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
update_config_var $ZBX_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_CONFIG "LogFile"
|
||||
update_config_var $ZBX_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
|
||||
: ${ZBX_ALLOWEDIP:="zabbix-server"}
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
update_config_var $ZBX_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
update_config_var $ZBX_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
}
|
||||
|
||||
prepare_web_service() {
|
||||
|
@ -10,16 +10,6 @@ LABEL org.opencontainers.image.title="Zabbix web service" \
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
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" \
|
||||
@ -32,7 +22,8 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
dnf --quiet makecache && \
|
||||
dnf -y install epel-release && \
|
||||
dnf -y install --setopt=tsflags=nodocs --setopt=install_weak_deps=False --best \
|
||||
epel-release && \
|
||||
dnf -y install --setopt=tsflags=nodocs --setopt=install_weak_deps=False --best \
|
||||
chromium \
|
||||
openssl-libs \
|
||||
@ -73,7 +64,6 @@ RUN set -eux && \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/zabbix \
|
||||
--prefix=/usr \
|
||||
--enable-ipv6 \
|
||||
--enable-webservice \
|
||||
--silent && \
|
||||
make -j"$(nproc)" -s && \
|
||||
|
@ -84,43 +84,27 @@ update_config_var() {
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
prepare_zbx_web_service_config() {
|
||||
echo "** Preparing Zabbix web service configuration file"
|
||||
ZBX_WEB_SERVICE_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFile"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
update_config_var $ZBX_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_CONFIG "LogFile"
|
||||
update_config_var $ZBX_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
|
||||
: ${ZBX_ALLOWEDIP:="zabbix-server"}
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
update_config_var $ZBX_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
update_config_var $ZBX_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
}
|
||||
|
||||
prepare_web_service() {
|
||||
|
@ -9,20 +9,9 @@ LABEL org.opencontainers.image.title="Zabbix web service" \
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY ["conf/etc/apt/sources.list.d/debian.list", "/etc/apt/sources.list.d/debian.list"]
|
||||
COPY ["conf/etc/apt/preferences.d/chromium.pref", "/etc/apt/preferences.d/chromium.pref"]
|
||||
|
||||
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 \
|
||||
@ -35,7 +24,7 @@ RUN set -eux && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
apt-get -y update | true && \
|
||||
apt-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||
ca-certificates \
|
||||
gnupg && \
|
||||
@ -43,8 +32,13 @@ RUN set -eux && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A && \
|
||||
echo "deb http://deb.debian.org/debian buster main" > /etc/apt/sources.list.d/debian.list && \
|
||||
echo "deb http://deb.debian.org/debian buster-updates main" >> /etc/apt/sources.list.d/debian.list && \
|
||||
echo "deb http://deb.debian.org/debian-security buster/updates main" >> /etc/apt/sources.list.d/debian.list && \
|
||||
apt-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install chromium chromium-sandbox && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||
chromium \
|
||||
chromium-sandbox && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||
gnupg && \
|
||||
apt-get -y autoremove && \
|
||||
@ -84,7 +78,6 @@ RUN set -eux && \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/zabbix \
|
||||
--prefix=/usr \
|
||||
--enable-ipv6 \
|
||||
--enable-webservice \
|
||||
--silent && \
|
||||
make -j"$(nproc)" -s && \
|
||||
|
@ -1,3 +0,0 @@
|
||||
deb http://deb.debian.org/debian buster main
|
||||
deb http://deb.debian.org/debian buster-updates main
|
||||
deb http://deb.debian.org/debian-security buster/updates main
|
@ -84,43 +84,27 @@ update_config_var() {
|
||||
|
||||
}
|
||||
|
||||
update_config_multiple_var() {
|
||||
local config_path=$1
|
||||
local var_name=$2
|
||||
local var_value=$3
|
||||
|
||||
var_value="${var_value%\"}"
|
||||
var_value="${var_value#\"}"
|
||||
|
||||
local IFS=,
|
||||
local OPT_LIST=($var_value)
|
||||
|
||||
for value in "${OPT_LIST[@]}"; do
|
||||
update_config_var $config_path $var_name $value true
|
||||
done
|
||||
}
|
||||
|
||||
prepare_zbx_web_service_config() {
|
||||
echo "** Preparing Zabbix web service configuration file"
|
||||
ZBX_WEB_SERVICE_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_web_service.conf
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFile"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
update_config_var $ZBX_CONFIG "LogType" "console"
|
||||
update_config_var $ZBX_CONFIG "LogFile"
|
||||
update_config_var $ZBX_CONFIG "LogFileSize"
|
||||
update_config_var $ZBX_CONFIG "DebugLevel" "${ZBX_DEBUGLEVEL}"
|
||||
|
||||
: ${ZBX_ALLOWEDIP:="zabbix-server"}
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
update_config_var $ZBX_CONFIG "AllowedIP" "${ZBX_ALLOWEDIP}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
update_config_var $ZBX_CONFIG "Timeout" "${ZBX_TIMEOUT}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
|
||||
update_config_var $ZBX_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
|
||||
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_WEB_SERVICE_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSCertFile" "${ZBX_TLSCERTFILE}"
|
||||
update_config_var $ZBX_CONFIG "TLSKeyFile" "${ZBX_TLSKEYFILE}"
|
||||
}
|
||||
|
||||
prepare_web_service() {
|
||||
|
Loading…
Reference in New Issue
Block a user