mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-20 12:28:37 +01:00
Merge env variables for standard locations
This commit is contained in:
parent
fa58f24f6e
commit
e23918cf57
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules"
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -60,7 +61,7 @@ RUN set -eux && \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
@ -68,6 +69,7 @@ RUN set -eux && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules"
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -73,18 +74,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system --comment "Zabbix monitoring system" \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
@ -104,7 +107,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules"
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -67,12 +68,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
|
@ -18,7 +18,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules"
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -105,12 +106,13 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
@ -130,7 +132,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
|
||||
EXPOSE 10050/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules"
|
||||
ENV ZBX_LOADMODULEPATH="${ZABBIX_USER_HOME_DIR}/modules" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -63,12 +64,13 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/zabbix_agentd.d && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agentd_modules.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -67,6 +68,7 @@ RUN set -eux && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
|
@ -196,13 +196,13 @@ prepare_zbx_agent_config() {
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -88,6 +89,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
|
@ -196,13 +196,13 @@ prepare_zbx_agent_config() {
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -75,6 +76,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
|
@ -196,13 +196,13 @@ prepare_zbx_agent_config() {
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -109,6 +110,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
|
@ -196,13 +196,13 @@ prepare_zbx_agent_config() {
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ ENV TERM=xterm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
ENV ZBX_PERSISTENTBUFFERFILE="$ZABBIX_USER_HOME_DIR/buffer/agent2.db" \
|
||||
ZBX_USERPARAMETERDIR=${ZABBIX_USER_HOME_DIR}/user_scripts
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||
@ -71,6 +72,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/buffer && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/user_scripts && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_agent2_item_keys.conf \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agentd.d/ \
|
||||
${ZABBIX_CONF_DIR}/zabbix_agent2.d/ \
|
||||
|
@ -196,13 +196,13 @@ prepare_zbx_agent_config() {
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/mongodb"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/postgresql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/mssql.conf" "Plugins.MSSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/mssql"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/ember.conf" "Plugins.EmberPlus.System.Path" "/usr/sbin/zabbix-agent2-plugin/ember-plus"
|
||||
if command -v nvidia-smi 2>&1 >/dev/null
|
||||
then
|
||||
update_config_var "$ZABBIX_CONF_DIR/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
update_config_var "${ZABBIX_CONF_DIR}/zabbix_agent2.d/plugins.d/nvidia.conf" "Plugins.NVIDIA.System.Path" "/usr/sbin/zabbix-agent2-plugin/nvidia-gpu"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
|
||||
`
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\conf\zabbix_agentd.d | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\enc | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\modules | Out-Null; `
|
||||
New-Item -Force -ItemType directory -Path $env:ZBX_HOME\buffer | Out-Null; `
|
||||
`
|
||||
net accounts /MaxPWAge:unlimited; `
|
||||
|
@ -13,7 +13,9 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/ JAVA_HOME=/usr/lib/jvm/default-jvm
|
||||
PATH=${PATH}:/usr/lib/jvm/default-jvm/bin/ JAVA_HOME=/usr/lib/jvm/default-jvm \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||
@ -54,19 +56,19 @@ RUN set -eux && \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/
|
||||
|
||||
EXPOSE 10052/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
JAVA=${JAVA:-"/usr/bin/java"}
|
||||
|
||||
JAVA_OPTIONS="-server $JAVA_OPTIONS"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml"
|
||||
|
||||
cd /usr/sbin/zabbix_java
|
||||
|
||||
|
@ -9,14 +9,10 @@ if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
|
||||
prepare_java_gateway_config() {
|
||||
echo "** Preparing Zabbix Java Gateway log configuration file"
|
||||
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml
|
||||
|
||||
: ${ZBX_DEBUGLEVEL:="info"}
|
||||
|
||||
|
@ -12,7 +12,9 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||
@ -53,20 +55,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/
|
||||
|
||||
EXPOSE 10052/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
JAVA=${JAVA:-"/usr/bin/java"}
|
||||
|
||||
JAVA_OPTIONS="-server $JAVA_OPTIONS"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml"
|
||||
|
||||
cd /usr/sbin/zabbix_java
|
||||
|
||||
|
@ -9,14 +9,10 @@ if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
|
||||
prepare_java_gateway_config() {
|
||||
echo "** Preparing Zabbix Java Gateway log configuration file"
|
||||
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml
|
||||
|
||||
: ${ZBX_DEBUGLEVEL:="info"}
|
||||
|
||||
|
@ -12,7 +12,9 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||
@ -53,20 +55,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/
|
||||
|
||||
EXPOSE 10052/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
JAVA=${JAVA:-"/usr/bin/java"}
|
||||
|
||||
JAVA_OPTIONS="-server $JAVA_OPTIONS"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml"
|
||||
|
||||
cd /usr/sbin/zabbix_java
|
||||
|
||||
|
@ -9,14 +9,10 @@ if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
|
||||
prepare_java_gateway_config() {
|
||||
echo "** Preparing Zabbix Java Gateway log configuration file"
|
||||
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml
|
||||
|
||||
: ${ZBX_DEBUGLEVEL:="info"}
|
||||
|
||||
|
@ -14,7 +14,9 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -74,20 +76,20 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/
|
||||
|
||||
EXPOSE 10052/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
JAVA=${JAVA:-"/usr/bin/java"}
|
||||
|
||||
JAVA_OPTIONS="-server $JAVA_OPTIONS"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml"
|
||||
|
||||
cd /usr/sbin/zabbix_java
|
||||
|
||||
|
@ -9,14 +9,10 @@ if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
|
||||
prepare_java_gateway_config() {
|
||||
echo "** Preparing Zabbix Java Gateway log configuration file"
|
||||
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml
|
||||
|
||||
: ${ZBX_DEBUGLEVEL:="info"}
|
||||
|
||||
|
@ -12,7 +12,9 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||
@ -48,20 +50,20 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix/ && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/
|
||||
mv /usr/sbin/zabbix_java/lib/logback-console.xml ${ZABBIX_CONF_DIR}/zabbix_java_gateway_logback.xml && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/sbin/zabbix_java/
|
||||
|
||||
EXPOSE 10052/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}
|
||||
|
||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
JAVA=${JAVA:-"/usr/bin/java"}
|
||||
|
||||
JAVA_OPTIONS="-server $JAVA_OPTIONS"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
|
||||
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml"
|
||||
|
||||
cd /usr/sbin/zabbix_java
|
||||
|
||||
|
@ -9,14 +9,10 @@ if [ "${DEBUG_MODE,,}" == "true" ]; then
|
||||
set -o xtrace
|
||||
fi
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
|
||||
prepare_java_gateway_config() {
|
||||
echo "** Preparing Zabbix Java Gateway log configuration file"
|
||||
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
|
||||
ZBX_GATEWAY_CONFIG=$ZABBIX_CONF_DIR/zabbix_java_gateway_logback.xml
|
||||
|
||||
: ${ZBX_DEBUGLEVEL:="info"}
|
||||
|
||||
|
@ -80,15 +80,14 @@ RUN set -eux && \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
@ -97,6 +96,7 @@ RUN set -eux && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/certs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/keys && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
|
@ -104,11 +104,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
@ -117,6 +116,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/certs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/keys && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
|
@ -91,11 +91,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
@ -104,6 +103,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/certs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/keys && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
|
@ -133,11 +133,10 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
@ -146,6 +145,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/certs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/keys && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
|
@ -84,15 +84,14 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/ && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/enc_internal && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/modules && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
@ -101,6 +100,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/certs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/keys && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/zabbix_proxy_modules.conf ${ZABBIX_USER_HOME_DIR} && \
|
||||
chown --quiet zabbix:root ${ZABBIX_CONF_DIR}/ && \
|
||||
|
@ -357,7 +357,7 @@ create_db_schema_mysql() {
|
||||
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-mysql/create.sql.gz"
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-G dialout \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
|
@ -354,7 +354,7 @@ create_db_schema_mysql() {
|
||||
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-mysql/create.sql.gz"
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-G dialout \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
|
@ -354,7 +354,7 @@ create_db_schema_mysql() {
|
||||
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-mysql/create.sql.gz"
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-G dialout \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
chgrp zabbix /usr/bin/nmap && \
|
||||
setcap cap_net_raw+eip /usr/bin/nmap && \
|
||||
|
@ -354,7 +354,7 @@ create_db_schema_mysql() {
|
||||
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-mysql/create.sql.gz"
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@ create_db_schema_mysql() {
|
||||
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-mysql/create.sql.gz"
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ create_db_schema_postgresql() {
|
||||
exec_sql_file "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"
|
||||
fi
|
||||
|
||||
apply_db_scripts "/var/lib/zabbix/dbscripts/*.sql"
|
||||
apply_db_scripts "${ZABBIX_USER_HOME_DIR}/dbscripts/*.sql"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,8 @@ ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y-%m-%dT%T%z ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||
ZBX_SNMP_TRAP_USE_DNS=false
|
||||
ZBX_SNMP_TRAP_USE_DNS=false \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||
@ -40,21 +41,21 @@ RUN set -eux && \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
touch /var/lib/net-snmp/snmptrapd.conf && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/
|
||||
chown --quiet -R zabbix:root /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/
|
||||
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}/snmptraps/
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
VOLUME ["${ZABBIX_USER_HOME_DIR}/snmptraps"]
|
||||
|
||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||
COPY ["conf/etc/snmp/snmptrapd.conf", "/etc/snmp/"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZABBIX_TRAPS_FILE="/var/lib/zabbix/snmptraps/snmptraps.log"
|
||||
ZABBIX_TRAPS_FILE="${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
|
||||
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y-%m-%dT%T%z"}
|
||||
|
||||
|
@ -8,7 +8,8 @@ ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y-%m-%dT%T%z ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||
ZBX_SNMP_TRAP_USE_DNS=false
|
||||
ZBX_SNMP_TRAP_USE_DNS=false \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||
@ -46,21 +47,21 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
touch /var/lib/net-snmp/snmptrapd.conf && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/
|
||||
chown --quiet -R zabbix:root /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/
|
||||
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}/snmptraps/
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
VOLUME ["${ZABBIX_USER_HOME_DIR}/snmptraps"]
|
||||
|
||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||
COPY ["conf/etc/snmp/snmptrapd.conf", "/etc/snmp/"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZABBIX_TRAPS_FILE="/var/lib/zabbix/snmptraps/snmptraps.log"
|
||||
ZABBIX_TRAPS_FILE="${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
|
||||
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y-%m-%dT%T%z"}
|
||||
|
||||
|
@ -8,7 +8,8 @@ ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y-%m-%dT%T%z ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||
ZBX_SNMP_TRAP_USE_DNS=false
|
||||
ZBX_SNMP_TRAP_USE_DNS=false \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||
@ -45,21 +46,21 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
touch /var/lib/net-snmp/snmptrapd.conf && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/
|
||||
chown --quiet -R zabbix:root /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/
|
||||
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}/snmptraps/
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
VOLUME ["${ZABBIX_USER_HOME_DIR}/snmptraps"]
|
||||
|
||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||
COPY ["conf/etc/snmp/snmptrapd.conf", "/etc/snmp/"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZABBIX_TRAPS_FILE="/var/lib/zabbix/snmptraps/snmptraps.log"
|
||||
ZABBIX_TRAPS_FILE="${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
|
||||
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y-%m-%dT%T%z"}
|
||||
|
||||
|
@ -10,7 +10,8 @@ ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y-%m-%dT%T%z ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||
ZBX_SNMP_TRAP_USE_DNS=false
|
||||
ZBX_SNMP_TRAP_USE_DNS=false \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
|
||||
|
||||
LABEL description="Zabbix SNMP traps receiver" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -85,21 +86,21 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
touch /var/lib/net-snmp/snmptrapd.conf && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/
|
||||
chown --quiet -R zabbix:root /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/
|
||||
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}/snmptraps/
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
VOLUME ["${ZABBIX_USER_HOME_DIR}/snmptraps"]
|
||||
|
||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||
COPY ["conf/etc/snmp/snmptrapd.conf", "/etc/snmp/"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZABBIX_TRAPS_FILE="/var/lib/zabbix/snmptraps/snmptraps.log"
|
||||
ZABBIX_TRAPS_FILE="${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
|
||||
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y-%m-%dT%T%z"}
|
||||
|
||||
|
@ -8,7 +8,8 @@ ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/mibs/ietf:/var/lib/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y-%m-%dT%T%z ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||
ZBX_SNMP_TRAP_USE_DNS=false
|
||||
ZBX_SNMP_TRAP_USE_DNS=false \
|
||||
ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||
@ -43,21 +44,21 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
download-mibs && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/snmptraps && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR}/mibs && \
|
||||
chown --quiet -R zabbix:root /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chgrp -R 0 /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/ && \
|
||||
chmod -R g=u /etc/snmp/ ${ZABBIX_USER_HOME_DIR}/ /var/tmp/ /var/run/
|
||||
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
WORKDIR ${ZABBIX_USER_HOME_DIR}/snmptraps/
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
VOLUME ["${ZABBIX_USER_HOME_DIR}/snmptraps"]
|
||||
|
||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||
COPY ["conf/etc/snmp/snmptrapd.conf", "/etc/snmp/"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ZABBIX_TRAPS_FILE="/var/lib/zabbix/snmptraps/snmptraps.log"
|
||||
ZABBIX_TRAPS_FILE="${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
|
||||
|
||||
ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y-%m-%dT%T%z"}
|
||||
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||
@ -75,9 +76,9 @@ RUN set -eux && \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/apache2/conf.d/default.conf" && \
|
||||
rm -f "/etc/apache2/conf.d/ssl.conf" && \
|
||||
sed -ri \
|
||||
@ -95,11 +96,11 @@ RUN set -eux && \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/apache2/ /etc/php83/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php83/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php83/
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -136,16 +134,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/apache2/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -218,12 +216,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||
@ -92,9 +93,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -109,14 +110,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -136,16 +134,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/httpd/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -234,12 +232,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||
@ -79,9 +80,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -96,14 +97,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -136,16 +134,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/httpd/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -234,12 +232,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||
@ -65,9 +66,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f /etc/apache2/sites-available/* && \
|
||||
rm -f /etc/apache2/sites-enabled/* && \
|
||||
/usr/sbin/a2enmod ssl && \
|
||||
@ -89,17 +90,17 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
mkdir -p /var/lib/locales/supported.d/ && \
|
||||
rm -f /var/lib/locales/supported.d/local && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
|
||||
dpkg-reconfigure locales && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/apache2/ /etc/php/8.3/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php/8.3/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php/8.3/
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -137,19 +135,19 @@ check_db_connect() {
|
||||
prepare_web_server() {
|
||||
APACHE_SITES_DIR="/etc/apache2/sites-enabled"
|
||||
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_envvars" "/etc/apache2/envvars"
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_envvars" "/etc/apache2/envvars"
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -222,12 +220,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
||||
@ -74,9 +75,9 @@ RUN set -eux && \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/apache2/conf.d/default.conf" && \
|
||||
rm -f "/etc/apache2/conf.d/ssl.conf" && \
|
||||
sed -ri \
|
||||
@ -94,11 +95,11 @@ RUN set -eux && \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/apache2/ /etc/php83/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php83/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php83/
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -135,16 +133,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/apache2/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -217,12 +215,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
||||
@ -93,9 +94,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -110,14 +111,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -135,16 +133,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/httpd/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -233,12 +231,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
||||
@ -80,9 +81,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -97,14 +98,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -135,16 +133,16 @@ prepare_web_server() {
|
||||
APACHE_SITES_DIR=/etc/httpd/conf.d
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -233,12 +231,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
||||
@ -65,9 +66,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
rm -f /etc/apache2/sites-available/* && \
|
||||
rm -f /etc/apache2/sites-enabled/* && \
|
||||
/usr/sbin/a2enmod ssl && \
|
||||
@ -89,17 +90,17 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
mkdir -p /var/lib/locales/supported.d/ && \
|
||||
rm -f /var/lib/locales/supported.d/local && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
|
||||
dpkg-reconfigure locales && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/apache2/ /etc/php/8.3/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php/8.3/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php/8.3/
|
||||
|
@ -19,8 +19,6 @@ fi
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Apache main configuration file
|
||||
@ -136,19 +134,19 @@ check_db_connect() {
|
||||
prepare_web_server() {
|
||||
APACHE_SITES_DIR="/etc/apache2/sites-enabled"
|
||||
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_envvars" "/etc/apache2/envvars"
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_envvars" "/etc/apache2/envvars"
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -225,12 +223,12 @@ prepare_zbx_web_config() {
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache.conf"
|
||||
"$ZABBIX_CONF_DIR/apache.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/apache_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/apache_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/apache_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||
@ -76,9 +77,9 @@ RUN set -eux && \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -rf /etc/php83/php-fpm.d/www.conf && \
|
||||
rm -f /etc/nginx/http.d/*.conf && \
|
||||
@ -90,11 +91,11 @@ RUN set -eux && \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -140,21 +138,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -245,21 +243,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -270,10 +268,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||
@ -91,9 +92,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -105,14 +106,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -140,21 +138,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -245,21 +243,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -270,10 +268,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||
@ -78,9 +79,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -92,14 +93,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -140,21 +138,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -245,21 +243,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -270,10 +268,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -121,9 +122,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.conf.rpmnew && \
|
||||
@ -136,14 +137,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -140,21 +138,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -245,21 +243,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -270,10 +268,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||
@ -68,9 +69,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -rf /var/cache/nginx/ && \
|
||||
@ -84,17 +85,17 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
mkdir -p /var/lib/locales/supported.d/ && \
|
||||
rm -f /var/lib/locales/supported.d/local && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
|
||||
dpkg-reconfigure locales && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="www-data"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -140,21 +138,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -245,21 +243,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -270,10 +268,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
@ -75,9 +76,9 @@ RUN set -eux && \
|
||||
--shell /sbin/nologin \
|
||||
--home /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -rf /etc/php83/php-fpm.d/www.conf && \
|
||||
rm -f /etc/nginx/http.d/*.conf && \
|
||||
@ -89,11 +90,11 @@ RUN set -eux && \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php83/php-fpm.d/ /etc/php83/php-fpm.conf && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -139,21 +137,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -244,21 +242,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -269,10 +267,10 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
@ -92,9 +93,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -106,14 +107,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -139,21 +137,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -244,21 +242,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -272,7 +270,7 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
@ -79,9 +80,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.d/www.conf && \
|
||||
@ -93,14 +94,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -139,21 +137,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -244,21 +242,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -272,7 +270,7 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
@ -122,9 +123,9 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -f /etc/php-fpm.conf.rpmnew && \
|
||||
@ -137,14 +138,14 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf /var/log/nginx/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -139,21 +137,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -244,21 +242,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -272,7 +270,7 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -12,7 +12,8 @@ ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZABBIX_CONF_DIR="/etc/zabbix"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||
@ -68,9 +69,9 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /etc/zabbix/web && \
|
||||
mkdir -p /etc/zabbix/web/certs && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR}/web/certs && \
|
||||
mkdir -p /var/lib/php/session && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -rf /var/cache/nginx/ && \
|
||||
@ -84,17 +85,17 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
ln -s "${ZABBIX_CONF_DIR}/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
|
||||
mkdir -p /var/lib/locales/supported.d/ && \
|
||||
rm -f /var/lib/locales/supported.d/local && \
|
||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||
cut -d"'" -f 2 | sort | \
|
||||
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
|
||||
dpkg-reconfigure locales && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u ${ZABBIX_CONF_DIR}/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
|
||||
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php/8.3/fpm/php-fpm.conf /etc/php/8.3/fpm/pool.d/ && \
|
||||
|
@ -22,8 +22,6 @@ fi
|
||||
: ${DAEMON_USER:="www-data"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
@ -139,21 +137,21 @@ prepare_web_server() {
|
||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
||||
|
||||
if [ ! -f "/proc/net/if_inet6" ]; then
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx.conf"
|
||||
sed -i '/listen \[::\]/d' "$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
ln -sfT "$ZABBIX_CONF_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -244,21 +242,21 @@ prepare_zbx_web_config() {
|
||||
FCGI_READ_TIMEOUT=$(expr ${ZBX_MAXEXECUTIONTIME} + 1)
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
: ${HTTP_INDEX_FILE:="index.php"}
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx.conf"
|
||||
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
if [ -f "$ZABBIX_CONF_DIR/nginx_ssl.conf" ]; then
|
||||
sed -i \
|
||||
-e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
|
||||
sed -i \
|
||||
-e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${ENABLE_WEB_ACCESS_LOG:="true"}
|
||||
@ -272,7 +270,7 @@ prepare_zbx_web_config() {
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
"$ZABBIX_CONF_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
@ -49,7 +49,7 @@ RUN set -eux && \
|
||||
--uid 1997 \
|
||||
--ingroup zabbix \
|
||||
--shell /sbin/nologin \
|
||||
--home ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
|
@ -64,7 +64,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
|
@ -58,7 +58,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
|
@ -89,7 +89,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
|
@ -63,7 +63,7 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
|
||||
-g zabbix \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR}/ \
|
||||
--home-dir ${ZABBIX_USER_HOME_DIR} \
|
||||
zabbix && \
|
||||
mkdir -p ${ZABBIX_CONF_DIR} && \
|
||||
mkdir -p ${ZABBIX_USER_HOME_DIR} && \
|
||||
|
Loading…
Reference in New Issue
Block a user