From d67206ebc31c2add13532751e50c7756e4d82454 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Tue, 27 Apr 2021 16:43:44 -0400 Subject: [PATCH] Added Zabbix web service image --- web-service/alpine/Dockerfile | 2 +- web-service/alpine/README.md | 11 +++++++---- web-service/ubuntu/Dockerfile | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/web-service/alpine/Dockerfile b/web-service/alpine/Dockerfile index 1fa030370..df8992d8a 100644 --- a/web-service/alpine/Dockerfile +++ b/web-service/alpine/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux && \ git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ - sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ + sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \ ./bootstrap.sh && \ export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ diff --git a/web-service/alpine/README.md b/web-service/alpine/README.md index 0bb55288b..613a0bf32 100644 --- a/web-service/alpine/README.md +++ b/web-service/alpine/README.md @@ -52,10 +52,6 @@ The Zabbix web service log is available through Docker's container log: $ docker logs some-zabbix-web-service ``` -## Capaibilities - - - ## Environment Variables When you start the `zabbix-web-service` image, you can adjust the configuration of the Zabbix web service by passing one or more environment variables on the `docker run` command line. @@ -139,6 +135,13 @@ If you have any problems with or questions about this image, please contact us t ### Known issues +Zabbix web services uses Google Chromium with headless mode. Because of restrictions you may see the following error during report generation: +``` +Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted +``` + +To avoid the issue it is required to add ``SYS_ADMIN`` capability for Zabbix web service. The capability is redundant and allow too much. + ## Contributing You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. diff --git a/web-service/ubuntu/Dockerfile b/web-service/ubuntu/Dockerfile index 5822e7acc..c85fc0c21 100644 --- a/web-service/ubuntu/Dockerfile +++ b/web-service/ubuntu/Dockerfile @@ -45,6 +45,8 @@ RUN set -eux && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A && \ apt-get -y update && \ DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install chromium chromium-sandbox && \ + DEBIAN_FRONTEND=noninteractive apt-get -y purge \ + gnupg && \ apt-get -y autoremove && \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/*