Minor design changes

This commit is contained in:
Alexey Pustovalov 2021-10-16 11:49:19 -04:00
parent f263d49f01
commit 93cbd3d826
103 changed files with 2522 additions and 2305 deletions

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -32,8 +32,25 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="tini \
adduser --system \ bash \
tzdata \
coreutils \
iputils \
pcre \
libcurl \
libmodbus \
libldap" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -47,16 +64,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
apk add --no-cache --clean-protected \
tini \
bash \
tzdata \
coreutils \
iputils \
pcre \
libcurl \
libmodbus \
libldap && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -32,7 +32,19 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl-minimal \
openssl-libs \
zlib" && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system --comment "Zabbix monitoring system" \
-g zabbix -G root \ -g zabbix -G root \
@ -45,15 +57,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl-minimal \
openssl-libs \
zlib" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -62,10 +65,10 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
dnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -33,19 +33,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/zabbix_agentd.d && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tini \ tini \
tzdata \ tzdata \
@ -61,7 +48,25 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/zabbix_agentd.d && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL name="zabbix/zabbix-agent-trunk" \ LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-agent-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-agent --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" \
summary="Zabbix agent" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix agent" \
description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-agent --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ io.k8s.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
io.k8s.display-name="Zabbix Agent" \ io.k8s.display-name="Zabbix Agent" \
io.openshift.expose-services="10050:10050" \ io.openshift.expose-services="10050:10050" \
io.openshift.tags="zabbix,zabbix-agent" \ io.openshift.tags="zabbix,zabbix-agent" \
org.label-schema.name="zabbix-agent-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.docker.cmd="docker run --name zabbix-agent --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-agent-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-agent --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -49,7 +50,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tini \ tini \
tzdata \ tzdata \
iputils \ iputils \
@ -67,9 +69,13 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
--comment "Zabbix monitoring system" \
-g zabbix -G root \ -g zabbix -G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
@ -80,10 +86,10 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -33,10 +33,27 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
tini \
tzdata \
ca-certificates \
libssl1.1 \
libcurl4 \
libmodbus5 \
libldap-2.4" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -46,15 +63,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \
tzdata \
ca-certificates \
libssl1.1 \
libcurl4 \
libmodbus5 \
libldap-2.4 && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -3,7 +3,7 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -12,10 +12,6 @@ FROM $BASE_IMAGE
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES
ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix agent" ` LABEL org.opencontainers.image.title="Zabbix agent" `

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent 2" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent 2" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -32,8 +32,22 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="tini \
adduser --system \ tzdata \
bash \
pcre \
coreutils \
iputils" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -48,13 +62,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/buffer && \ mkdir -p /var/lib/zabbix/buffer && \
apk add --no-cache --clean-protected \
tini \
tzdata \
bash \
pcre \
coreutils \
iputils && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
@ -64,8 +71,6 @@ EXPOSE 10050/TCP 31999/TCP
WORKDIR /var/lib/zabbix WORKDIR /var/lib/zabbix
VOLUME ["/var/lib/zabbix/enc"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent 2" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent 2" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -32,10 +32,23 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl-minimal \
openssl-libs" && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -46,14 +59,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/buffer && \ mkdir -p /var/lib/zabbix/buffer && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl-minimal \
openssl-libs" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -62,10 +67,10 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
dnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
dnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
@ -73,8 +78,6 @@ EXPOSE 10050/TCP 31999/TCP
WORKDIR /var/lib/zabbix WORKDIR /var/lib/zabbix
VOLUME ["/var/lib/zabbix/enc"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"]

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent 2" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent 2" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -33,10 +33,22 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf"
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl \
openssl-libs" && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -47,13 +59,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/buffer && \ mkdir -p /var/lib/zabbix/buffer && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl \
openssl-libs" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol8_baseos_latest" \ --enablerepo="ol8_baseos_latest" \
@ -61,7 +66,9 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
@ -73,8 +80,6 @@ EXPOSE 10050/TCP 31999/TCP
WORKDIR /var/lib/zabbix WORKDIR /var/lib/zabbix
VOLUME ["/var/lib/zabbix/enc"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"]

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL name="zabbix/zabbix-agent2-trunk" \ LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-agent2-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" \
summary="Zabbix agent" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix agent" \
description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ io.k8s.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
io.k8s.display-name="Zabbix Agent 2" \ io.k8s.display-name="Zabbix Agent 2" \
io.openshift.expose-services="10050:10050" \ io.openshift.expose-services="10050:10050" \
io.openshift.tags="zabbix,zabbix-agent" \ io.openshift.tags="zabbix,zabbix-agent" \
org.label-schema.name="zabbix-agent2-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-agent2-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -49,7 +50,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tini \ tini \
tzdata \ tzdata \
iputils \ iputils \
@ -67,10 +69,15 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -81,10 +88,10 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/buffer && \ mkdir -p /var/lib/zabbix/buffer && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
@ -92,8 +99,6 @@ EXPOSE 10050/TCP 31999/TCP
WORKDIR /var/lib/zabbix WORKDIR /var/lib/zabbix
VOLUME ["/var/lib/zabbix/enc"]
COPY ["docker-entrypoint.sh", "/usr/bin/"] COPY ["docker-entrypoint.sh", "/usr/bin/"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"]

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix agent 2" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix agent 2" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -33,10 +33,25 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf"
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="tini \
tzdata \
ca-certificates \
libssl1.1 \
libcurl4 \
libldap-2.4" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -47,14 +62,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/buffer && \ mkdir -p /var/lib/zabbix/buffer && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \
tzdata \
ca-certificates \
libssl1.1 \
libcurl4 \
libldap-2.4 && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -3,7 +3,7 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-agent:ltsc2022-agent2-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -12,10 +12,6 @@ FROM $BASE_IMAGE
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES
ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix agent 2" ` LABEL org.opencontainers.image.title="Zabbix agent 2" `

View File

@ -3,25 +3,23 @@ FROM alpine:3.14
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/lib/jvm/default-jvm/bin:$PATH \ PATH=/usr/lib/jvm/default-jvm/bin:$PATH \
JAVA_HOME=/usr/lib/jvm/default-jvm JAVA_HOME=/usr/lib/jvm/default-jvm
LABEL org.opencontainers.image.title="Zabbix build base" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.title="Zabbix build base" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
apk add --no-cache --clean-protected \ INSTALL_PKGS="bash \
bash \
autoconf \ autoconf \
automake \ automake \
coreutils \ coreutils \
@ -45,5 +43,9 @@ RUN set -eux && \
go \ go \
make \ make \
openjdk8-jre-base \ openjdk8-jre-base \
unixodbc-dev && \ unixodbc-dev" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*

View File

@ -1,28 +1,24 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/local/go/bin:$PATH PATH=/usr/local/go/bin:$PATH
LABEL org.opencontainers.image.title="Zabbix build base" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.title="Zabbix build base" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo && \ REPOLIST="baseos,appstream,powertools" && \
dnf --quiet makecache && \
dnf -y install epel-release && \
dnf -y module enable mysql && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -47,8 +43,15 @@ RUN set -eux && \
tar \ tar \
gettext \ gettext \
unixODBC-devel" && \ unixODBC-devel" && \
dnf -y install --setopt=tsflags=nodocs --setopt=install_weak_deps=False --best \ dnf -y module enable mysql && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
dnf -y clean all && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
case "$ARCH_SUFFIX" in \ case "$ARCH_SUFFIX" in \
x86_64) \ x86_64) \
@ -75,6 +78,5 @@ RUN set -eux && \
rm -rf "$GNUPGHOME" go.tgz.asc && \ rm -rf "$GNUPGHOME" go.tgz.asc && \
tar -C /usr/local -xzf go.tgz && \ tar -C /usr/local -xzf go.tgz && \
rm go.tgz && \ rm go.tgz && \
dnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -3,23 +3,21 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/local/go/bin:$PATH PATH=/usr/local/go/bin:$PATH
LABEL org.opencontainers.image.title="Zabbix build base" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.title="Zabbix build base" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
microdnf -y module enable mysql && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -44,6 +42,7 @@ RUN set -eux && \
tar \ tar \
gettext \ gettext \
unixODBC-devel" && \ unixODBC-devel" && \
microdnf -y module enable mysql && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "ol8_baseos_latest" \ --enablerepo "ol8_baseos_latest" \
@ -52,6 +51,7 @@ RUN set -eux && \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs ${INSTALL_PKGS} && \
microdnf -y clean all && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
case "$ARCH_SUFFIX" in \ case "$ARCH_SUFFIX" in \
x86_64) \ x86_64) \
@ -74,6 +74,5 @@ RUN set -eux && \
rm -rf "$GNUPGHOME" go.tgz.asc && \ rm -rf "$GNUPGHOME" go.tgz.asc && \
tar -C /usr/local -xzf go.tgz && \ tar -C /usr/local -xzf go.tgz && \
rm go.tgz && \ rm go.tgz && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -4,33 +4,32 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE= ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/local/go/bin:$PATH PATH=/usr/local/go/bin:$PATH
LABEL name="zabbix/zabbix-build-base-trunk" \ LABEL description="Prepared environment to build Zabbix components" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
vendor="Zabbix LLC" \ name="zabbix/zabbix-build-base-trunk" \
version="${MAJOR_VERSION}" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base" \ summary="Zabbix build base" \
description="Prepared environment to build Zabbix components" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \
io.k8s.description="Prepared environment to build Zabbix components" \ io.k8s.description="Prepared environment to build Zabbix components" \
io.k8s.display-name="Zabbix build base" \ io.k8s.display-name="Zabbix build base" \
io.openshift.expose-services="" \ io.openshift.expose-services="" \
io.openshift.tags="zabbix,build" \ io.openshift.tags="zabbix,build" \
org.label-schema.name="zabbix-build-base-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Prepared environment to build Zabbix components" \ org.label-schema.description="Prepared environment to build Zabbix components" \
org.label-schema.vcs-ref="${VCS_REF}" org.label-schema.name="zabbix-build-base-rhel" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vendor="Zabbix LLC"
COPY ["licenses", "/licenses"] COPY ["licenses", "/licenses"]
RUN set -eux && \ RUN set -eux && \
microdnf -y module enable mysql && \
INSTALL_PKGS="autoconf \ INSTALL_PKGS="autoconf \
automake \ automake \
bash \ bash \
@ -55,9 +54,6 @@ RUN set -eux && \
tar \ tar \
gettext \ gettext \
unixODBC-devel" && \ unixODBC-devel" && \
curl -sSL -o /tmp/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \
rm -rf /tmp/epel-release-latest-8.noarch.rpm && \
microdnf -y module enable mysql && \ microdnf -y module enable mysql && \
microdnf -y install \ microdnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -66,11 +62,11 @@ RUN set -eux && \
--enablerepo "rhel-8-for-x86_64-baseos-rpms" \ --enablerepo "rhel-8-for-x86_64-baseos-rpms" \
--enablerepo "rhel-8-for-x86_64-appstream-rpms" \ --enablerepo "rhel-8-for-x86_64-appstream-rpms" \
--enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \ --enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \
--enablerepo "epel" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
microdnf -y clean all && \
ARCH_SUFFIX="$(arch)"; \ ARCH_SUFFIX="$(arch)"; \
case "$ARCH_SUFFIX" in \ case "$ARCH_SUFFIX" in \
x86_64) \ x86_64) \
@ -81,6 +77,10 @@ RUN set -eux && \
url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \ url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \
sha256='a5a43c9cdabdb9f371d56951b14290eba8ce2f9b0db48fb5fc657943984fd4fc'; \ sha256='a5a43c9cdabdb9f371d56951b14290eba8ce2f9b0db48fb5fc657943984fd4fc'; \
;; \ ;; \
ppc64le) \
url='https://golang.org/dl/go1.17.2.linux-ppc64le.tar.gz'; \
sha256='12e2dc7e0ffeebe77083f267ef6705fec1621cdf2ed6489b3af04a13597ed68d'; \
;; \
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
esac; \ esac; \
wget -O go.tgz.asc "$url.asc" && \ wget -O go.tgz.asc "$url.asc" && \
@ -93,6 +93,5 @@ RUN set -eux && \
rm -rf "$GNUPGHOME" go.tgz.asc && \ rm -rf "$GNUPGHOME" go.tgz.asc && \
tar -C /usr/local -xzf go.tgz && \ tar -C /usr/local -xzf go.tgz && \
rm go.tgz && \ rm go.tgz && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -3,25 +3,22 @@ FROM ubuntu:focal
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} \
PATH=/usr/lib/go-1.16/bin:$PATH PATH=/usr/lib/go-1.16/bin:$PATH
LABEL org.opencontainers.image.title="Zabbix build base" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \ org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.title="Zabbix build base" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
apt-get -y update && \ INSTALL_PKGS="bash \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
bash \
autoconf \ autoconf \
automake \ automake \
binutils \ binutils \
@ -45,7 +42,11 @@ RUN set -eux && \
gettext \ gettext \
git \ git \
golang-1.16 \ golang-1.16 \
unixodbc-dev && \ unixodbc-dev" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -11,7 +11,6 @@ ARG CPU_MODEL=AMD64
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/16/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/16/release/vs_buildtools.exe
ARG NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe ARG NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe
@ -21,7 +20,8 @@ ARG PCRE_URL=https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.zip
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
ARG LIBMODBUS_URL=https://github.com/stephane/libmodbus.git ARG LIBMODBUS_URL=https://github.com/stephane/libmodbus.git
ENV BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` ENV ZBX_VERSION=$ZBX_VERSION `
BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL `
PCRE_VERSION=$PCRE_VERSION OPENSSL_VERSION=$OPENSSL_VERSION LIBMODBUS_VERSION=$LIBMODBUS_VERSION ` PCRE_VERSION=$PCRE_VERSION OPENSSL_VERSION=$OPENSSL_VERSION LIBMODBUS_VERSION=$LIBMODBUS_VERSION `
GIT_URL=$GIT_URL NASM_URL=$NASM_URL PERL_URL=$PERL_URL LIBMODBUS_URL=$LIBMODBUS_URL PCRE_URL=$PCRE_URL OPENSSL_URL=$OPENSSL_URL GIT_URL=$GIT_URL NASM_URL=$NASM_URL PERL_URL=$PERL_URL LIBMODBUS_URL=$LIBMODBUS_URL PCRE_URL=$PCRE_URL OPENSSL_URL=$OPENSSL_URL
@ -32,8 +32,7 @@ LABEL org.opencontainers.image.title="Zabbix agent build base for Windows" `
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent images" ` org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent images" `
org.opencontainers.image.licenses="GPL v2.0" ` org.opencontainers.image.licenses="GPL v2.0" `
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
org.opencontainers.image.version="${ZBX_VERSION}" ` org.opencontainers.image.version="${ZBX_VERSION}"
org.opencontainers.image.source="${ZBX_SOURCES}"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

