mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-15 01:58:51 +01:00
Updated permissions
This commit is contained in:
commit
750941c70e
@ -80,7 +80,7 @@ RUN set -eux && \
|
||||
apt-get -y autoremove && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
EXPOSE 162/UDP
|
||||
EXPOSE 1162/UDP
|
||||
|
||||
WORKDIR /var/lib/zabbix/snmptraps/
|
||||
|
||||
|
@ -80,9 +80,9 @@ RUN set -eux && \
|
||||
rm -rf tests && \
|
||||
./locale/make_mo.sh && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/apache2/ /etc/php7/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php7/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php7/ && \
|
||||
|
@ -264,7 +264,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -79,9 +79,9 @@ RUN set -eux && \
|
||||
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/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /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 && \
|
||||
|
@ -264,7 +264,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -90,9 +90,9 @@ RUN set -eux && \
|
||||
dpkg-reconfigure locales && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
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 /etc/apache2/ /etc/php/7.2/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php/7.2/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php/7.2/ && \
|
||||
|
@ -257,7 +257,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -79,9 +79,9 @@ RUN set -eux && \
|
||||
rm -rf tests && \
|
||||
./locale/make_mo.sh && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/apache2/ /etc/php7/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php7/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php7/ && \
|
||||
|
@ -250,7 +250,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -79,9 +79,9 @@ RUN set -eux && \
|
||||
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/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /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 && \
|
||||
|
@ -262,7 +262,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -90,9 +90,9 @@ RUN set -eux && \
|
||||
dpkg-reconfigure locales && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
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 /etc/apache2/ /etc/php/7.2/ && \
|
||||
chgrp -R 0 /etc/apache2/ /etc/php/7.2/ && \
|
||||
chmod -R g=u /etc/apache2/ /etc/php/7.2/ && \
|
||||
|
@ -259,7 +259,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -44,6 +44,7 @@ RUN set -eux && \
|
||||
supervisor && \
|
||||
rm -rf /etc/php7/php-fpm.d/www.conf && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
ARG MAJOR_VERSION=5.0
|
||||
@ -73,15 +74,15 @@ RUN set -eux && \
|
||||
rm -rf tests && \
|
||||
./locale/make_mo.sh && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chown --quiet -R zabbix:root /var/lib/php/session/ && \
|
||||
chgrp -R 0 /var/lib/php/session/ && \
|
||||
chmod -R g=u /var/lib/php/session/ && \
|
||||
chown --quiet -R zabbix:root /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
chgrp -R 0 /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
chmod -R g=u /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
apk del --purge --no-network \
|
||||
build-dependencies && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
@ -229,8 +229,6 @@ prepare_web_server() {
|
||||
else
|
||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
}
|
||||
|
||||
clear_deploy() {
|
||||
@ -287,7 +285,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -71,9 +71,9 @@ RUN set -eux && \
|
||||
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/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -285,7 +285,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -58,7 +58,7 @@ RUN set -eux && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
rm -rf /var/cache/nginx/ && \
|
||||
rm -f /etc/php/7.2/fpm/pool.d/www.conf && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y purge gpg dirmngr gpg-agent && \
|
||||
apt-get -y autoremove && \
|
||||
apt-get -y clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
@ -99,9 +99,9 @@ RUN set -eux && \
|
||||
dpkg-reconfigure locales && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
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 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
|
@ -225,8 +225,6 @@ prepare_web_server() {
|
||||
else
|
||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
}
|
||||
|
||||
clear_deploy() {
|
||||
@ -279,7 +277,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -43,6 +43,7 @@ RUN set -eux && \
|
||||
supervisor && \
|
||||
rm -rf /etc/php7/php-fpm.d/www.conf && \
|
||||
rm -f /etc/nginx/conf.d/*.conf && \
|
||||
ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
ARG MAJOR_VERSION=5.0
|
||||
@ -72,15 +73,15 @@ RUN set -eux && \
|
||||
rm -rf tests && \
|
||||
./locale/make_mo.sh && \
|
||||
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php7/php-fpm.d/ /etc/php7/php-fpm.conf && \
|
||||
chown --quiet -R zabbix:root /var/lib/php/session/ && \
|
||||
chgrp -R 0 /var/lib/php/session/ && \
|
||||
chmod -R g=u /var/lib/php/session/ && \
|
||||
chown --quiet -R zabbix:root /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
chgrp -R 0 /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
chmod -R g=u /var/lib/php/session/ /var/lib/nginx/ && \
|
||||
apk del --purge --no-network \
|
||||
build-dependencies && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
@ -225,8 +225,6 @@ prepare_web_server() {
|
||||
else
|
||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
}
|
||||
|
||||
clear_deploy() {
|
||||
@ -283,7 +281,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -71,9 +71,9 @@ RUN set -eux && \
|
||||
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/conf/ /usr/share/zabbix/modules/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ /usr/share/zabbix/modules/ && \
|
||||
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 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
|
||||
|
@ -225,8 +225,6 @@ prepare_web_server() {
|
||||
else
|
||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
}
|
||||
|
||||
clear_deploy() {
|
||||
@ -283,7 +281,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
@ -99,9 +99,9 @@ RUN set -eux && \
|
||||
dpkg-reconfigure locales && \
|
||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||
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 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||
|
@ -225,8 +225,6 @@ prepare_web_server() {
|
||||
else
|
||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
}
|
||||
|
||||
clear_deploy() {
|
||||
@ -279,7 +277,11 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_HISTORYSTORAGETYPES}/$history_storage_types/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
[ -n "${ZBX_SESSION_NAME}" ] && sed -i "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
if [ -n "${ZBX_SESSION_NAME}" ]; then
|
||||
cp "$ZBX_WWW_ROOT/include/defines.inc.php" "/tmp/defines.inc.php_tmp"
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare_web() {
|
||||
|
Loading…
Reference in New Issue
Block a user