View File

@ -13,7 +13,6 @@ ARG CPU_MODEL=AMD64
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/16/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/16/release/vs_buildtools.exe
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip
@ -24,7 +23,8 @@ ARG PCRE_URL=https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.zip
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi
ENV BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` ENV ZBX_VERSION=$ZBX_VERSION `
BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL `
PCRE_VERSION=$PCRE_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ZLIB_VERSION=$ZLIB_VERSION ` PCRE_VERSION=$PCRE_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ZLIB_VERSION=$ZLIB_VERSION `
GOLANG_VERSION=$GOLANG_VERSION SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION ` GOLANG_VERSION=$GOLANG_VERSION SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION `
GIT_URL=$GIT_URL MINGW_URL=$MINGW_URL CYGWIN_URL=$CYGWIN_URL GOLANG_URL=$GOLANG_URL SEVEN_ZIP_URL=$SEVEN_ZIP_URL ` GIT_URL=$GIT_URL MINGW_URL=$MINGW_URL CYGWIN_URL=$CYGWIN_URL GOLANG_URL=$GOLANG_URL SEVEN_ZIP_URL=$SEVEN_ZIP_URL `
@ -37,8 +37,7 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent 2 images" ` org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent 2 images" `
org.opencontainers.image.licenses="GPL v2.0" ` org.opencontainers.image.licenses="GPL v2.0" `
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
org.opencontainers.image.version="${ZBX_VERSION}" ` org.opencontainers.image.version="${ZBX_VERSION}"
org.opencontainers.image.source="${ZBX_SOURCES}"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for MySQL based images" \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,21 +36,21 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-mysql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \ --with-mysql \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for MySQL based images" \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -34,22 +34,23 @@ RUN set -eux && \
--libdir=/usr/lib/zabbix \ --libdir=/usr/lib/zabbix \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-ipv6 \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-mysql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \ --with-mysql \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for MySQL based images" \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -34,22 +34,23 @@ RUN set -eux && \
--libdir=/usr/lib/zabbix \ --libdir=/usr/lib/zabbix \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-ipv6 \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-mysql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \ --with-mysql \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION}
@ -10,23 +11,23 @@ ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL name="zabbix/zabbix-build-mysql-trunk" \ LABEL description="Zabbix build base for MySQL based images" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
vendor="Zabbix LLC" \ name="zabbix/zabbix-build-mysql-trunk" \
version="${MAJOR_VERSION}" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base (MySQL)" \ summary="Zabbix build base (MySQL)" \
description="Zabbix build base for MySQL based images" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \
io.k8s.description="Zabbix build base for MySQL based images" \ io.k8s.description="Zabbix build base for MySQL based images" \
io.k8s.display-name="Zabbix build base (MySQL)" \ io.k8s.display-name="Zabbix build base (MySQL)" \
io.openshift.expose-services="" \ io.openshift.expose-services="" \
io.openshift.tags="zabbix,build,mysql" \ io.openshift.tags="zabbix,build,mysql" \
org.label-schema.name="zabbix-build-mysql-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix build base for MySQL based images" \ org.label-schema.description="Zabbix build base for MySQL based images" \
org.label-schema.vcs-ref="${VCS_REF}" org.label-schema.name="zabbix-build-mysql-rhel" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vendor="Zabbix LLC"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -43,22 +44,23 @@ RUN set -eux && \
--libdir=/usr/lib/zabbix \ --libdir=/usr/lib/zabbix \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-ipv6 \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-mysql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \ --with-mysql \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \
@ -78,3 +80,5 @@ RUN set -eux && \
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \ strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \ strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for MySQL based images" \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -34,23 +34,23 @@ RUN set -eux && \
--libdir=/usr/lib/zabbix \ --libdir=/usr/lib/zabbix \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-ipv6 \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-mysql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \ --with-mysql \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -10,7 +10,6 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_COMPONENT=all
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM
LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" ` LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" `
@ -50,7 +49,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
TLSLIBDIR=$env:SystemDrive\openssl_output\lib ` TLSLIBDIR=$env:SystemDrive\openssl_output\lib `
MODBINCDIR=$env:SystemDrive\libmodbus\src ` MODBINCDIR=$env:SystemDrive\libmodbus\src `
MODBLIBDIR=$env:SystemDrive\libmodbus\src\win32\$env:BUILD_ARCH\Release ` MODBLIBDIR=$env:SystemDrive\libmodbus\src\win32\$env:BUILD_ARCH\Release `
$env:ZBX_COMPONENT; ` all; `
` `
Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; ` Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; `
& $env:SystemDrive\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe -V; ` & $env:SystemDrive\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe -V; `

View File

@ -12,7 +12,6 @@ ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}.0 ARG ZBX_VERSION=${MAJOR_VERSION}.0
ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_COMPONENT=all
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION
LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" ` LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" `

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,21 +36,21 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-postgresql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-postgresql \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,21 +36,21 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-postgresql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-postgresql \
--with-ssh \ --with-ssh \
# --with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,21 +36,21 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-postgresql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-postgresql \
--with-ssh \ --with-ssh \
# --with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -9,15 +9,15 @@ ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,21 +36,21 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-server \ --enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--enable-server \
--enable-webservice \ --enable-webservice \
--with-postgresql \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-postgresql \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,19 +36,19 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--with-sqlite3 \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-sqlite3 \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,18 +36,19 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--with-sqlite3 \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-sqlite3 \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix build base (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -36,18 +36,19 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--with-sqlite3 \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-sqlite3 \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION}
@ -10,23 +11,23 @@ ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL name="zabbix/zabbix-build-sqlite3-trunk" \ LABEL description="Zabbix build base for SQLite3 based images" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
vendor="Zabbix LLC" \ name="zabbix/zabbix-build-sqlite3-trunk" \
version="${MAJOR_VERSION}" \
release="${RELEASE}" \ release="${RELEASE}" \
summary="Zabbix build base (SQLite3)" \ summary="Zabbix build base (SQLite3)" \
description="Zabbix build base for SQLite3 based images" \
url="https://www.zabbix.com/" \ url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \
io.k8s.description="Zabbix build base for SQLite3 based images" \ io.k8s.description="Zabbix build base for SQLite3 based images" \
io.k8s.display-name="Zabbix build base (SQLite3)" \ io.k8s.display-name="Zabbix build base (SQLite3)" \
io.openshift.expose-services="" \ io.openshift.expose-services="" \
io.openshift.tags="zabbix,build,sqlite3" \ io.openshift.tags="zabbix,build,sqlite3" \
org.label-schema.name="zabbix-build-sqlite3-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix build base for SQLite3 based images" \ org.label-schema.description="Zabbix build base for SQLite3 based images" \
org.label-schema.vcs-ref="${VCS_REF}" org.label-schema.name="zabbix-build-sqlite3-rhel" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vendor="Zabbix LLC"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \ cd /tmp/ && \
@ -45,18 +46,19 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--with-sqlite3 \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
# --with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-sqlite3 \
--with-ssh \ --with-ssh \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -7,21 +7,21 @@ FROM ${BUILD_BASE_IMAGE} as builder
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" \ org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix build base (SQLite3)" \ org.opencontainers.image.title="Zabbix build base (SQLite3)" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \ org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.licenses="GPL v2.0" org.opencontainers.image.version="${ZBX_VERSION}"
RUN set -eux && \ RUN set -eux && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
ls -lah /tmp/ && \
cd /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \
zabbix_revision=`git rev-parse --short HEAD` && \ 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" include/version.h && \
@ -36,19 +36,19 @@ RUN set -eux && \
--sysconfdir=/etc/zabbix \ --sysconfdir=/etc/zabbix \
--enable-agent \ --enable-agent \
--enable-agent2 \ --enable-agent2 \
--enable-ipv6 \
--enable-java \
--enable-proxy \ --enable-proxy \
--with-sqlite3 \
--with-ldap \ --with-ldap \
--with-libcurl \ --with-libcurl \
--with-libmodbus \
--with-libxml2 \ --with-libxml2 \
--enable-java \
--with-net-snmp \ --with-net-snmp \
--with-openipmi \ --with-openipmi \
--with-openssl \ --with-openssl \
--with-sqlite3 \
--with-ssh \ --with-ssh \
--with-libmodbus \
--with-unixodbc \ --with-unixodbc \
--enable-ipv6 \
--silent && \ --silent && \
make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s dbschema && \
make -j"$(nproc)" -s && \ make -j"$(nproc)" -s && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,20 +9,21 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ 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
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix Java Gateway" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,8 +31,18 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \ openjdk8-jre-base" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -44,9 +54,6 @@ RUN set -eux && \
mkdir -p /etc/zabbix/ && \ mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \ mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \ mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
apk add --clean-protected --no-cache \
bash \
openjdk8-jre-base && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ 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 && \ 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/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix Java Gateway" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,19 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
REPOLIST="baseos,appstream" && \ REPOLIST="baseos,appstream" && \
INSTALL_PKGS="java-1.8.0-openjdk-headless \ INSTALL_PKGS="bash \
java-1.8.0-openjdk-headless \
findutils" && \ findutils" && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -51,6 +41,22 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ 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 && \ 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/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix Java Gateway" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,18 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbi
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ java-1.8.0-openjdk-headless \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
INSTALL_PKGS="java-1.8.0-openjdk-headless \
findutils" && \ findutils" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
@ -49,7 +39,24 @@ RUN set -eux && \
--enablerepo="ol8_appstream" \ --enablerepo="ol8_appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ 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 && \ 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/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL name="zabbix/zabbix-java-gateway-trunk" \ LABEL description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-java-gateway-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" \
summary="Zabbix Java Gateway" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix Java Gateway" \
description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ io.k8s.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
io.k8s.display-name="Zabbix Java Gateway" \ io.k8s.display-name="Zabbix Java Gateway" \
io.openshift.expose-services="10052:10052" \ io.openshift.expose-services="10052:10052" \
io.openshift.tags="gateway,zabbix-java,java" \ io.openshift.tags="gateway,zabbix-java,java" \
org.label-schema.name="zabbix-java-gateway-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.label-schema.docker.cmd="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-java-gateway-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -60,10 +61,15 @@ RUN set -eux && \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -73,10 +79,10 @@ RUN set -eux && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \ mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ 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 && \ mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /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/ && \ chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix Java Gateway" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,10 +31,21 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbi
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
openjdk-8-jre-headless && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -42,16 +53,13 @@ RUN set -eux && \
mkdir -p /etc/zabbix/ && \ mkdir -p /etc/zabbix/ && \
mkdir -p /usr/sbin/zabbix_java/ && \ mkdir -p /usr/sbin/zabbix_java/ && \
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \ mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
openjdk-8-jre-headless && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ 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 && \ mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
apt-get -y autoremove && \
apt-get -y clean && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
chgrp -R 0 /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/ && \ chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
EXPOSE 10052/TCP EXPOSE 10052/TCP

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,20 +9,21 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \ org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -34,32 +34,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
apk add --clean-protected --no-cache \
tini \ tini \
bash \
iputils \ iputils \
libcurl \ libcurl \
libevent \ libevent \
@ -72,7 +48,38 @@ RUN set -eux && \
openipmi-libs \ openipmi-libs \
pcre \ pcre \
unixodbc \ unixodbc \
fping && \ fping" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,29 +2,28 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \ org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -35,28 +34,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
dnf -y module enable mysql && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="libevent \ INSTALL_PKGS="libevent \
tini \ tini \
@ -74,6 +51,7 @@ RUN set -eux && \
pcre \ pcre \
zlib \ zlib \
unixODBC" && \ unixODBC" && \
dnf -y module enable mysql && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -82,6 +60,32 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,21 +9,21 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \ org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -36,10 +35,41 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="libevent \
tini \
gzip \
libssh \
file-libs \
fping \
libxml2 \
mysql \
mysql-libs \
net-snmp-libs \
OpenIPMI-libs \
openldap \
openssl-libs \
pcre \
zlib \
unixODBC" && \
microdnf -y module enable mysql && \
microdnf -y install \
--disablerepo="*" \
--enablerepo="ol8_baseos_latest" \
--enablerepo="ol8_appstream" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \
--best \
--nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -57,31 +87,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \ mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \ mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
microdnf -y module enable mysql && \
INSTALL_PKGS="libevent \
tini \
gzip \
libssh \
file-libs \
fping \
libxml2 \
mysql \
mysql-libs \
net-snmp-libs \
OpenIPMI-libs \
openldap \
openssl-libs \
pcre \
zlib \
unixODBC" && \
microdnf -y install \
--disablerepo="*" \
--enablerepo="ol8_baseos_latest" \
--enablerepo="ol8_appstream" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
@ -11,36 +12,37 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL name="zabbix/zabbix-proxy-mysql-trunk" \ LABEL description="Zabbix proxy with MySQL database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-proxy-mysql-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" \
summary="Zabbix proxy (MySQL)" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix proxy (MySQL)" \
description="Zabbix proxy with MySQL database support" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix proxy with MySQL database support" \ io.k8s.description="Zabbix proxy with MySQL database support" \
io.k8s.display-name="Zabbix proxy (MySQL)" \ io.k8s.display-name="Zabbix proxy (MySQL)" \
io.openshift.expose-services="10051:10051" \ io.openshift.expose-services="10051:10051" \
io.openshift.tags="zabbix,zabbix-proxy,mysql" \ io.openshift.tags="zabbix,zabbix-proxy,mysql" \
org.label-schema.name="zabbix-proxy-mysql-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix proxy with MySQL database support" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix proxy with MySQL database support" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-proxy-mysql-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-mysql-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -51,7 +53,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tini \ tini \
shadow-utils \ shadow-utils \
fping \ fping \
@ -82,10 +85,15 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -103,10 +111,10 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \ mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -10,21 +10,21 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \ org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -36,30 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="tini \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \
ca-certificates \ ca-certificates \
fping \ fping \
libcurl4 \ libcurl4 \
@ -73,7 +50,37 @@ RUN set -eux && \
libxml2 \ libxml2 \
mysql-client \ mysql-client \
snmp-mibs-downloader \ snmp-mibs-downloader \
unixodbc && \ unixodbc" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -9,20 +9,21 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \ org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -32,8 +33,30 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \ tini \
fping \
iputils \
libcurl \
libevent \
libldap \
libssh \
libxml2 \
net-snmp-agent-libs \
openipmi-libs \
pcre \
sqlite-libs \
unixodbc
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -46,6 +69,7 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \ mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \
@ -54,22 +78,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/ssl/certs && \ mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
apk add --clean-protected --no-cache \
tini \
bash \
fping \
iputils \
libcurl \
libevent \
libldap \
libssh \
libxml2 \
net-snmp-agent-libs \
openipmi-libs \
pcre \
sqlite-libs \
unixodbc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -5,25 +5,25 @@ ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION}
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \ org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -33,28 +33,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-sqlite3 && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="libevent \ INSTALL_PKGS="libevent \
tini \ tini \
@ -78,6 +56,32 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -9,21 +9,21 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \ org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -34,28 +34,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-proxy-sqlite3 && \
INSTALL_PKGS="libevent \ INSTALL_PKGS="libevent \
tini \ tini \
libssh \ libssh \
@ -77,7 +55,34 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
@ -8,39 +9,40 @@ FROM ${BUILD_BASE_IMAGE} as builder
FROM registry.access.redhat.com/ubi8/ubi-minimal FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSIO ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL name="zabbix/zabbix-proxy-sqlite-trunk" \ LABEL description="Zabbix proxy with SQLite3 database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-proxy-sqlite-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite-trunk:${ZBX_VERSION}" \
summary="Zabbix proxy (SQLite3)" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix proxy (SQLite3)" \
description="Zabbix proxy with SQLite3 database support" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix proxy with SQLite3 database support" \ io.k8s.description="Zabbix proxy with SQLite3 database support" \
io.k8s.display-name="Zabbix proxy (SQLite3)" \ io.k8s.display-name="Zabbix proxy (SQLite3)" \
io.openshift.expose-services="10051:10051" \ io.openshift.expose-services="10051:10051" \
io.openshift.tags="zabbix,zabbix-proxy,sqlite" \ io.openshift.tags="zabbix,zabbix-proxy,sqlite" \
org.label-schema.name="zabbix-proxy-sqlite-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix proxy with SQLite3 database support" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix proxy with SQLite3 database support" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite3-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-proxy-sqlite-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite3-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -50,7 +52,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tini \ tini \
shadow-utils \ shadow-utils \
fping \ fping \
@ -78,10 +81,15 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -99,10 +107,10 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix/ssl/certs && \ mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -9,21 +9,21 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \ org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -34,29 +34,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/externalscripts && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \ tini \
ca-certificates \ ca-certificates \
fping \ fping \
@ -70,7 +48,37 @@ RUN set -eux && \
libssl1.1 \ libssl1.1 \
libxml2 \ libxml2 \
snmp-mibs-downloader \ snmp-mibs-downloader \
unixodbc && \ unixodbc" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/db_data && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,20 +9,21 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with MySQL database support" \ org.opencontainers.image.description="Zabbix server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -34,8 +34,32 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \ tini \
fping \
tzdata \
iputils \
libcurl \
libevent \
libldap \
libssh \
libxml2 \
mariadb-client \
mariadb-connector-c \
net-snmp-agent-libs \
openipmi-libs \
pcre \
unixodbc" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -60,23 +84,6 @@ RUN set -eux && \
mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \ mkdir -p /usr/share/doc/zabbix-server-mysql && \
apk add --clean-protected --no-cache \
tini \
bash \
fping \
tzdata \
iputils \
libcurl \
libevent \
libldap \
libssh \
libxml2 \
mariadb-client \
mariadb-connector-c \
net-snmp-agent-libs \
openipmi-libs \
pcre \
unixodbc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,29 +2,28 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with MySQL database support" \ org.opencontainers.image.description="Zabbix server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -35,30 +34,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
dnf -y module enable mysql && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="fping \ INSTALL_PKGS="fping \
tini \ tini \
@ -78,6 +53,7 @@ RUN set -eux && \
pcre \ pcre \
zlib \ zlib \
unixODBC" && \ unixODBC" && \
dnf -y module enable mysql && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
@ -86,6 +62,34 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,21 +9,21 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with MySQL database support" \ org.opencontainers.image.description="Zabbix server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -36,31 +35,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sq
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ fping \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
microdnf -y module enable mysql && \
INSTALL_PKGS="fping \
tini \ tini \
file-libs \ file-libs \
tzdata \ tzdata \
@ -78,6 +54,7 @@ RUN set -eux && \
pcre \ pcre \
zlib \ zlib \
unixODBC" && \ unixODBC" && \
microdnf -y module enable mysql && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol8_baseos_latest" \ --enablerepo="ol8_baseos_latest" \
@ -85,7 +62,36 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,36 +11,37 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL name="zabbix/zabbix-server-mysql-trunk" \ LABEL description="Zabbix server with MySQL database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-server-mysql-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-server --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-server-mysql-trunk:${ZBX_VERSION}" \
summary="Zabbix server (MySQL)" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix server (MySQL)" \
description="Zabbix server with MySQL database support" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-server --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-server-mysql-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix server with MySQL database support" \ io.k8s.description="Zabbix server with MySQL database support" \
io.k8s.display-name="Zabbix server (MySQL)" \ io.k8s.display-name="Zabbix server (MySQL)" \
io.openshift.expose-services="10051:10051" \ io.openshift.expose-services="10051:10051" \
io.openshift.tags="zabbix,zabbix-server,mysql" \ io.openshift.tags="zabbix,zabbix-server,mysql" \
org.label-schema.name="zabbix-server-mysql-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix server with MySQL database support" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix server with MySQL database support" \
org.label-schema.docker.cmd="docker run --name zabbix-server --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-server-mysql-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-server-mysql-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-server --link mysql-server:mysql-server -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-server-mysql-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -51,7 +52,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_server.conf", "/etc/zabbix/zabbix_server.conf"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tini \ tini \
fping \ fping \
shadow-utils \ shadow-utils \
@ -83,10 +85,15 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -95,6 +102,7 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \ mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \ mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/modules && \
@ -105,10 +113,10 @@ RUN set -eux && INSTALL_PKGS="bash \
mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \ mkdir -p /usr/share/doc/zabbix-server-mysql && \
microdnf -y clean all && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,21 +9,21 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with MySQL database support" \ org.opencontainers.image.description="Zabbix server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -36,31 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sq
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \ tini \
tzdata \ tzdata \
ca-certificates \ ca-certificates \
@ -78,7 +53,39 @@ RUN set -eux && \
libxml2 \ libxml2 \
mysql-client \ mysql-client \
snmp-mibs-downloader \ snmp-mibs-downloader \
unixodbc && \ unixodbc" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-mysql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,20 +9,21 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -35,35 +35,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_serv
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
adduser zabbix dialout && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
apk add --clean-protected --no-cache \
tini \ tini \
bash \
fping \ fping \
tzdata \ tzdata \
iputils \ iputils \
@ -77,7 +50,41 @@ RUN set -eux && \
pcre \ pcre \
postgresql-client \ postgresql-client \
postgresql-libs \ postgresql-libs \
unixodbc && \ unixodbc" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
adduser zabbix dialout && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,28 +2,28 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -35,29 +35,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_serv
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="fping \ INSTALL_PKGS="fping \
file-libs \ file-libs \
@ -85,6 +62,34 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,9 +9,10 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
@ -36,29 +36,6 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
INSTALL_PKGS="fping \ INSTALL_PKGS="fping \
file-libs \ file-libs \
tini \ tini \
@ -84,7 +61,36 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,21 +9,21 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -37,31 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
tini \ tini \
tzdata \ tzdata \
ca-certificates \ ca-certificates \
@ -79,7 +54,39 @@ RUN set -eux && \
libxml2 \ libxml2 \
postgresql-client \ postgresql-client \
snmp-mibs-downloader \ snmp-mibs-downloader \
unixodbc && \ unixodbc" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root,dialout \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /usr/lib/zabbix/alertscripts && \
mkdir -p /var/lib/zabbix/enc && \
mkdir -p /var/lib/zabbix/export && \
mkdir -p /usr/lib/zabbix/externalscripts && \
mkdir -p /var/lib/zabbix/mibs && \
mkdir -p /var/lib/zabbix/modules && \
mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/ssh_keys && \
mkdir -p /var/lib/zabbix/ssl && \
mkdir -p /var/lib/zabbix/ssl/certs && \
mkdir -p /var/lib/zabbix/ssl/keys && \
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -4,24 +4,36 @@ ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-alpine" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix SNMP traps receiver" \ org.opencontainers.image.description="Zabbix SNMP traps receiver" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.title="zabbix-snmptraps" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \ tzdata \
net-snmp" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -30,15 +42,10 @@ RUN set -eux && \
--home /var/lib/zabbix/ \ --home /var/lib/zabbix/ \
zabbix && \ zabbix && \
adduser zabbix root && \ adduser zabbix root && \
apk update && \
apk add --clean-protected --no-cache \
bash \
tzdata \
net-snmp && \
touch /var/lib/net-snmp/snmptrapd.conf && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \
touch /var/lib/net-snmp/snmptrapd.conf && \
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ 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/ && \ 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/ && \ chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \

View File

@ -4,30 +4,23 @@ ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-centos" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix SNMP traps receiver" \ org.opencontainers.image.description="Zabbix SNMP traps receiver" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.title="zabbix-snmptraps" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
REPOLIST="baseos,appstream" && \ REPOLIST="baseos,appstream" && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tzdata \ tzdata \
@ -39,6 +32,19 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \

View File

@ -4,30 +4,23 @@ ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-ol" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix SNMP traps receiver" \ org.opencontainers.image.description="Zabbix SNMP traps receiver" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.title="zabbix-snmptraps" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
INSTALL_PKGS="bash \ INSTALL_PKGS="bash \
tzdata \ tzdata \
net-snmp" && \ net-snmp" && \
@ -37,7 +30,21 @@ RUN set -eux && \
--enablerepo="ol8_appstream" \ --enablerepo="ol8_appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \

View File

@ -1,5 +1,4 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal FROM registry.access.redhat.com/ubi8/ubi-minimal
MAINTAINER Alexey Pustovalov <alexey.pustovalov@zabbix.com>
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE= ARG RELEASE=
@ -7,35 +6,36 @@ ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL name="zabbix/zabbix-snmptraps-trunk" \ LABEL description="Zabbix SNMP traps receiver" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-snmptraps-trunk" \
release="${RELEASE}" \
run="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:1162/udp -d registry.connect.redhat.com/zabbix/zabbix-snmptraps-trunk:${ZBX_VERSION}" \
summary="Zabbix SNMP traps receiver" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix SNMP traps receiver" \
description="Zabbix SNMP traps receiver" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:1162/udp -d registry.connect.redhat.com/zabbix/zabbix-snmptraps-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix SNMP traps receiver" \ io.k8s.description="Zabbix SNMP traps receiver" \
io.k8s.display-name="Zabbix SNMP traps receiver" \ io.k8s.display-name="Zabbix SNMP traps receiver" \
io.openshift.expose-services="162:1162" \ io.openshift.expose-services="162:1162" \
io.openshift.tags="zabbix,zabbix-snmp,snmp-traps" \ io.openshift.tags="zabbix,zabbix-snmp,snmp-traps" \
org.label-schema.name="zabbix-snmptraps-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix SNMP traps receiver" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix SNMP traps receiver" \
org.label-schema.docker.cmd="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:1162/udp -d registry.connect.redhat.com/zabbix/zabbix-snmptraps-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-snmptraps-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:1162/udp -d registry.connect.redhat.com/zabbix/zabbix-snmptraps-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -48,16 +48,21 @@ RUN set -eux && \
net-snmp" && \ net-snmp" && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="rhel-8-for-x86_64-baseos-rpms" \ --enablerepo "ubi-8-baseos" \
--enablerepo="rhel-8-for-x86_64-appstream-rpms" \ --enablerepo "ubi-8-appstream" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \

View File

@ -4,38 +4,45 @@ ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-ubuntu" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix SNMP traps receiver" \ org.opencontainers.image.description="Zabbix SNMP traps receiver" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.title="zabbix-snmptraps" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}" org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
tzdata \
snmp-mibs-downloader \
snmptrapd" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
zabbix && \ zabbix && \
apt-get -y update && \
INSTALL_PKGS="tzdata \
snmp-mibs-downloader \
snmptrapd" && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
download-mibs && \ download-mibs && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
apk add --clean-protected --no-cache \
apache2 \ apache2 \
bash \
curl \ curl \
mariadb-client \ mariadb-client \
mariadb-connector-c \ mariadb-connector-c \
@ -63,8 +50,33 @@ RUN set -eux && \
php7-fileinfo \ php7-fileinfo \
php7-xmlreader \ php7-xmlreader \
php7-xmlwriter \ php7-xmlwriter \
php7-openssl && \ php7-openssl" && \
apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
apk add \
--clean-protected \
--no-cache \
--no-scripts \
apache2-ssl && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/apache2/conf.d/default.conf" && \ rm -f "/etc/apache2/conf.d/default.conf" && \
rm -f "/etc/apache2/conf.d/ssl.conf" && \ rm -f "/etc/apache2/conf.d/ssl.conf" && \
sed -ri \ sed -ri \

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
dnf -y module enable mysql && \
dnf -y module enable php:7.4 && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="curl \ INSTALL_PKGS="bash \
curl \
httpd \ httpd \
mysql \ mysql \
mod_ssl \ mod_ssl \
@ -61,6 +49,8 @@ RUN set -eux && \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y module enable mysql && \
dnf -y module enable php:7.4 && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "${REPOLIST}" \
@ -68,6 +58,22 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/httpd/conf.d/default.conf" && \ rm -f "/etc/httpd/conf.d/default.conf" && \
rm -f "/etc/httpd/conf.d/ssl.conf" && \ rm -f "/etc/httpd/conf.d/ssl.conf" && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
@ -87,18 +93,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
dnf -y remove \ dnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,20 +31,8 @@ COPY ["conf/etc/", "/etc/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ curl \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
microdnf -y module enable mysql && \
microdnf -y module enable php:7.4 && \
INSTALL_PKGS="curl \
httpd \ httpd \
mysql \ mysql \
mod_ssl \ mod_ssl \
@ -60,6 +48,8 @@ RUN set -eux && \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
microdnf -y module enable mysql && \
microdnf -y module enable php:7.4 && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol8_baseos_latest" \ --enablerepo="ol8_baseos_latest" \
@ -67,7 +57,24 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/httpd/conf.d/default.conf" && \ rm -f "/etc/httpd/conf.d/default.conf" && \
rm -f "/etc/httpd/conf.d/ssl.conf" && \ rm -f "/etc/httpd/conf.d/ssl.conf" && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
@ -87,18 +94,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
microdnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,18 +31,7 @@ COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
apache2 \ apache2 \
curl \ curl \
libapache2-mod-php \ libapache2-mod-php \
@ -55,7 +44,27 @@ RUN set -eux && \
php7.4-ldap \ php7.4-ldap \
php7.4-mbstring \ php7.4-mbstring \
php7.4-mysql \ php7.4-mysql \
php7.4-xml && \ php7.4-xml" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f /etc/apache2/sites-available/* && \ rm -f /etc/apache2/sites-available/* && \
rm -f /etc/apache2/sites-enabled/* && \ rm -f /etc/apache2/sites-enabled/* && \
/usr/sbin/a2enmod ssl && \ /usr/sbin/a2enmod ssl && \
@ -85,15 +94,12 @@ RUN set -eux && \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
dpkg-reconfigure locales && \ dpkg-reconfigure locales && \
chown --quiet -R zabbix:root /etc/zabbix/ /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/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/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.4/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \
chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \
chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \ chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
apk add --clean-protected --no-cache \
apache2 \ apache2 \
bash \
curl \ curl \
php7-apache2 \ php7-apache2 \
php7-bcmath \ php7-bcmath \
@ -62,8 +49,33 @@ RUN set -eux && \
php7-xmlreader \ php7-xmlreader \
php7-xmlwriter \ php7-xmlwriter \
php7-openssl \ php7-openssl \
postgresql-client && \ postgresql-client" && \
apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
apk add \
--clean-protected \
--no-cache \
--no-scripts \
apache2-ssl && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/apache2/conf.d/default.conf" && \ rm -f "/etc/apache2/conf.d/default.conf" && \
rm -f "/etc/apache2/conf.d/ssl.conf" && \ rm -f "/etc/apache2/conf.d/ssl.conf" && \
sed -ri \ sed -ri \

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,20 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
dnf -y module enable php:7.4 && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="curl \ INSTALL_PKGS="bash \
curl \
httpd \ httpd \
mod_ssl \ mod_ssl \
php \ php \
@ -60,6 +49,7 @@ RUN set -eux && \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y module enable php:7.4 && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "${REPOLIST}" \
@ -67,6 +57,22 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/httpd/conf.d/default.conf" && \ rm -f "/etc/httpd/conf.d/default.conf" && \
rm -f "/etc/httpd/conf.d/ssl.conf" && \ rm -f "/etc/httpd/conf.d/ssl.conf" && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
@ -86,18 +92,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
dnf -y remove \ dnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,19 +31,8 @@ COPY ["conf/etc/", "/etc/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ curl \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
microdnf -y module enable php:7.4 && \
INSTALL_PKGS="curl \
httpd \ httpd \
mod_ssl \ mod_ssl \
php \ php \
@ -59,6 +48,7 @@ RUN set -eux && \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
microdnf -y module enable php:7.4 && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol8_baseos_latest" \ --enablerepo="ol8_baseos_latest" \
@ -66,7 +56,24 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f "/etc/httpd/conf.d/default.conf" && \ rm -f "/etc/httpd/conf.d/default.conf" && \
rm -f "/etc/httpd/conf.d/ssl.conf" && \ rm -f "/etc/httpd/conf.d/ssl.conf" && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
@ -86,18 +93,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/httpd/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \ chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \ chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \ chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
microdnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,18 +31,7 @@ COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
apache2 \ apache2 \
curl \ curl \
libapache2-mod-php \ libapache2-mod-php \
@ -55,7 +44,27 @@ RUN set -eux && \
php7.4-mbstring \ php7.4-mbstring \
php7.4-xml \ php7.4-xml \
php7.4-pgsql \ php7.4-pgsql \
postgresql-client && \ postgresql-client" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
rm -f /etc/apache2/sites-available/* && \ rm -f /etc/apache2/sites-available/* && \
rm -f /etc/apache2/sites-enabled/* && \ rm -f /etc/apache2/sites-enabled/* && \
/usr/sbin/a2enmod ssl && \ /usr/sbin/a2enmod ssl && \
@ -85,17 +94,12 @@ RUN set -eux && \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
dpkg-reconfigure locales && \ dpkg-reconfigure locales && \
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \ chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \
chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \
chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /etc/apache2/ /etc/php/7.4/ && \
chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \ chmod -R g=u /etc/apache2/ /etc/php/7.4/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /var/lib/php/session && \
apk add --clean-protected --no-cache \
bash \
curl \ curl \
mariadb-client \ mariadb-client \
mariadb-connector-c \ mariadb-connector-c \
@ -65,7 +51,34 @@ RUN set -eux && \
php7-xmlreader \ php7-xmlreader \
php7-xmlwriter \ php7-xmlwriter \
php7-openssl \ php7-openssl \
supervisor && \ supervisor" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
apk add \
--clean-protected \
--no-cache \
--no-scripts \
apache2-ssl && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
mkdir -p /var/lib/php/session && \
rm -rf /etc/php7/php-fpm.d/www.conf && \ rm -rf /etc/php7/php-fpm.d/www.conf && \
rm -f /etc/nginx/http.d/*.conf && \ rm -f /etc/nginx/http.d/*.conf && \
ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \ ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,22 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--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 /var/lib/php/session && \
dnf -y module enable mysql && \
dnf -y module enable php:7.4 nginx:1.18 && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="curl \ INSTALL_PKGS="bash \
curl \
mysql \ mysql \
nginx \ nginx \
php-bcmath \ php-bcmath \
@ -60,6 +47,8 @@ RUN set -eux && \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
dnf -y module enable mysql && \
dnf -y module enable php:7.4 nginx:1.18 && \
dnf -y install \ dnf -y install \
--disablerepo "*" \ --disablerepo "*" \
--enablerepo "${REPOLIST}" \ --enablerepo "${REPOLIST}" \
@ -67,6 +56,23 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--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 /var/lib/php/session && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
@ -80,18 +86,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
dnf -y remove \ dnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,21 +31,8 @@ COPY ["conf/etc/", "/etc/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ curl \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--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 /var/lib/php/session && \
microdnf -y module enable mysql && \
microdnf -y module enable php:7.4 && \
INSTALL_PKGS="curl \
mysql \ mysql \
nginx \ nginx \
php-bcmath \ php-bcmath \
@ -59,6 +46,8 @@ RUN set -eux && \
findutils \ findutils \
glibc-locale-source \ glibc-locale-source \
supervisor" && \ supervisor" && \
microdnf -y module enable mysql && \
microdnf -y module enable php:7.4 && \
microdnf -y install \ microdnf -y install \
--disablerepo="*" \ --disablerepo="*" \
--enablerepo="ol8_baseos_latest" \ --enablerepo="ol8_baseos_latest" \
@ -66,7 +55,25 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--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 /var/lib/php/session && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
@ -80,18 +87,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
microdnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL name="zabbix/zabbix-web-mysql" \ LABEL description="Zabbix web-interface based on Nginx web server with MySQL database support" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
name="zabbix/zabbix-web-mysql" \
release="${RELEASE}" \
run="docker run --name zabbix-web-nginx --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d registry.connect.redhat.com/zabbix/zabbix-web-nginx-trunk:${ZBX_VERSION}" \
summary="Zabbix web-interface based on Nginx web server with MySQL database support" \
url="https://www.zabbix.com/" \
vendor="Zabbix LLC" \ vendor="Zabbix LLC" \
version="${MAJOR_VERSION}" \ version="${MAJOR_VERSION}" \
release="${RELEASE}" \
summary="Zabbix web-interface based on Nginx web server with MySQL database support" \
description="Zabbix web-interface based on Nginx web server with MySQL database support" \
url="https://www.zabbix.com/" \
run="docker run --name zabbix-web-nginx --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d registry.connect.redhat.com/zabbix/zabbix-web-nginx-trunk:${ZBX_VERSION}" \
io.k8s.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ io.k8s.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
io.k8s.display-name="Zabbix Frontend (Nginx)" \ io.k8s.display-name="Zabbix Frontend (Nginx)" \
io.openshift.expose-services="8080:http,8443:https" \ io.openshift.expose-services="8080:http,8443:https" \
io.openshift.tags="zabbix,zabbix-web,mysql,nginx" \ io.openshift.tags="zabbix,zabbix-web,mysql,nginx" \
org.label-schema.name="zabbix-web-mysql-rhel" \
org.label-schema.vendor="Zabbix LLC" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \ org.label-schema.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.label-schema.docker.cmd="docker run --name zabbix-web-nginx --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d registry.connect.redhat.com/zabbix/zabbix-web-nginx-trunk:${ZBX_VERSION}" \
org.label-schema.license="GPL v2.0" \ org.label-schema.license="GPL v2.0" \
org.label-schema.name="zabbix-web-mysql-rhel" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://zabbix.com/" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="${ZBX_VERSION}" \ org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${ZBX_SOURCES}" \ org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-web-nginx --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d registry.connect.redhat.com/zabbix/zabbix-web-nginx-trunk:${ZBX_VERSION}" org.label-schema.vendor="Zabbix LLC" \
org.label-schema.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -47,7 +48,8 @@ COPY ["licenses", "/licenses"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
RUN set -eux && INSTALL_PKGS="bash \ RUN set -eux && \
INSTALL_PKGS="bash \
tzdata \ tzdata \
curl \ curl \
supervisor \ supervisor \
@ -80,10 +82,15 @@ RUN set -eux && INSTALL_PKGS="bash \
--best \ --best \
--setopt=tsflags=nodocs \ --setopt=tsflags=nodocs \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd --system --gid 1995 zabbix && \ groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -105,18 +112,15 @@ RUN set -eux && INSTALL_PKGS="bash \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
microdnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,23 +31,28 @@ COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ ca-certificates \
--system --comment "Zabbix monitoring system" \ curl \
-g zabbix -G root \ mysql-client \
--uid 1997 \ nginx \
--shell /sbin/nologin \ locales \
--home-dir /var/lib/zabbix/ \ php7.4-bcmath \
zabbix && \ php7.4-fpm \
mkdir -p /etc/zabbix && \ php7.4-gd \
mkdir -p /etc/zabbix/web && \ php7.4-json \
mkdir -p /var/lib/php/session && \ php7.4-ldap \
apt-get -y update && \ php7.4-mbstring \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ php7.4-mysql \
gpg \ php7.4-xml \
supervisor" && \
INSTALL_TEMP_PKGS="gpg \
dirmngr \ dirmngr \
gpg-agent \ gpg-agent" && \
ca-certificates && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_TEMP_PKGS} && \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \ found=''; \
for server in \ for server in \
@ -63,27 +68,33 @@ RUN set -eux && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends \ DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install \ -o Dpkg::Options::="--force-confdef" \
curl \ -o Dpkg::Options::="--force-confold" \
mysql-client \ --no-install-recommends install \
nginx \ ${INSTALL_PKGS} && \
locales \ groupadd \
php7.4-bcmath \ --system \
php7.4-fpm \ --gid 1995 \
php7.4-gd \ zabbix && \
php7.4-json \ useradd \
php7.4-ldap \ --system \
php7.4-mbstring \ --comment "Zabbix monitoring system" \
php7.4-mysql \ -g zabbix \
php7.4-xml \ -G root \
supervisor && \ --uid 1997 \
--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 /var/lib/php/session && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -rf /var/cache/nginx/ && \ rm -rf /var/cache/nginx/ && \
rm -f /etc/php/7.4/fpm/pool.d/www.conf && \ rm -f /etc/php/7.4/fpm/pool.d/www.conf && \
ln -sf /dev/fd/2 /var/log/nginx/error.log && \ ln -sf /dev/fd/2 /var/log/nginx/error.log && \
rm -f /etc/php/7.4/fpm/php-fpm.conf.dpkg-dist && \ rm -f /etc/php/7.4/fpm/php-fpm.conf.dpkg-dist && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge gpg dirmngr gpg-agent && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
rm -rf tests && \ rm -rf tests && \
@ -98,8 +109,6 @@ RUN set -eux && \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \
dpkg-reconfigure locales && \ 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/include/defines.inc.php /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/ && \ 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/ && \ chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \
@ -109,6 +118,9 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
${INSTALL_TEMP_PKGS} && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /var/lib/php/session && \
apk add --clean-protected --no-cache \
bash \
curl \ curl \
nginx \ nginx \
php7-bcmath \ php7-bcmath \
@ -64,7 +50,34 @@ RUN set -eux && \
php7-xmlwriter \ php7-xmlwriter \
php7-openssl \ php7-openssl \
postgresql-client \ postgresql-client \
supervisor && \ supervisor" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
apk add \
--clean-protected \
--no-cache \
--no-scripts \
apache2-ssl && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
--ingroup zabbix \
--shell /sbin/nologin \
--home /var/lib/zabbix/ \
zabbix && \
adduser zabbix root && \
mkdir -p /etc/zabbix && \
mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \
mkdir -p /var/lib/php/session && \
rm -rf /etc/php7/php-fpm.d/www.conf && \ rm -rf /etc/php7/php-fpm.d/www.conf && \
rm -f /etc/nginx/http.d/*.conf && \ rm -f /etc/nginx/http.d/*.conf && \
ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \ ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \

View File

@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,10 +30,40 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
COPY ["conf/etc/", "/etc/"] COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
curl \
findutils \
glibc-locale-source \
nginx \
php-bcmath \
php-fpm \
php-gd \
php-json \
php-ldap \
php-mbstring \
php-pgsql \
php-xml
postgresql \
supervisor" && \
dnf -y install epel-release && \
dnf -y module enable php:7.4 nginx:1.18 && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -42,30 +72,6 @@ RUN set -eux && \
mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \ mkdir -p /etc/zabbix/web/certs && \
mkdir -p /var/lib/php/session && \ mkdir -p /var/lib/php/session && \
dnf -y module enable php:7.4 nginx:1.18 && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="supervisor \
curl \
nginx \
postgresql \
php-bcmath \
php-fpm \
php-gd \
php-ldap \
php-mbstring \
php-pgsql \
php-json \
findutils \
glibc-locale-source \
php-xml" && \
dnf -y install epel-release && \
dnf -y install \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
@ -79,18 +85,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
dnf -y remove \ dnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,10 +31,40 @@ COPY ["conf/etc/", "/etc/"]
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
curl \
findutils \
glibc-locale-source \
nginx \
php-bcmath \
php-fpm \
php-gd \
php-json \
php-ldap \
php-mbstring \
php-pgsql \
php-xml
postgresql \
supervisor" && \
microdnf -y module enable php:7.4 && \
microdnf -y install \
--disablerepo="*" \
--enablerepo="ol8_baseos_latest" \
--enablerepo="ol8_appstream" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \
--best \
--nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \ useradd \
--system --comment "Zabbix monitoring system" \ --system \
-g zabbix -G root \ --comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \ --uid 1997 \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
@ -43,29 +73,6 @@ RUN set -eux && \
mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web && \
mkdir -p /etc/zabbix/web/certs && \ mkdir -p /etc/zabbix/web/certs && \
mkdir -p /var/lib/php/session && \ mkdir -p /var/lib/php/session && \
microdnf -y module enable php:7.4 && \
INSTALL_PKGS="supervisor \
curl \
nginx \
postgresql \
php-bcmath \
php-fpm \
php-gd \
php-ldap \
php-mbstring \
php-pgsql \
php-json \
findutils \
glibc-locale-source \
php-xml" && \
microdnf -y install \
--disablerepo="*" \
--enablerepo="ol8_baseos_latest" \
--enablerepo="ol8_appstream" \
--enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \
--best \
--nodocs ${INSTALL_PKGS} && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -f /etc/php-fpm.d/www.conf && \ rm -f /etc/php-fpm.d/www.conf && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
@ -79,18 +86,15 @@ RUN set -eux && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \ cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ 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/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/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/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 && \ 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 && \ 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 && \ chmod -R g=u /etc/nginx/ /etc/php-fpm.d/ /etc/php-fpm.conf && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
chgrp -R 0 /usr/share/zabbix/include/defines.inc.php && \
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
microdnf -y remove \ microdnf -y remove \
findutils \ findutils \
glibc-locale-source && \ glibc-locale-source && \

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,19 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \ org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -31,23 +31,28 @@ COPY ["conf/etc/", "/etc/"]
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ ca-certificates \
--system --comment "Zabbix monitoring system" \ curl \
-g zabbix -G root \ nginx \
--uid 1997 \ locales \
--shell /sbin/nologin \ php7.4-bcmath \
--home-dir /var/lib/zabbix/ \ php7.4-fpm \
zabbix && \ php7.4-gd \
mkdir -p /etc/zabbix && \ php7.4-json \
mkdir -p /etc/zabbix/web && \ php7.4-ldap \
mkdir -p /var/lib/php/session && \ php7.4-mbstring \
apt-get -y update && \ php7.4-xml \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ php7.4-pgsql \
gpg \ postgresql-client \
supervisor" && \
INSTALL_TEMP_PKGS="gpg \
dirmngr \ dirmngr \
gpg-agent \ gpg-agent" && \
ca-certificates && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_TEMP_PKGS} && \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \ found=''; \
for server in \ for server in \
@ -63,27 +68,33 @@ RUN set -eux && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \ echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends \ DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install \ -o Dpkg::Options::="--force-confdef" \
curl \ -o Dpkg::Options::="--force-confold" \
nginx \ --no-install-recommends install \
locales \ ${INSTALL_PKGS} && \
php7.4-bcmath \ groupadd \
php7.4-fpm \ --system \
php7.4-gd \ --gid 1995 \
php7.4-json \ zabbix && \
php7.4-ldap \ useradd \
php7.4-mbstring \ --system \
php7.4-xml \ --comment "Zabbix monitoring system" \
php7.4-pgsql \ -g zabbix \
postgresql-client \ -G root \
supervisor && \ --uid 1997 \
--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 /var/lib/php/session && \
rm -f /etc/nginx/conf.d/*.conf && \ rm -f /etc/nginx/conf.d/*.conf && \
rm -rf /var/cache/nginx/ && \ rm -rf /var/cache/nginx/ && \
rm -f /etc/php/7.4/fpm/pool.d/www.conf && \ rm -f /etc/php/7.4/fpm/pool.d/www.conf && \
ln -sf /dev/fd/2 /var/log/nginx/error.log && \ ln -sf /dev/fd/2 /var/log/nginx/error.log && \
rm -f /etc/php/7.4/fpm/php-fpm.conf.dpkg-dist && \ rm -f /etc/php/7.4/fpm/php-fpm.conf.dpkg-dist && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge gpg dirmngr gpg-agent && \
cd /usr/share/zabbix/ && \ cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
rm -rf tests && \ rm -rf tests && \
@ -107,6 +118,9 @@ RUN set -eux && \
chown --quiet -R zabbix:root /var/lib/php/session/ && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \
chgrp -R 0 /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \
chmod -R g=u /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
${INSTALL_TEMP_PKGS} && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,17 +9,20 @@ FROM alpine:3.14
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix web service" \ ENV TERM=xterm \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \ org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web service" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -28,8 +30,18 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service",
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"]
RUN set -eux && \ RUN set -eux && \
addgroup --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
adduser --system \ chromium" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \ --gecos "Zabbix monitoring system" \
--disabled-password \ --disabled-password \
--uid 1997 \ --uid 1997 \
@ -40,9 +52,6 @@ RUN set -eux && \
adduser zabbix root && \ adduser zabbix root && \
mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
apk add --no-cache --clean-protected \
bash \
chromium && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,25 +2,27 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
FROM centos:8 FROM centos:centos8
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix web service" \ ENV TERM=xterm \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \ org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web service" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -28,19 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service",
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
REPOLIST="baseos,appstream,epel" && \ REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="chromium \ INSTALL_PKGS="bash \
chromium \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
dnf -y install epel-release && \ dnf -y install epel-release && \
@ -51,6 +43,22 @@ RUN set -eux && \
--setopt=install_weak_deps=False \ --setopt=install_weak_deps=False \
--best \ --best \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,17 +9,20 @@ FROM oraclelinux:8-slim
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix web service" \ ENV TERM=xterm \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \ org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web service" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -29,18 +31,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"] COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
RUN set -eux && \ RUN set -eux && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \ chromium \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
INSTALL_PKGS="chromium \
openssl-libs \ openssl-libs \
zlib" && \ zlib" && \
microdnf -y install \ microdnf -y install \
@ -50,7 +42,24 @@ RUN set -eux && \
--enablerepo="ol8_developer_EPEL" \ --enablerepo="ol8_developer_EPEL" \
--setopt=install_weak_deps=0 \ --setopt=install_weak_deps=0 \
--best \ --best \
--nodocs ${INSTALL_PKGS} && \ --nodocs \
${INSTALL_PKGS} && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG RELEASE=
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:rhel-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -11,9 +11,10 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG RELEASE ARG RELEASE
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
LABEL name="zabbix/zabbix-web-service-trunk" \ LABEL name="zabbix/zabbix-web-service-trunk" \
maintainer="alexey.pustovalov@zabbix.com" \ maintainer="alexey.pustovalov@zabbix.com" \
@ -78,6 +79,9 @@ RUN set -eux && \
mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/enc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
microdnf -y clean all && \ microdnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -1,13 +0,0 @@
#!/bin/bash
#
# Additional information: https://docs.docker.com/docker-cloud/builds/advanced/
#
MAJOR_VERSION=$(cat Dockerfile | grep "ARG MAJOR_VERSION" | cut -f2 -d"=")
MINOR_VERSION=$(cat Dockerfile | grep "ARG ZBX_VERSION" | cut -f2 -d".")
VCS_REF=$MAJOR_VERSION.$MINOR_VERSION
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$BUILD_DATE - Building $VCS_REF version..."
docker build --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE="$BUILD_DATE" -t $IMAGE_NAME .

View File

@ -2,7 +2,6 @@
ARG MAJOR_VERSION=6.0 ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION} ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ubuntu-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
FROM ${BUILD_BASE_IMAGE} as builder FROM ${BUILD_BASE_IMAGE} as builder
@ -10,17 +9,20 @@ FROM ubuntu:focal
ARG MAJOR_VERSION ARG MAJOR_VERSION
ARG ZBX_VERSION ARG ZBX_VERSION
ARG ZBX_SOURCES ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
LABEL org.opencontainers.image.title="Zabbix web service" \ ENV TERM=xterm \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \ org.opencontainers.image.description="Zabbix web service for performing various tasks using headless web browser" \
org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \ org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.opencontainers.image.version="${ZBX_VERSION}" \ org.opencontainers.image.licenses="GPL v2.0" \
org.opencontainers.image.source="${ZBX_SOURCES}" org.opencontainers.image.source="${ZBX_SOURCES}" \
org.opencontainers.image.title="Zabbix web service" \
org.opencontainers.image.url="https://zabbix.com/" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.version="${ZBX_VERSION}"
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
@ -30,21 +32,15 @@ COPY ["conf/etc/apt/preferences.d/chromium.pref", "/etc/apt/preferences.d/chromi
RUN set -eux && \ RUN set -eux && \
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
groupadd --system --gid 1995 zabbix && \ INSTALL_PKGS="bash \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
ca-certificates \ ca-certificates \
gnupg && \ chromium \
chromium-sandbox" && \
INSTALL_TEMP_PKGS="gnupg" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_TEMP_PKGS} && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517 && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
@ -53,14 +49,31 @@ RUN set -eux && \
echo "deb http://deb.debian.org/debian buster-updates main" >> /etc/apt/sources.list.d/debian.list && \ echo "deb http://deb.debian.org/debian buster-updates main" >> /etc/apt/sources.list.d/debian.list && \
echo "deb http://deb.debian.org/debian-security buster/updates main" >> /etc/apt/sources.list.d/debian.list && \ echo "deb http://deb.debian.org/debian-security buster/updates main" >> /etc/apt/sources.list.d/debian.list && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ DEBIAN_FRONTEND=noninteractive apt-get -y \
chromium \ --no-install-recommends install \
chromium-sandbox && \ ${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \ groupadd \
gnupg && \ --system \
--gid 1995 \
zabbix && \
useradd \
--system \
--comment "Zabbix monitoring system" \
-g zabbix \
-G root \
--uid 1997 \
--shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \
zabbix && \
mkdir -p /etc/zabbix && \
mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/enc && \
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \ chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
${INSTALL_TEMP_PKGS} && \
apt-get -y autoremove && \ apt-get -y autoremove && \
apt-get -y clean && \ apt-get -y clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

Some files were not shown because too many files have changed in this diff Show More