diff --git a/.github/workflows/dockerhub_description.yml b/.github/workflows/dockerhub_description.yml index d5b61bbe0..3959d0d6d 100644 --- a/.github/workflows/dockerhub_description.yml +++ b/.github/workflows/dockerhub_description.yml @@ -5,7 +5,8 @@ on: branches: - 'trunk' paths: - - "Dockerfiles/*/*/README.md" + - 'Dockerfiles/*/*/README.md' + - '.github/workflows/dockerhub_description.yml' workflow_dispatch: jobs: @@ -18,6 +19,10 @@ jobs: fail-fast: false matrix: build: + - build-base + - build-mysql + - build-pgsql + - build-sqlite3 - agent - agent2 - java-gateway diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index 17b1b5d66..e4427e652 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -32,8 +32,24 @@ 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"] RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="tini \ + bash \ + tzdata \ + coreutils \ + iputils \ + pcre \ + libcurl \ + libldap" && \ + apk add \ + --no-cache \ + --clean-protected \ + ${INSTALL_PKGS} && \ + addgroup \ + --system \ + --gid 1995 \ + zabbix && \ + adduser \ + --system \ --gecos "Zabbix monitoring system" \ --disabled-password \ --uid 1997 \ @@ -47,15 +63,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ - apk add --no-cache --clean-protected \ - tini \ - bash \ - tzdata \ - coreutils \ - iputils \ - pcre \ - libcurl \ - libldap && \ 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/ && \ diff --git a/Dockerfiles/agent/alpine/hooks/build b/Dockerfiles/agent/alpine/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent/alpine/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent/centos/Dockerfile b/Dockerfiles/agent/centos/Dockerfile index 0558c28f9..6ce8dddb7 100644 --- a/Dockerfiles/agent/centos/Dockerfile +++ b/Dockerfiles/agent/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -32,7 +32,27 @@ 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"] RUN set -eux && \ - groupadd --system --gid 1995 zabbix && \ + REPOLIST="baseos,appstream,epel" && \ + INSTALL_PKGS="bash \ + tini \ + tzdata \ + iputils \ + pcre \ + libcurl-minimal \ + openssl-libs \ + zlib" && \ + dnf -y install epel-release && \ + dnf -y install \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ + ${INSTALL_PKGS} && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ --system --comment "Zabbix monitoring system" \ -g zabbix -G root \ @@ -45,23 +65,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ 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 \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ - ${INSTALL_PKGS} && \ 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/ && \ diff --git a/Dockerfiles/agent/centos/hooks/build b/Dockerfiles/agent/centos/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent/centos/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent/ol/Dockerfile b/Dockerfiles/agent/ol/Dockerfile index 48d92fc60..7960a7e20 100644 --- a/Dockerfiles/agent/ol/Dockerfile +++ b/Dockerfiles/agent/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -33,9 +33,30 @@ 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"] RUN set -eux && \ - groupadd --system --gid 1995 zabbix && \ + INSTALL_PKGS="bash \ + tini \ + tzdata \ + iputils \ + pcre \ + libcurl \ + openssl-libs \ + zlib" && \ + 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 \ - --system --comment "Zabbix monitoring system" \ + --system \ + --comment "Zabbix monitoring system" \ -g zabbix -G root \ --uid 1997 \ --shell /sbin/nologin \ @@ -46,22 +67,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ - INSTALL_PKGS="bash \ - tini \ - tzdata \ - iputils \ - pcre \ - libcurl \ - openssl-libs \ - zlib" && \ - 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/agent/ol/hooks/build b/Dockerfiles/agent/ol/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent/ol/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent/rhel/Dockerfile b/Dockerfiles/agent/rhel/Dockerfile index 57f8c8895..d9f21887b 100644 --- a/Dockerfiles/agent/rhel/Dockerfile +++ b/Dockerfiles/agent/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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-50" \ +LABEL description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-agent-50" \ + release="${RELEASE}" \ + run="docker run --name zabbix-agent --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent-50:${ZBX_VERSION}" \ + summary="Zabbix agent" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ 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.openshift.expose-services="10050:10050" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" 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}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"] -RUN set -eux && INSTALL_PKGS="bash \ +RUN set -eux && \ + INSTALL_PKGS="bash \ tini \ tzdata \ iputils \ @@ -60,16 +62,20 @@ RUN set -eux && INSTALL_PKGS="bash \ rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \ rm -rf /tmp/epel-release-latest-8.noarch.rpm && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ + --system \ + --comment "Zabbix monitoring system" \ -g zabbix -G root \ --uid 1997 \ --shell /sbin/nologin \ @@ -83,6 +89,7 @@ RUN set -eux && INSTALL_PKGS="bash \ 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 && \ 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 diff --git a/Dockerfiles/agent/rhel/hooks/build b/Dockerfiles/agent/rhel/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent/rhel/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent/ubuntu/Dockerfile b/Dockerfiles/agent/ubuntu/Dockerfile index 78cb26413..c6c52ad58 100644 --- a/Dockerfiles/agent/ubuntu/Dockerfile +++ b/Dockerfiles/agent/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -33,10 +33,26 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc RUN set -eux && \ 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 \ + 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -46,14 +62,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/enc && \ 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 \ - libldap-2.4 && \ 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/ && \ diff --git a/Dockerfiles/agent/ubuntu/hooks/build b/Dockerfiles/agent/ubuntu/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent/ubuntu/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent/windows/Dockerfile b/Dockerfiles/agent/windows/Dockerfile index 572c69eb9..6051cb933 100644 --- a/Dockerfiles/agent/windows/Dockerfile +++ b/Dockerfiles/agent/windows/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 FROM ${BUILD_BASE_IMAGE} as builder @@ -12,10 +12,6 @@ FROM $BASE_IMAGE ARG MAJOR_VERSION ARG ZBX_VERSION -ARG ZBX_SOURCES - -ARG MAJOR_VERSION=5.0 -ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git LABEL org.opencontainers.image.title="Zabbix agent" ` diff --git a/Dockerfiles/agent2/alpine/Dockerfile b/Dockerfiles/agent2/alpine/Dockerfile index a8d6f7ea8..c36967cda 100644 --- a/Dockerfiles/agent2/alpine/Dockerfile +++ b/Dockerfiles/agent2/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -32,8 +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"] RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="tini \ + tzdata \ + bash \ + pcre \ + coreutils \ + libcurl \ + iputils" && \ + apk add \ + --no-cache \ + --clean-protected \ + ${INSTALL_PKGS} && \ + addgroup \ + --system \ + --gid 1995 \ + zabbix && \ + adduser \ + --system \ --gecos "Zabbix monitoring system" \ --disabled-password \ --uid 1997 \ @@ -48,14 +63,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/buffer && \ - apk add --no-cache --clean-protected \ - tini \ - tzdata \ - bash \ - pcre \ - coreutils \ - libcurl \ - iputils && \ 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/ && \ @@ -65,8 +72,6 @@ EXPOSE 10050/TCP 31999/TCP WORKDIR /var/lib/zabbix -VOLUME ["/var/lib/zabbix/enc"] - COPY ["docker-entrypoint.sh", "/usr/bin/"] ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"] diff --git a/Dockerfiles/agent2/alpine/hooks/build b/Dockerfiles/agent2/alpine/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent2/alpine/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent2/centos/Dockerfile b/Dockerfiles/agent2/centos/Dockerfile index 417871e46..127fb264d 100644 --- a/Dockerfiles/agent2/centos/Dockerfile +++ b/Dockerfiles/agent2/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -32,20 +32,6 @@ 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"] 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 && \ - mkdir -p /var/lib/zabbix/buffer && \ REPOLIST="baseos,appstream,epel" && \ INSTALL_PKGS="bash \ tini \ @@ -62,6 +48,25 @@ RUN set -eux && \ --setopt=install_weak_deps=False \ --best \ ${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 && \ + mkdir -p /var/lib/zabbix/buffer && \ 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/ && \ @@ -73,8 +78,6 @@ EXPOSE 10050/TCP 31999/TCP WORKDIR /var/lib/zabbix -VOLUME ["/var/lib/zabbix/enc"] - COPY ["docker-entrypoint.sh", "/usr/bin/"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] diff --git a/Dockerfiles/agent2/centos/hooks/build b/Dockerfiles/agent2/centos/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent2/centos/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent2/ol/Dockerfile b/Dockerfiles/agent2/ol/Dockerfile index a9d75cee7..9877cac38 100644 --- a/Dockerfiles/agent2/ol/Dockerfile +++ b/Dockerfiles/agent2/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -33,10 +33,31 @@ 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"] RUN set -eux && \ - groupadd --system --gid 1995 zabbix && \ + INSTALL_PKGS="bash \ + tini \ + tzdata \ + iputils \ + pcre \ + libcurl \ + openssl-libs" && \ + 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -47,21 +68,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ mkdir -p /var/lib/zabbix/buffer && \ - INSTALL_PKGS="bash \ - tini \ - tzdata \ - iputils \ - pcre \ - libcurl \ - openssl-libs" && \ - 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ @@ -73,8 +79,6 @@ EXPOSE 10050/TCP 31999/TCP WORKDIR /var/lib/zabbix -VOLUME ["/var/lib/zabbix/enc"] - COPY ["docker-entrypoint.sh", "/usr/bin/"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] diff --git a/Dockerfiles/agent2/ol/hooks/build b/Dockerfiles/agent2/ol/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent2/ol/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent2/rhel/Dockerfile b/Dockerfiles/agent2/rhel/Dockerfile index e1f14fdaf..74843bafe 100644 --- a/Dockerfiles/agent2/rhel/Dockerfile +++ b/Dockerfiles/agent2/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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-50" \ +LABEL description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-agent2-50" \ + release="${RELEASE}" \ + run="docker run --name zabbix-agent2 --link zabbix-server:zabbix-server -p 10050:10050 -d registry.connect.redhat.com/zabbix/zabbix-agent2-50:${ZBX_VERSION}" \ + summary="Zabbix agent" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ 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.openshift.expose-services="10050:10050" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" 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/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"] -RUN set -eux && INSTALL_PKGS="bash \ +RUN set -eux && \ + INSTALL_PKGS="bash \ tini \ tzdata \ iputils \ @@ -60,17 +62,22 @@ RUN set -eux && INSTALL_PKGS="bash \ rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \ rm -rf /tmp/epel-release-latest-8.noarch.rpm && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --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/modules && \ mkdir -p /var/lib/zabbix/buffer && \ - microdnf -y clean all && \ 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 && \ 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 @@ -92,8 +99,6 @@ EXPOSE 10050/TCP 31999/TCP WORKDIR /var/lib/zabbix -VOLUME ["/var/lib/zabbix/enc"] - COPY ["docker-entrypoint.sh", "/usr/bin/"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"] diff --git a/Dockerfiles/agent2/rhel/hooks/build b/Dockerfiles/agent2/rhel/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent2/rhel/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent2/ubuntu/Dockerfile b/Dockerfiles/agent2/ubuntu/Dockerfile index 0b0a25c24..66d71b0b9 100644 --- a/Dockerfiles/agent2/ubuntu/Dockerfile +++ b/Dockerfiles/agent2/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -33,10 +33,25 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf" RUN set -eux && \ 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -47,14 +62,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/enc && \ mkdir -p /var/lib/zabbix/modules && \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/agent2/ubuntu/hooks/build b/Dockerfiles/agent2/ubuntu/hooks/build deleted file mode 100755 index 3e0a2f00c..000000000 --- a/Dockerfiles/agent2/ubuntu/hooks/build +++ /dev/null @@ -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 . diff --git a/Dockerfiles/agent2/windows/Dockerfile b/Dockerfiles/agent2/windows/Dockerfile index 7f78de8b7..1880f3a4c 100644 --- a/Dockerfiles/agent2/windows/Dockerfile +++ b/Dockerfiles/agent2/windows/Dockerfile @@ -3,7 +3,7 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 FROM ${BUILD_BASE_IMAGE} as builder @@ -12,10 +12,6 @@ FROM $BASE_IMAGE ARG MAJOR_VERSION ARG ZBX_VERSION -ARG ZBX_SOURCES - -ARG MAJOR_VERSION=5.0 -ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git LABEL org.opencontainers.image.title="Zabbix agent 2" ` diff --git a/Dockerfiles/build-base/alpine/Dockerfile b/Dockerfiles/build-base/alpine/Dockerfile index b09d68e18..22797b6fa 100644 --- a/Dockerfiles/build-base/alpine/Dockerfile +++ b/Dockerfiles/build-base/alpine/Dockerfile @@ -3,25 +3,23 @@ FROM alpine:3.12 ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ - PATH=/usr/lib/jvm/default-jvm/bin:/usr/local/go/bin:$PATH \ +ENV TERM=xterm \ + ZBX_VERSION=${ZBX_VERSION} \ + PATH=/usr/lib/jvm/default-jvm/bin:$PATH \ JAVA_HOME=/usr/lib/jvm/default-jvm -LABEL org.opencontainers.image.title="Zabbix build base" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ - apk add --no-cache --clean-protected \ - bash \ + INSTALL_PKGS="bash \ autoconf \ automake \ coreutils \ @@ -44,7 +42,11 @@ RUN set -eux && \ go \ make \ openjdk8-jre-base \ - unixodbc-dev && \ + unixodbc-dev" && \ + apk add \ + --no-cache \ + --clean-protected \ + ${INSTALL_PKGS} && \ rm -rf /var/cache/apk/* ARG GOLANG_VERSION=1.17.2 diff --git a/Dockerfiles/build-base/alpine/README.md b/Dockerfiles/build-base/alpine/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/alpine/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-base/centos/Dockerfile b/Dockerfiles/build-base/centos/Dockerfile index 6ab050c6d..3f3b48fc0 100644 --- a/Dockerfiles/build-base/centos/Dockerfile +++ b/Dockerfiles/build-base/centos/Dockerfile @@ -1,28 +1,24 @@ # syntax=docker/dockerfile:1 -FROM centos:8 +FROM centos:centos8 ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 -LABEL org.opencontainers.image.title="Zabbix build base" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ - sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo && \ - dnf --quiet makecache && \ - dnf -y install epel-release && \ - dnf -y module enable mysql && \ + REPOLIST="baseos,appstream,powertools" && \ INSTALL_PKGS="autoconf \ automake \ bash \ @@ -47,7 +43,13 @@ RUN set -eux && \ tar \ gettext \ 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} && \ ARCH_SUFFIX="$(arch)"; \ case "$ARCH_SUFFIX" in \ diff --git a/Dockerfiles/build-base/centos/README.md b/Dockerfiles/build-base/centos/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/centos/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-base/ol/Dockerfile b/Dockerfiles/build-base/ol/Dockerfile index 4b6ac2192..0d28c3f53 100644 --- a/Dockerfiles/build-base/ol/Dockerfile +++ b/Dockerfiles/build-base/ol/Dockerfile @@ -3,23 +3,21 @@ FROM oraclelinux:8-slim ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 -LABEL org.opencontainers.image.title="Zabbix build base" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ - microdnf -y module enable mysql && \ INSTALL_PKGS="autoconf \ automake \ bash \ @@ -44,6 +42,7 @@ RUN set -eux && \ tar \ gettext \ unixODBC-devel" && \ + microdnf -y module enable mysql && \ microdnf -y install \ --disablerepo "*" \ --enablerepo "ol8_baseos_latest" \ diff --git a/Dockerfiles/build-base/ol/README.md b/Dockerfiles/build-base/ol/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/ol/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-base/rhel/Dockerfile b/Dockerfiles/build-base/rhel/Dockerfile index 0d47e421d..4b37fc9a2 100644 --- a/Dockerfiles/build-base/rhel/Dockerfile +++ b/Dockerfiles/build-base/rhel/Dockerfile @@ -4,33 +4,32 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION=5.0 ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 -LABEL name="zabbix/zabbix-build-base-50" \ +LABEL description="Prepared environment to build Zabbix components" \ maintainer="alexey.pustovalov@zabbix.com" \ - vendor="Zabbix LLC" \ - version="${MAJOR_VERSION}" \ + name="zabbix/zabbix-build-base-50" \ release="${RELEASE}" \ summary="Zabbix build base" \ - description="Prepared environment to build Zabbix components" \ url="https://www.zabbix.com/" \ + vendor="Zabbix LLC" \ + version="${MAJOR_VERSION}" \ io.k8s.description="Prepared environment to build Zabbix components" \ io.k8s.display-name="Zabbix build base" \ io.openshift.expose-services="" \ 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.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"] RUN set -eux && \ - microdnf -y module enable mysql && \ INSTALL_PKGS="autoconf \ automake \ bash \ @@ -55,21 +54,17 @@ RUN set -eux && \ tar \ gettext \ 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 install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "ubi-8-appstream" \ - --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ - --enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ + --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ + --enablerepo "codeready-builder-for-rhel-8-x86_64-rpms" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ ARCH_SUFFIX="$(arch)"; \ case "$ARCH_SUFFIX" in \ @@ -81,6 +76,10 @@ RUN set -eux && \ url='https://dl.google.com/go/go1.17.2.linux-arm64.tar.gz'; \ 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 ;; \ esac; \ wget -O go.tgz.asc "$url.asc" && \ diff --git a/Dockerfiles/build-base/rhel/README.md b/Dockerfiles/build-base/rhel/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/rhel/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-base/ubuntu/Dockerfile b/Dockerfiles/build-base/ubuntu/Dockerfile index 3b6833307..3bdc631ff 100644 --- a/Dockerfiles/build-base/ubuntu/Dockerfile +++ b/Dockerfiles/build-base/ubuntu/Dockerfile @@ -3,25 +3,22 @@ FROM ubuntu:focal ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 -LABEL org.opencontainers.image.title="Zabbix build base" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - bash \ + INSTALL_PKGS="bash \ autoconf \ automake \ binutils \ @@ -44,7 +41,11 @@ RUN set -eux && \ gettext \ git \ 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 clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfiles/build-base/ubuntu/README.md b/Dockerfiles/build-base/ubuntu/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/ubuntu/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent b/Dockerfiles/build-base/windows/Dockerfile.agent index e36e47c2b..8d5be9fa5 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent +++ b/Dockerfiles/build-base/windows/Dockerfile.agent @@ -10,7 +10,6 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-installer-x64.exe @@ -19,7 +18,8 @@ ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.win 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 -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 ` GIT_URL=$GIT_URL NASM_URL=$NASM_URL PERL_URL=$PERL_URL PCRE_URL=$PCRE_URL OPENSSL_URL=$OPENSSL_URL @@ -30,8 +30,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.licenses="GPL v2.0" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` - org.opencontainers.image.version="${ZBX_VERSION}" ` - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.version="${ZBX_VERSION}" SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent2 b/Dockerfiles/build-base/windows/Dockerfile.agent2 index f63a1ef67..ef5313aaa 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile.agent2 @@ -13,7 +13,6 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 -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 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 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 ` 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 ` @@ -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.licenses="GPL v2.0" ` org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" ` - org.opencontainers.image.version="${ZBX_VERSION}" ` - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.version="${ZBX_VERSION}" SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfiles/build-base/windows/README.md b/Dockerfiles/build-base/windows/README.md new file mode 100644 index 000000000..374214ef8 --- /dev/null +++ b/Dockerfiles/build-base/windows/README.md @@ -0,0 +1,77 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base? + +Zabbix build base image is prepared build environment for building Zabbix components. It contains all required packages, binaries and tools. + +# Zabbix build base images + +These are the only official Zabbix build base Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is required to build Zabbix components. It is base image for [MySQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-mysql), [PostgreSQL](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-pgsql) and [SQLite3](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-sqlite3) base images. While the image contains only required packages, MySQL, PostgreSQL and SQLite3 base images compile Zabbix component and prepare them for usage. + +# The image variants + +The `zabbix-build-base` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-base:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-base:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-base:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/alpine/Dockerfile b/Dockerfiles/build-mysql/alpine/Dockerfile index 7f8488a80..9ad99b877 100644 --- a/Dockerfiles/build-mysql/alpine/Dockerfile +++ b/Dockerfiles/build-mysql/alpine/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,19 +36,19 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-mysql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ + --with-mysql \ --with-net-snmp \ --with-openipmi \ --with-openssl \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-mysql/alpine/README.md b/Dockerfiles/build-mysql/alpine/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/alpine/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/centos/Dockerfile b/Dockerfiles/build-mysql/centos/Dockerfile index d5fccc52e..b926e0fd0 100644 --- a/Dockerfiles/build-mysql/centos/Dockerfile +++ b/Dockerfiles/build-mysql/centos/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -34,21 +34,21 @@ RUN set -eux && \ --libdir=/usr/lib/zabbix \ --prefix=/usr \ --sysconfdir=/etc/zabbix \ + --enable-ipv6 \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-java \ --enable-proxy \ - --with-mysql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ + --with-mysql \ --with-net-snmp \ --with-openipmi \ --with-openssl \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-mysql/centos/README.md b/Dockerfiles/build-mysql/centos/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/centos/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile index 217c6e864..53d6161bb 100644 --- a/Dockerfiles/build-mysql/ol/Dockerfile +++ b/Dockerfiles/build-mysql/ol/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -34,21 +34,21 @@ RUN set -eux && \ --libdir=/usr/lib/zabbix \ --prefix=/usr \ --sysconfdir=/etc/zabbix \ + --enable-ipv6 \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-java \ --enable-proxy \ - --with-mysql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ + --with-mysql \ --with-net-snmp \ --with-openipmi \ --with-openssl \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-mysql/ol/README.md b/Dockerfiles/build-mysql/ol/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/ol/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/rhel/Dockerfile b/Dockerfiles/build-mysql/rhel/Dockerfile index b22c7dfc4..a2462e4b3 100644 --- a/Dockerfiles/build-mysql/rhel/Dockerfile +++ b/Dockerfiles/build-mysql/rhel/Dockerfile @@ -1,5 +1,6 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} @@ -10,23 +11,23 @@ ARG RELEASE ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL name="zabbix/zabbix-build-mysql-50" \ +LABEL description="Zabbix build base for MySQL based images" \ maintainer="alexey.pustovalov@zabbix.com" \ - vendor="Zabbix LLC" \ - version="${MAJOR_VERSION}" \ + name="zabbix/zabbix-build-mysql-50" \ release="${RELEASE}" \ summary="Zabbix build base (MySQL)" \ - description="Zabbix build base for MySQL based images" \ url="https://www.zabbix.com/" \ + vendor="Zabbix LLC" \ + version="${MAJOR_VERSION}" \ io.k8s.description="Zabbix build base for MySQL based images" \ io.k8s.display-name="Zabbix build base (MySQL)" \ io.openshift.expose-services="" \ 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.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 && \ cd /tmp/ && \ @@ -43,21 +44,21 @@ RUN set -eux && \ --libdir=/usr/lib/zabbix \ --prefix=/usr \ --sysconfdir=/etc/zabbix \ + --enable-ipv6 \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-java \ --enable-proxy \ - --with-mysql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ + --with-mysql \ --with-net-snmp \ --with-openipmi \ --with-openssl \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-mysql/rhel/README.md b/Dockerfiles/build-mysql/rhel/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/rhel/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/ubuntu/Dockerfile b/Dockerfiles/build-mysql/ubuntu/Dockerfile index 5e4f04d2e..09c736f66 100644 --- a/Dockerfiles/build-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/build-mysql/ubuntu/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -34,21 +34,21 @@ RUN set -eux && \ --libdir=/usr/lib/zabbix \ --prefix=/usr \ --sysconfdir=/etc/zabbix \ + --enable-ipv6 \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-java \ --enable-proxy \ - --with-mysql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ + --with-mysql \ --with-net-snmp \ --with-openipmi \ --with-openssl \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-mysql/ubuntu/README.md b/Dockerfiles/build-mysql/ubuntu/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/ubuntu/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index 56230d0a0..31e004bac 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -10,7 +10,6 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git 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 LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" ` @@ -48,7 +47,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` # LIBS="Crypt32.lib" ` TLSINCDIR=$env:SystemDrive\openssl_output\include ` TLSLIBDIR=$env:SystemDrive\openssl_output\lib ` - $env:ZBX_COMPONENT; ` + all; ` ` Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; ` & $env:SystemDrive\zabbix-$env:ZBX_VERSION\bin\win64\zabbix_agentd.exe -V; ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index 5b56744d4..2f5ce50c1 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -12,7 +12,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG ZABBIX_VERSION_RC_NUM=2400 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 LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" ` diff --git a/Dockerfiles/build-mysql/windows/README.md b/Dockerfiles/build-mysql/windows/README.md new file mode 100644 index 000000000..6f46a372c --- /dev/null +++ b/Dockerfiles/build-mysql/windows/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (MySQL)? + +Zabbix build base (MySQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (MySQL) images + +These are the only official Zabbix build base (MySQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-mysql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-mysql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-mysql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-mysql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-pgsql/alpine/Dockerfile b/Dockerfiles/build-pgsql/alpine/Dockerfile index 27b6a391d..8f11b0eb6 100644 --- a/Dockerfiles/build-pgsql/alpine/Dockerfile +++ b/Dockerfiles/build-pgsql/alpine/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,19 +36,19 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-postgresql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-postgresql \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-pgsql/alpine/README.md b/Dockerfiles/build-pgsql/alpine/README.md new file mode 100644 index 000000000..7c51f97e9 --- /dev/null +++ b/Dockerfiles/build-pgsql/alpine/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (PostgreSQL)? + +Zabbix build base (PostgreSQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (PostgreSQL) images + +These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-pgsql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-pgsql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-pgsql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-pgsql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile index b0fc8c9da..262bad524 100644 --- a/Dockerfiles/build-pgsql/centos/Dockerfile +++ b/Dockerfiles/build-pgsql/centos/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,19 +36,19 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-postgresql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-postgresql \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-pgsql/centos/README.md b/Dockerfiles/build-pgsql/centos/README.md new file mode 100644 index 000000000..7c51f97e9 --- /dev/null +++ b/Dockerfiles/build-pgsql/centos/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (PostgreSQL)? + +Zabbix build base (PostgreSQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (PostgreSQL) images + +These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-pgsql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-pgsql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-pgsql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-pgsql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile index b4fca1dc2..6f955ddf7 100644 --- a/Dockerfiles/build-pgsql/ol/Dockerfile +++ b/Dockerfiles/build-pgsql/ol/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,19 +36,19 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-postgresql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-postgresql \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-pgsql/ol/README.md b/Dockerfiles/build-pgsql/ol/README.md new file mode 100644 index 000000000..7c51f97e9 --- /dev/null +++ b/Dockerfiles/build-pgsql/ol/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (PostgreSQL)? + +Zabbix build base (PostgreSQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (PostgreSQL) images + +These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-pgsql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-pgsql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-pgsql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-pgsql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-pgsql/ubuntu/Dockerfile b/Dockerfiles/build-pgsql/ubuntu/Dockerfile index e122995a4..01ca823d4 100644 --- a/Dockerfiles/build-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/build-pgsql/ubuntu/Dockerfile @@ -9,15 +9,15 @@ ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL org.opencontainers.image.title="Zabbix build base (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,19 +36,19 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ - --enable-server \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-postgresql \ + --enable-server \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-postgresql \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-pgsql/ubuntu/README.md b/Dockerfiles/build-pgsql/ubuntu/README.md new file mode 100644 index 000000000..7c51f97e9 --- /dev/null +++ b/Dockerfiles/build-pgsql/ubuntu/README.md @@ -0,0 +1,79 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (PostgreSQL)? + +Zabbix build base (PostgreSQL) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (PostgreSQL) images + +These are the only official Zabbix build base (PostgreSQL) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +# The image variants + +The `zabbix-build-pgsql` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-pgsql:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-pgsql:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-pgsql:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-sqlite3/alpine/Dockerfile b/Dockerfiles/build-sqlite3/alpine/Dockerfile index 206505499..4c091d82c 100644 --- a/Dockerfiles/build-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/build-sqlite3/alpine/Dockerfile @@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,18 +36,18 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-sqlite3 \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-sqlite3 \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-sqlite3/alpine/README.md b/Dockerfiles/build-sqlite3/alpine/README.md new file mode 100644 index 000000000..d557d011c --- /dev/null +++ b/Dockerfiles/build-sqlite3/alpine/README.md @@ -0,0 +1,85 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (SQLite3)? + +Zabbix build base (SQLite3) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (SQLite3) images + +These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: +* zabbix-agent +* zabbix-agent2 +* zabbix-proxy-sqlite3 +* zabbix-java-gateway + +# The image variants + +The `zabbix-build-sqlite3` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-sqlite3:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-sqlite3:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-sqlite3:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-sqlite3/centos/Dockerfile b/Dockerfiles/build-sqlite3/centos/Dockerfile index 5680e9331..5512ce326 100644 --- a/Dockerfiles/build-sqlite3/centos/Dockerfile +++ b/Dockerfiles/build-sqlite3/centos/Dockerfile @@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,18 +36,18 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-sqlite3 \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-sqlite3 \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-sqlite3/centos/README.md b/Dockerfiles/build-sqlite3/centos/README.md new file mode 100644 index 000000000..d557d011c --- /dev/null +++ b/Dockerfiles/build-sqlite3/centos/README.md @@ -0,0 +1,85 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (SQLite3)? + +Zabbix build base (SQLite3) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (SQLite3) images + +These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: +* zabbix-agent +* zabbix-agent2 +* zabbix-proxy-sqlite3 +* zabbix-java-gateway + +# The image variants + +The `zabbix-build-sqlite3` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-sqlite3:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-sqlite3:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-sqlite3:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-sqlite3/ol/Dockerfile b/Dockerfiles/build-sqlite3/ol/Dockerfile index ff2f0ddb3..5fcf0c20a 100644 --- a/Dockerfiles/build-sqlite3/ol/Dockerfile +++ b/Dockerfiles/build-sqlite3/ol/Dockerfile @@ -7,17 +7,17 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 && \ cd /tmp/ && \ @@ -36,18 +36,18 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-sqlite3 \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-sqlite3 \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-sqlite3/ol/README.md b/Dockerfiles/build-sqlite3/ol/README.md new file mode 100644 index 000000000..d557d011c --- /dev/null +++ b/Dockerfiles/build-sqlite3/ol/README.md @@ -0,0 +1,85 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (SQLite3)? + +Zabbix build base (SQLite3) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (SQLite3) images + +These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: +* zabbix-agent +* zabbix-agent2 +* zabbix-proxy-sqlite3 +* zabbix-java-gateway + +# The image variants + +The `zabbix-build-sqlite3` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-sqlite3:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-sqlite3:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-sqlite3:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-sqlite3/rhel/Dockerfile b/Dockerfiles/build-sqlite3/rhel/Dockerfile index 88fe36334..6dd2e676c 100644 --- a/Dockerfiles/build-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/build-sqlite3/rhel/Dockerfile @@ -1,5 +1,6 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG BUILD_BASE_IMAGE=zabbix-build-base:rhel-${ZBX_VERSION} @@ -10,23 +11,23 @@ ARG RELEASE ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git -LABEL name="zabbix/zabbix-build-sqlite3-50" \ +LABEL description="Zabbix build base for SQLite3 based images" \ maintainer="alexey.pustovalov@zabbix.com" \ - vendor="Zabbix LLC" \ - version="${MAJOR_VERSION}" \ + name="zabbix/zabbix-build-sqlite3-50" \ release="${RELEASE}" \ summary="Zabbix build base (SQLite3)" \ - description="Zabbix build base for SQLite3 based images" \ url="https://www.zabbix.com/" \ + vendor="Zabbix LLC" \ + version="${MAJOR_VERSION}" \ io.k8s.description="Zabbix build base for SQLite3 based images" \ io.k8s.display-name="Zabbix build base (SQLite3)" \ io.openshift.expose-services="" \ 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.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 && \ cd /tmp/ && \ @@ -45,18 +46,18 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-sqlite3 \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-sqlite3 \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-sqlite3/rhel/README.md b/Dockerfiles/build-sqlite3/rhel/README.md new file mode 100644 index 000000000..d557d011c --- /dev/null +++ b/Dockerfiles/build-sqlite3/rhel/README.md @@ -0,0 +1,85 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (SQLite3)? + +Zabbix build base (SQLite3) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (SQLite3) images + +These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: +* zabbix-agent +* zabbix-agent2 +* zabbix-proxy-sqlite3 +* zabbix-java-gateway + +# The image variants + +The `zabbix-build-sqlite3` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-sqlite3:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-sqlite3:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-sqlite3:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile index d0537298f..daef43d08 100644 --- a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile @@ -7,21 +7,21 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_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" \ - org.opencontainers.image.version="${ZBX_VERSION}" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ + 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.title="Zabbix build base (SQLite3)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - 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.licenses="GPL v2.0" + org.opencontainers.image.vendor="Zabbix LLC" \ + org.opencontainers.image.version="${ZBX_VERSION}" RUN set -eux && \ + cd /tmp/ && \ git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ - ls -lah /tmp/ && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ @@ -36,18 +36,18 @@ RUN set -eux && \ --sysconfdir=/etc/zabbix \ --enable-agent \ --enable-agent2 \ + --enable-ipv6 \ + --enable-java \ --enable-proxy \ - --with-sqlite3 \ --with-ldap \ --with-libcurl \ --with-libxml2 \ - --enable-java \ --with-net-snmp \ --with-openipmi \ --with-openssl \ + --with-sqlite3 \ --with-ssh \ --with-unixodbc \ - --enable-ipv6 \ --silent && \ make -j"$(nproc)" -s dbschema && \ make -j"$(nproc)" -s && \ diff --git a/Dockerfiles/build-sqlite3/ubuntu/README.md b/Dockerfiles/build-sqlite3/ubuntu/README.md new file mode 100644 index 000000000..d557d011c --- /dev/null +++ b/Dockerfiles/build-sqlite3/ubuntu/README.md @@ -0,0 +1,85 @@ +![logo](https://assets.zabbix.com/img/logo/zabbix_logo_500x131.png) + +# What is Zabbix? + +Zabbix is an enterprise-class open source distributed monitoring solution. + +Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. + +For more information and related downloads for Zabbix components, please visit https://hub.docker.com/u/zabbix/ and https://zabbix.com + +# What is Zabbix build base (SQLite3)? + +Zabbix build base (SQLite3) image is used for building Zabbix components. It contains compiled Zabbix components. + +# Zabbix build base (SQLite3) images + +These are the only official Zabbix build base (SQLite3) Docker images. They are based on Alpine Linux v3.11, v3.14, Ubuntu 20.04 (focal), CentOS 8 and Oracle Linux 8 images. The available versions of the image are: + + Zabbix build base 4.0 (tags: alpine-4.0-latest, ubuntu-4.0-latest, centos-4.0-latest) + Zabbix build base 4.0.* (tags: alpine-4.0.*, ubuntu-4.0.*, centos-4.0.*) + Zabbix build base 5.0 (tags: alpine-5.0-latest, ubuntu-5.0-latest, ol-5.0-latest) + Zabbix build base 5.0.* (tags: alpine-5.0.*, ubuntu-5.0.*, ol-5.0.*) + Zabbix build base 5.4 (tags: alpine-5.4-latest, ubuntu-5.4-latest, ol-5.4-latest, alpine-latest, ubuntu-latest, ol-latest, latest) + Zabbix build base 5.4.* (tags: alpine-5.4.*, ubuntu-5.4.*, ol-5.4.*) + Zabbix build base 6.0 (tags: alpine-trunk, ubuntu-trunk, ol-trunk) + +Images are updated when new releases are published. The image with ``latest`` tag is based on Alpine Linux. + +# How to use this image + +The image is used to build / compile Zabbix components. Components are prepared for usage in any other images. + +The image uses [Zabbix build base](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) image with prepared build environment as base image and build / compile Zabbix components only. + +It contains limited prepared Zabbix components while MySQL and PostgreSQL build base images contain all possible components: +* zabbix-agent +* zabbix-agent2 +* zabbix-proxy-sqlite3 +* zabbix-java-gateway + +# The image variants + +The `zabbix-build-sqlite3` images come in many flavors, each designed for a specific use case. + +## `zabbix-build-sqlite3:alpine-` + +This image is based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use [musl libc](http://www.musl-libc.org) instead of [glibc and friends](http://www.etalabs.net/compare_libcs.html), so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `zabbix-build-sqlite3:ubuntu-` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `zabbix-build-sqlite3:ol-` + +Oracle Linux is an open-source operating system available under the GNU General Public License (GPLv2). Suitable for general purpose or Oracle workloads, it benefits from rigorous testing of more than 128,000 hours per day with real-world workloads and includes unique innovations such as Ksplice for zero-downtime kernel patching, DTrace for real-time diagnostics, the powerful Btrfs file system, and more. + +# Supported Docker versions + +This image is officially supported on Docker version 1.12.0. + +Support for older versions (down to 1.6) is provided on a best-effort basis. + +Please see [the Docker installation documentation](https://docs.docker.com/installation/) for details on how to upgrade your Docker daemon. + +# User Feedback + +## Documentation + +Documentation for this image is stored in the [`build-base/` directory](https://github.com/zabbix/zabbix-docker/tree/trunk/Dockerfiles/build-base) of the [`zabbix/zabbix-docker` GitHub repo](https://github.com/zabbix/zabbix-docker/). Be sure to familiarize yourself with the [repository's `README.md` file](https://github.com/zabbix/zabbix-docker/blob/master/README.md) before attempting a pull request. + +## Issues + +If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues). + +### Known issues + +## Contributing + +You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. + +Before you start to code, we recommend discussing your plans through a [GitHub issue](https://github.com/zabbix/zabbix-docker/issues), especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing. diff --git a/Dockerfiles/java-gateway/alpine/Dockerfile b/Dockerfiles/java-gateway/alpine/Dockerfile index 2f425d491..19a749d78 100644 --- a/Dockerfiles/java-gateway/alpine/Dockerfile +++ b/Dockerfiles/java-gateway/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,20 +9,21 @@ FROM alpine:3.12 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix Java Gateway" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="bash \ + openjdk8-jre-base" && \ + apk add \ + --no-cache \ + --clean-protected \ + ${INSTALL_PKGS} && \ + addgroup \ + --system \ + --gid 1995 \ + zabbix && \ + adduser \ + --system \ --gecos "Zabbix monitoring system" \ --disabled-password \ --uid 1997 \ @@ -44,9 +54,6 @@ RUN set -eux && \ mkdir -p /etc/zabbix/ && \ mkdir -p /usr/sbin/zabbix_java/ && \ 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 && \ 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/ && \ diff --git a/Dockerfiles/java-gateway/centos/Dockerfile b/Dockerfiles/java-gateway/centos/Dockerfile index ffafb9447..1cf64f7e4 100644 --- a/Dockerfiles/java-gateway/centos/Dockerfile +++ b/Dockerfiles/java-gateway/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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" && \ - INSTALL_PKGS="java-1.8.0-openjdk-headless \ + INSTALL_PKGS="bash \ + java-1.8.0-openjdk-headless \ findutils" && \ dnf -y install \ --disablerepo "*" \ @@ -51,6 +41,22 @@ RUN set -eux && \ --setopt=install_weak_deps=False \ --best \ ${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 && \ 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/ && \ diff --git a/Dockerfiles/java-gateway/ol/Dockerfile b/Dockerfiles/java-gateway/ol/Dockerfile index 3cf1b67fd..2e64d5058 100644 --- a/Dockerfiles/java-gateway/ol/Dockerfile +++ b/Dockerfiles/java-gateway/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,10 +30,26 @@ 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"] RUN set -eux && \ - groupadd --system --gid 1995 zabbix && \ + INSTALL_PKGS="bash \ + java-1.8.0-openjdk-headless \ + findutils" && \ + microdnf -y install \ + --disablerepo="*" \ + --enablerepo="ol8_baseos_latest" \ + --enablerepo="ol8_appstream" \ + --setopt=install_weak_deps=0 \ + --best \ + --nodocs \ + ${INSTALL_PKGS} && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -41,15 +57,6 @@ RUN set -eux && \ 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" && \ - microdnf -y install \ - --disablerepo="*" \ - --enablerepo="ol8_baseos_latest" \ - --enablerepo="ol8_appstream" \ - --setopt=install_weak_deps=0 \ - --best \ - --nodocs ${INSTALL_PKGS} && \ rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ diff --git a/Dockerfiles/java-gateway/rhel/Dockerfile b/Dockerfiles/java-gateway/rhel/Dockerfile index 4c6058626..1fd7f7017 100644 --- a/Dockerfiles/java-gateway/rhel/Dockerfile +++ b/Dockerfiles/java-gateway/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,36 +11,37 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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-50" \ +LABEL description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-java-gateway-50" \ + release="${RELEASE}" \ + run="docker run --name zabbix-java-gateway -p 10052:10052 -d registry.connect.redhat.com/zabbix/zabbix-java-gateway-50:${ZBX_VERSION}" \ + summary="Zabbix Java Gateway" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \ io.k8s.display-name="Zabbix Java Gateway" \ io.openshift.expose-services="10052:10052" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" - + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" + STOPSIGNAL SIGTERM COPY ["licenses", "/licenses"] @@ -60,10 +61,15 @@ RUN set -eux && \ --best \ --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -73,10 +79,10 @@ RUN set -eux && \ mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \ rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \ mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \ - microdnf -y clean all && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \ chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \ + microdnf -y clean all && \ 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 diff --git a/Dockerfiles/java-gateway/ubuntu/Dockerfile b/Dockerfiles/java-gateway/ubuntu/Dockerfile index de2292f2d..a8b1dc00a 100644 --- a/Dockerfiles/java-gateway/ubuntu/Dockerfile +++ b/Dockerfiles/java-gateway/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -31,10 +31,21 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbi RUN set -eux && \ 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -42,16 +53,13 @@ RUN set -eux && \ mkdir -p /etc/zabbix/ && \ mkdir -p /usr/sbin/zabbix_java/ && \ 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 && \ 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/ && \ chgrp -R 0 /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/* EXPOSE 10052/TCP diff --git a/Dockerfiles/proxy-mysql/alpine/Dockerfile b/Dockerfiles/proxy-mysql/alpine/Dockerfile index f1a3e476a..228a97188 100644 --- a/Dockerfiles/proxy-mysql/alpine/Dockerfile +++ b/Dockerfiles/proxy-mysql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,20 +9,21 @@ FROM alpine:3.12 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] RUN set -eux && \ - 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 /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 \ + INSTALL_PKGS="bash \ tini \ - bash \ iputils \ libcurl \ libevent \ @@ -72,7 +48,38 @@ RUN set -eux && \ openipmi-libs \ pcre \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-mysql/centos/Dockerfile b/Dockerfiles/proxy-mysql/centos/Dockerfile index 36b01ee13..e41b6db49 100644 --- a/Dockerfiles/proxy-mysql/centos/Dockerfile +++ b/Dockerfiles/proxy-mysql/centos/Dockerfile @@ -2,29 +2,28 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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" && \ INSTALL_PKGS="libevent \ tini \ @@ -74,14 +51,41 @@ RUN set -eux && \ pcre \ zlib \ unixODBC" && \ + dnf -y module enable mysql && \ dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-mysql/ol/Dockerfile b/Dockerfiles/proxy-mysql/ol/Dockerfile index 3c3fe6152..6f606f020 100644 --- a/Dockerfiles/proxy-mysql/ol/Dockerfile +++ b/Dockerfiles/proxy-mysql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,21 +9,21 @@ FROM oraclelinux:8-slim ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -36,28 +35,6 @@ 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"] 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 && \ - microdnf -y module enable mysql && \ INSTALL_PKGS="libevent \ tini \ gzip \ @@ -74,14 +51,42 @@ RUN set -eux && \ 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} && \ + --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 \ + --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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-mysql/rhel/Dockerfile b/Dockerfiles/proxy-mysql/rhel/Dockerfile index 3c3f54ba5..0242aaf5a 100644 --- a/Dockerfiles/proxy-mysql/rhel/Dockerfile +++ b/Dockerfiles/proxy-mysql/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,36 +11,37 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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 -LABEL name="zabbix/zabbix-proxy-mysql-50" \ +LABEL description="Zabbix proxy with MySQL database support" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-proxy-mysql-50" \ + 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-50:${ZBX_VERSION}" \ + summary="Zabbix proxy (MySQL)" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix proxy with MySQL database support" \ io.k8s.display-name="Zabbix proxy (MySQL)" \ io.openshift.expose-services="10051:10051" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" 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_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"] -RUN set -eux && INSTALL_PKGS="bash \ +RUN set -eux && \ + INSTALL_PKGS="bash \ tini \ shadow-utils \ fping \ @@ -72,20 +74,25 @@ RUN set -eux && INSTALL_PKGS="bash \ rm -rf /tmp/epel-release-latest-8.noarch.rpm && \ microdnf -y module enable mysql && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "ubi-8-appstream" \ - --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ + --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -103,10 +110,10 @@ RUN set -eux && INSTALL_PKGS="bash \ mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /usr/share/doc/zabbix-proxy-mysql && \ - microdnf -y clean all && \ 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 && \ 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 diff --git a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile index a5c5edc0f..e435f3e7c 100644 --- a/Dockerfiles/proxy-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-mysql/ubuntu/Dockerfile @@ -10,21 +10,21 @@ FROM ubuntu:focal ARG MAJOR_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} \ 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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -36,30 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - tini \ + INSTALL_PKGS="tini \ ca-certificates \ fping \ libcurl4 \ @@ -73,7 +50,37 @@ RUN set -eux && \ libxml2 \ mysql-client \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile index 0db9afecf..9046fdf95 100644 --- a/Dockerfiles/proxy-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/alpine/Dockerfile @@ -9,20 +9,21 @@ FROM alpine:3.12 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="bash \ + 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" \ --disabled-password \ --uid 1997 \ @@ -46,6 +69,7 @@ RUN set -eux && \ 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 && \ @@ -54,22 +78,6 @@ RUN set -eux && \ 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 && \ - 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-sqlite3/centos/Dockerfile b/Dockerfiles/proxy-sqlite3/centos/Dockerfile index 35aa7c00e..798fd719f 100644 --- a/Dockerfiles/proxy-sqlite3/centos/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/centos/Dockerfile @@ -5,25 +5,25 @@ ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:centos-${ZBX_VERSION} FROM ${BUILD_BASE_IMAGE} as builder -FROM centos:8 +FROM centos:centos8 ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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" && \ INSTALL_PKGS="libevent \ tini \ @@ -72,12 +50,38 @@ RUN set -eux && \ unixODBC" && \ dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-sqlite3/ol/Dockerfile b/Dockerfiles/proxy-sqlite3/ol/Dockerfile index 008cb11d5..46a61763c 100644 --- a/Dockerfiles/proxy-sqlite3/ol/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ol/Dockerfile @@ -9,21 +9,21 @@ FROM oraclelinux:8-slim ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 \ tini \ libssh \ @@ -71,13 +49,40 @@ RUN set -eux && \ 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} && \ + --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 \ + --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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile index 62960bd83..6d225d45c 100644 --- a/Dockerfiles/proxy-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/rhel/Dockerfile @@ -1,46 +1,47 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:rhel-${ZBX_VERSION} -ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git FROM ${BUILD_BASE_IMAGE} as builder FROM registry.access.redhat.com/ubi8/ubi-minimal -ARG MAJOR_VERSIO +ARG MAJOR_VERSION ARG RELEASE 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 -LABEL name="zabbix/zabbix-proxy-sqlite-50" \ +LABEL description="Zabbix proxy with SQLite3 database support" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-proxy-sqlite-50" \ + release="${RELEASE}" \ + run="docker run --name zabbix-proxy -p 10051:10051 -d registry.connect.redhat.com/zabbix/zabbix-proxy-sqlite-50:${ZBX_VERSION}" \ + summary="Zabbix proxy (SQLite3)" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix proxy with SQLite3 database support" \ io.k8s.display-name="Zabbix proxy (SQLite3)" \ io.openshift.expose-services="10051:10051" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" STOPSIGNAL SIGTERM @@ -50,7 +51,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}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"] -RUN set -eux && INSTALL_PKGS="bash \ +RUN set -eux && \ + INSTALL_PKGS="bash \ tini \ shadow-utils \ fping \ @@ -69,19 +71,24 @@ RUN set -eux && INSTALL_PKGS="bash \ rpm -ivh /tmp/epel-release-latest-8.noarch.rpm && \ rm -rf /tmp/epel-release-latest-8.noarch.rpm && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "ubi-8-appstream" \ - --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -99,10 +106,10 @@ RUN set -eux && INSTALL_PKGS="bash \ mkdir -p /var/lib/zabbix/ssl/certs && \ mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ - microdnf -y clean all && \ 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 && \ 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 diff --git a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile index d2a1467b8..3f803348f 100644 --- a/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile @@ -9,21 +9,21 @@ FROM ubuntu:focal ARG MAJOR_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} \ 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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -34,29 +34,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/ RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + INSTALL_PKGS="bash \ tini \ ca-certificates \ fping \ @@ -70,7 +48,37 @@ RUN set -eux && \ libssl1.1 \ libxml2 \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-mysql/alpine/Dockerfile b/Dockerfiles/server-mysql/alpine/Dockerfile index bee49a942..61f9325b6 100644 --- a/Dockerfiles/server-mysql/alpine/Dockerfile +++ b/Dockerfiles/server-mysql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,20 +9,21 @@ FROM alpine:3.12 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="bash \ + 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" \ --disabled-password \ --uid 1997 \ @@ -60,23 +84,6 @@ RUN set -eux && \ mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-mysql/centos/Dockerfile b/Dockerfiles/server-mysql/centos/Dockerfile index 8a8860c2f..6210b9e45 100644 --- a/Dockerfiles/server-mysql/centos/Dockerfile +++ b/Dockerfiles/server-mysql/centos/Dockerfile @@ -2,29 +2,28 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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" && \ INSTALL_PKGS="fping \ tini \ @@ -79,14 +54,43 @@ RUN set -eux && \ pcre \ zlib \ unixODBC" && \ + dnf -y module enable mysql && \ dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-mysql/ol/Dockerfile b/Dockerfiles/server-mysql/ol/Dockerfile index d53bf0bae..7aac8648a 100644 --- a/Dockerfiles/server-mysql/ol/Dockerfile +++ b/Dockerfiles/server-mysql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,21 +9,21 @@ FROM oraclelinux:8-slim ARG MAJOR_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} \ MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL -LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 && \ - microdnf -y module enable mysql && \ - INSTALL_PKGS="fping \ + INSTALL_PKGS="bash \ + fping \ tini \ file-libs \ tzdata \ @@ -79,14 +55,44 @@ RUN set -eux && \ 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} && \ + --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 \ + --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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-mysql/rhel/Dockerfile b/Dockerfiles/server-mysql/rhel/Dockerfile index a83c7905d..cb5ce8cc6 100644 --- a/Dockerfiles/server-mysql/rhel/Dockerfile +++ b/Dockerfiles/server-mysql/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,36 +11,37 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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 -LABEL name="zabbix/zabbix-server-mysql-50" \ +LABEL description="Zabbix server with MySQL database support" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-server-mysql-50" \ + 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-50:${ZBX_VERSION}" \ + summary="Zabbix server (MySQL)" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix server with MySQL database support" \ io.k8s.display-name="Zabbix server (MySQL)" \ io.openshift.expose-services="10051:10051" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" 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}/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 \ fping \ shadow-utils \ @@ -73,20 +75,25 @@ RUN set -eux && INSTALL_PKGS="bash \ rm -rf /tmp/epel-release-latest-8.noarch.rpm && \ microdnf -y module enable mysql && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "ubi-8-appstream" \ - --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ + --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -95,6 +102,7 @@ RUN set -eux && INSTALL_PKGS="bash \ 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 && \ @@ -105,10 +113,10 @@ RUN set -eux && INSTALL_PKGS="bash \ mkdir -p /var/lib/zabbix/ssl/keys && \ mkdir -p /var/lib/zabbix/ssl/ssl_ca && \ mkdir -p /usr/share/doc/zabbix-server-mysql && \ - microdnf -y clean all && \ 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 && \ 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 diff --git a/Dockerfiles/server-mysql/ubuntu/Dockerfile b/Dockerfiles/server-mysql/ubuntu/Dockerfile index d2884909b..c87082ddf 100644 --- a/Dockerfiles/server-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/server-mysql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,21 +9,21 @@ FROM ubuntu:focal ARG MAJOR_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} \ 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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -36,31 +35,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sq RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + INSTALL_PKGS="bash \ tini \ tzdata \ ca-certificates \ @@ -78,7 +53,39 @@ RUN set -eux && \ libxml2 \ mysql-client \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-pgsql/alpine/Dockerfile b/Dockerfiles/server-pgsql/alpine/Dockerfile index e8e33043b..f7b5c3e65 100644 --- a/Dockerfiles/server-pgsql/alpine/Dockerfile +++ b/Dockerfiles/server-pgsql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,20 +9,21 @@ FROM alpine:3.12 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] RUN set -eux && \ - 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 /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 \ + INSTALL_PKGS="bash \ tini \ - bash \ fping \ tzdata \ iputils \ @@ -77,7 +50,41 @@ RUN set -eux && \ pcre \ postgresql-client \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-pgsql/centos/Dockerfile b/Dockerfiles/server-pgsql/centos/Dockerfile index cd3874daf..c92567ae6 100644 --- a/Dockerfiles/server-pgsql/centos/Dockerfile +++ b/Dockerfiles/server-pgsql/centos/Dockerfile @@ -2,28 +2,28 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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 -LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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" && \ INSTALL_PKGS="fping \ file-libs \ @@ -79,12 +56,40 @@ RUN set -eux && \ unixODBC" && \ dnf -y install epel-release && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-pgsql/ol/Dockerfile b/Dockerfiles/server-pgsql/ol/Dockerfile index cb1aeb717..b58a5b0e0 100644 --- a/Dockerfiles/server-pgsql/ol/Dockerfile +++ b/Dockerfiles/server-pgsql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,9 +9,10 @@ FROM oraclelinux:8-slim ARG MAJOR_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 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"] 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 \ file-libs \ tini \ @@ -78,13 +55,42 @@ RUN set -eux && \ 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} && \ + --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 \ + --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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/server-pgsql/ubuntu/Dockerfile b/Dockerfiles/server-pgsql/ubuntu/Dockerfile index ffdb2f6a4..38f84e55a 100644 --- a/Dockerfiles/server-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/server-pgsql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,21 +9,21 @@ FROM ubuntu:focal ARG MAJOR_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} \ 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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -37,31 +36,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + INSTALL_PKGS="bash \ tini \ tzdata \ ca-certificates \ @@ -79,7 +54,39 @@ RUN set -eux && \ libxml2 \ postgresql-client \ 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/ && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ diff --git a/Dockerfiles/snmptraps/alpine/Dockerfile b/Dockerfiles/snmptraps/alpine/Dockerfile index e37caef44..785004722 100644 --- a/Dockerfiles/snmptraps/alpine/Dockerfile +++ b/Dockerfiles/snmptraps/alpine/Dockerfile @@ -4,24 +4,36 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 \ ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT=" " -LABEL org.opencontainers.image.title="zabbix-snmptraps-alpine" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.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}" STOPSIGNAL SIGTERM RUN set -eux && \ - addgroup --system --gid 1995 zabbix && \ - adduser --system \ + INSTALL_PKGS="bash \ + tzdata \ + net-snmp" && \ + apk add \ + --no-cache \ + --clean-protected \ + ${INSTALL_PKGS} && \ + addgroup \ + --system \ + --gid 1995 \ + zabbix && \ + adduser \ + --system \ --gecos "Zabbix monitoring system" \ --disabled-password \ --uid 1997 \ @@ -30,15 +42,10 @@ RUN set -eux && \ --home /var/lib/zabbix/ \ zabbix && \ 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/snmptraps && \ 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/ && \ 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/ && \ diff --git a/Dockerfiles/snmptraps/centos/Dockerfile b/Dockerfiles/snmptraps/centos/Dockerfile index b1a5eeafc..77adaaf6b 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/Dockerfile @@ -4,41 +4,47 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 \ ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT=" " -LABEL org.opencontainers.image.title="zabbix-snmptraps-centos" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.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}" STOPSIGNAL SIGTERM 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" && \ INSTALL_PKGS="bash \ tzdata \ net-snmp" && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/snmptraps && \ mkdir -p /var/lib/zabbix/mibs && \ diff --git a/Dockerfiles/snmptraps/ol/Dockerfile b/Dockerfiles/snmptraps/ol/Dockerfile index 50a09d54e..3881dcac4 100644 --- a/Dockerfiles/snmptraps/ol/Dockerfile +++ b/Dockerfiles/snmptraps/ol/Dockerfile @@ -4,40 +4,47 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 \ ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT=" " -LABEL org.opencontainers.image.title="zabbix-snmptraps-ol" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.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}" STOPSIGNAL SIGTERM 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 \ tzdata \ net-snmp" && \ microdnf -y install \ - --disablerepo="*" \ - --enablerepo="ol8_baseos_latest" \ - --enablerepo="ol8_appstream" \ - --setopt=install_weak_deps=0 \ - --best \ - --nodocs ${INSTALL_PKGS} && \ + --disablerepo="*" \ + --enablerepo="ol8_baseos_latest" \ + --enablerepo="ol8_appstream" \ + --setopt=install_weak_deps=0 \ + --best \ + --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/snmptraps && \ mkdir -p /var/lib/zabbix/mibs && \ diff --git a/Dockerfiles/snmptraps/rhel/Dockerfile b/Dockerfiles/snmptraps/rhel/Dockerfile index 7dba6bfb1..7559d9dc4 100644 --- a/Dockerfiles/snmptraps/rhel/Dockerfile +++ b/Dockerfiles/snmptraps/rhel/Dockerfile @@ -1,5 +1,4 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal -MAINTAINER Alexey Pustovalov ARG MAJOR_VERSION=5.0 ARG RELEASE=17 @@ -7,35 +6,36 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 \ ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT=" " -LABEL name="zabbix/zabbix-snmptraps-50" \ +LABEL description="Zabbix SNMP traps receiver" \ maintainer="alexey.pustovalov@zabbix.com" \ + name="zabbix/zabbix-snmptraps-50" \ + 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-50:${ZBX_VERSION}" \ + summary="Zabbix SNMP traps receiver" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix SNMP traps receiver" \ io.k8s.display-name="Zabbix SNMP traps receiver" \ io.openshift.expose-services="162:1162" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" STOPSIGNAL SIGTERM @@ -47,17 +47,22 @@ RUN set -eux && \ tzdata \ net-snmp" && \ microdnf -y install \ - --disablerepo="*" \ - --enablerepo="rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo="rhel-8-for-x86_64-appstream-rpms" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo="*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ diff --git a/Dockerfiles/snmptraps/ubuntu/Dockerfile b/Dockerfiles/snmptraps/ubuntu/Dockerfile index f16e6be98..1530fe35e 100644 --- a/Dockerfiles/snmptraps/ubuntu/Dockerfile +++ b/Dockerfiles/snmptraps/ubuntu/Dockerfile @@ -4,38 +4,45 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 \ ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT=" " -LABEL org.opencontainers.image.title="zabbix-snmptraps-ubuntu" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.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}" STOPSIGNAL SIGTERM RUN set -eux && \ 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/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 && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/snmptraps && \ diff --git a/Dockerfiles/web-apache-mysql/alpine/Dockerfile b/Dockerfiles/web-apache-mysql/alpine/Dockerfile index 22d7eb03f..d1edcce61 100644 --- a/Dockerfiles/web-apache-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-mysql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,22 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN set -eux && \ - 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 && \ - apk add --clean-protected --no-cache \ + INSTALL_PKGS="bash \ apache2 \ - bash \ curl \ mariadb-client \ mariadb-connector-c \ @@ -64,16 +50,41 @@ RUN set -eux && \ php7-fileinfo \ php7-xmlreader \ php7-xmlwriter \ - php7-openssl && \ - apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ + php7-openssl" && \ + 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/ssl.conf" && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/apache2/httpd.conf" && \ sed -ri \ - -e 's!^(\s*PidFile)\s+\S+!\1 "/tmp/httpd.pid"!g' \ + -e 's!^(\s*PidFile)\s+\S+!\1 "/tmp/httpd.pid"!g' \ "/etc/apache2/conf.d/mpm.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/httpd.conf && \ rm -rf "/var/run/apache2/" && \ diff --git a/Dockerfiles/web-apache-mysql/centos/Dockerfile b/Dockerfiles/web-apache-mysql/centos/Dockerfile index e2aa50eaf..ca9b6c1c8 100644 --- a/Dockerfiles/web-apache-mysql/centos/Dockerfile +++ b/Dockerfiles/web-apache-mysql/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,20 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] 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 && \ REPOLIST="baseos,appstream,epel" && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ httpd \ mysql \ mod_ssl \ @@ -60,19 +49,37 @@ RUN set -eux && \ glibc-locale-source \ supervisor" && \ dnf -y install epel-release && \ + dnf -y module enable mysql && \ + dnf -y module enable php:7.4 && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ssl.conf" && \ rm -f /etc/php-fpm.d/www.conf && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/httpd/conf/httpd.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \ cd /usr/share/zabbix/ && \ @@ -84,20 +91,17 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /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/ && \ - 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 \ findutils \ glibc-locale-source && \ diff --git a/Dockerfiles/web-apache-mysql/ol/Dockerfile b/Dockerfiles/web-apache-mysql/ol/Dockerfile index 6dd4df6bc..9ef1af2fe 100644 --- a/Dockerfiles/web-apache-mysql/ol/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 && \ - microdnf -y module enable mysql && \ - microdnf -y module enable php:7.4 && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ httpd \ mysql \ mod_ssl \ @@ -60,20 +48,39 @@ RUN set -eux && \ findutils \ glibc-locale-source \ supervisor" && \ + microdnf -y module enable mysql && \ + 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} && \ + --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 \ + --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/ssl.conf" && \ rm -f /etc/php-fpm.d/www.conf && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/httpd/conf/httpd.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \ cd /usr/share/zabbix/ && \ @@ -85,20 +92,17 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /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/ && \ - 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 \ findutils \ glibc-locale-source && \ diff --git a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile index 0071a7f98..48bf3906a 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-mysql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -31,19 +31,7 @@ COPY ["conf/etc/", "/etc/"] RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + INSTALL_PKGS="bash \ apache2 \ curl \ libapache2-mod-php \ @@ -56,18 +44,38 @@ RUN set -eux && \ php7.4-ldap \ php7.4-mbstring \ 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-enabled/* && \ /usr/sbin/a2enmod ssl && \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ - "/etc/apache2/apache2.conf" && \ + "/etc/apache2/apache2.conf" && \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ - "/etc/apache2/conf-available/other-vhosts-access-log.conf" && \ + "/etc/apache2/conf-available/other-vhosts-access-log.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \ sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf && \ sed -i 's|/var/run/apache2$SUFFIX|/tmp|g' /etc/apache2/envvars && \ @@ -83,18 +91,15 @@ RUN set -eux && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ dpkg-reconfigure locales && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/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/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /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 clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile index 3ed0ecd27..da05336cd 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,22 +30,8 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN set -eux && \ - 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 && \ - apk add --clean-protected --no-cache \ + INSTALL_PKGS="bash \ apache2 \ - bash \ curl \ php7-apache2 \ php7-bcmath \ @@ -63,16 +49,41 @@ RUN set -eux && \ php7-xmlreader \ php7-xmlwriter \ php7-openssl \ - postgresql-client && \ - apk add --clean-protected --no-cache --no-scripts apache2-ssl && \ + postgresql-client" && \ + 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/ssl.conf" && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/apache2/httpd.conf" && \ sed -ri \ - -e 's!^(\s*PidFile)\s+\S+!\1 "/tmp/httpd.pid"!g' \ + -e 's!^(\s*PidFile)\s+\S+!\1 "/tmp/httpd.pid"!g' \ "/etc/apache2/conf.d/mpm.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/httpd.conf && \ rm -rf "/var/run/apache2/" && \ diff --git a/Dockerfiles/web-apache-pgsql/centos/Dockerfile b/Dockerfiles/web-apache-pgsql/centos/Dockerfile index a3b74e3a9..a13bbf842 100644 --- a/Dockerfiles/web-apache-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,20 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] 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" && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ httpd \ mod_ssl \ php \ @@ -60,19 +49,36 @@ RUN set -eux && \ glibc-locale-source \ supervisor" && \ dnf -y install epel-release && \ + dnf -y module enable php:7.4 && \ dnf -y install \ - --disablerepo "*" \ - --enablerepo "${REPOLIST}" \ - --setopt=tsflags=nodocs \ - --setopt=install_weak_deps=False \ - --best \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/ssl.conf" && \ rm -f /etc/php-fpm.d/www.conf && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/httpd/conf/httpd.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \ cd /usr/share/zabbix/ && \ @@ -84,20 +90,17 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /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/ && \ - 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 \ findutils \ glibc-locale-source && \ diff --git a/Dockerfiles/web-apache-pgsql/ol/Dockerfile b/Dockerfiles/web-apache-pgsql/ol/Dockerfile index 1809b63db..135243466 100644 --- a/Dockerfiles/web-apache-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 && \ - microdnf -y module enable php:7.4 && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ httpd \ mod_ssl \ php \ @@ -59,20 +48,38 @@ RUN set -eux && \ findutils \ glibc-locale-source \ 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} && \ + --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 \ + --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/ssl.conf" && \ rm -f /etc/php-fpm.d/www.conf && \ sed -ri \ - -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ - -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ "/etc/httpd/conf/httpd.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \ cd /usr/share/zabbix/ && \ @@ -84,20 +91,17 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /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/ && \ - 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 \ findutils \ glibc-locale-source && \ diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile index 0fba5398a..2279ec314 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -31,19 +31,7 @@ COPY ["conf/etc/", "/etc/"] RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ - apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ + INSTALL_PKGS="bash \ apache2 \ curl \ libapache2-mod-php \ @@ -56,18 +44,38 @@ RUN set -eux && \ php7.4-mbstring \ php7.4-xml \ 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-enabled/* && \ /usr/sbin/a2enmod ssl && \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ - "/etc/apache2/apache2.conf" && \ + "/etc/apache2/apache2.conf" && \ sed -ri \ -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ - "/etc/apache2/conf-available/other-vhosts-access-log.conf" && \ + "/etc/apache2/conf-available/other-vhosts-access-log.conf" && \ sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \ sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf && \ sed -i 's|/var/run/apache2$SUFFIX|/tmp|g' /etc/apache2/envvars && \ @@ -83,20 +91,15 @@ RUN set -eux && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ 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/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/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.4/ && \ chgrp -R 0 /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 clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile index 4f14d4720..387cae41e 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,22 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN set -eux && \ - 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 && \ - apk add --clean-protected --no-cache \ - bash \ + INSTALL_PKGS="bash \ curl \ mariadb-client \ mariadb-connector-c \ @@ -66,7 +51,34 @@ RUN set -eux && \ php7-xmlreader \ php7-xmlwriter \ 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 -f /etc/nginx/conf.d/*.conf && \ ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \ diff --git a/Dockerfiles/web-nginx-mysql/centos/Dockerfile b/Dockerfiles/web-nginx-mysql/centos/Dockerfile index 76d193697..b9718a802 100644 --- a/Dockerfiles/web-nginx-mysql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,22 +30,9 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] 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" && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ mysql \ nginx \ php-bcmath \ @@ -60,13 +47,32 @@ RUN set -eux && \ glibc-locale-source \ supervisor" && \ dnf -y install epel-release && \ + dnf -y module enable mysql && \ + 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 \ + --disablerepo "*" \ + --enablerepo "${REPOLIST}" \ + --setopt=tsflags=nodocs \ + --setopt=install_weak_deps=False \ + --best \ ${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/php-fpm.d/www.conf && \ @@ -79,23 +85,20 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ - chown --quiet -R zabbix:root /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 \ - findutils \ - glibc-locale-source && \ + findutils \ + glibc-locale-source && \ dnf -y clean all && \ 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 diff --git a/Dockerfiles/web-nginx-mysql/ol/Dockerfile b/Dockerfiles/web-nginx-mysql/ol/Dockerfile index 780a1c557..b1f8a4bb3 100644 --- a/Dockerfiles/web-nginx-mysql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 && \ - microdnf -y module enable mysql && \ - microdnf -y module enable php:7.4 && \ - INSTALL_PKGS="curl \ + INSTALL_PKGS="bash \ + curl \ mysql \ nginx \ php-bcmath \ @@ -59,14 +46,34 @@ RUN set -eux && \ findutils \ glibc-locale-source \ supervisor" && \ + microdnf -y module enable mysql && \ + 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} && \ + --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 \ + --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/php-fpm.d/www.conf && \ cd /usr/share/zabbix/ && \ @@ -78,23 +85,20 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ - chown --quiet -R zabbix:root /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 \ - findutils \ - glibc-locale-source && \ + findutils \ + glibc-locale-source && \ microdnf -y clean all && \ 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 diff --git a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile index 1f4307d71..74e3dd284 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/rhel/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 ARG MAJOR_VERSION=5.0 +ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -11,35 +11,36 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal ARG MAJOR_VERSION ARG RELEASE 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" \ + 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-50:${ZBX_VERSION}" \ + summary="Zabbix web-interface based on Nginx web server with MySQL database support" \ + url="https://www.zabbix.com/" \ vendor="Zabbix LLC" \ 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-50:${ZBX_VERSION}" \ io.k8s.description="Zabbix web-interface based on Nginx web server with MySQL database support" \ io.k8s.display-name="Zabbix Frontend (Nginx)" \ io.openshift.expose-services="8080:http,8443:https" \ 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.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-50:${ZBX_VERSION}" \ 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.version="${ZBX_VERSION}" \ + org.label-schema.vcs-ref="${VCS_REF}" \ 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-50:${ZBX_VERSION}" + org.label-schema.vendor="Zabbix LLC" \ + org.label-schema.version="${ZBX_VERSION}" STOPSIGNAL SIGTERM @@ -47,7 +48,8 @@ COPY ["licenses", "/licenses"] COPY ["conf/etc/", "/etc/"] COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] -RUN set -eux && INSTALL_PKGS="bash \ +RUN set -eux && \ + INSTALL_PKGS="bash \ tzdata \ curl \ supervisor \ @@ -70,20 +72,25 @@ RUN set -eux && INSTALL_PKGS="bash \ microdnf -y module enable mysql && \ microdnf -y module enable php:7.4 nginx:1.18 && \ microdnf -y install \ - --disablerepo "*" \ - --enablerepo "ubi-8-baseos" \ - --enablerepo "ubi-8-appstream" \ - --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ - --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ - --enablerepo "epel" \ - --setopt=install_weak_deps=0 \ - --best \ - --setopt=tsflags=nodocs \ + --disablerepo "*" \ + --enablerepo "ubi-8-baseos" \ + --enablerepo "ubi-8-appstream" \ + --enablerepo "rhel-8-for-x86_64-baseos-rpms" \ + --enablerepo "rhel-8-for-x86_64-appstream-rpms" \ + --enablerepo "epel" \ + --setopt=install_weak_deps=0 \ + --best \ + --setopt=tsflags=nodocs \ ${INSTALL_PKGS} && \ - groupadd --system --gid 1995 zabbix && \ + groupadd \ + --system \ + --gid 1995 \ + zabbix && \ useradd \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -103,23 +110,20 @@ RUN set -eux && INSTALL_PKGS="bash \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ - chown --quiet -R zabbix:root /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 \ - findutils \ - glibc-locale-source && \ + findutils \ + glibc-locale-source && \ microdnf -y clean all && \ 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 diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile index 3a8ec803c..7ed248d9e 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -31,24 +31,29 @@ COPY ["conf/etc/", "/etc/"] RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ + INSTALL_PKGS="bash \ + ca-certificates \ + curl \ + mysql-client \ + nginx \ + locales \ + php7.4-bcmath \ + php7.4-fpm \ + php7.4-gd \ + php7.4-json \ + php7.4-ldap \ + php7.4-mbstring \ + php7.4-mysql \ + php7.4-xml \ + supervisor" && \ + INSTALL_TEMP_PKGS="gpg \ + ca-certificates \ + dirmngr \ + gpg-agent" && \ apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - gpg \ - dirmngr \ - gpg-agent \ - ca-certificates && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + --no-install-recommends install \ + ${INSTALL_TEMP_PKGS} && \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ found=''; \ for server in \ @@ -64,27 +69,33 @@ RUN set -eux && \ 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 && \ apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends \ - -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install \ - curl \ - mysql-client \ - nginx \ - locales \ - php7.4-bcmath \ - php7.4-fpm \ - php7.4-gd \ - php7.4-json \ - php7.4-ldap \ - php7.4-mbstring \ - php7.4-mysql \ - php7.4-xml \ - supervisor && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + --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 && \ + mkdir -p /var/lib/php/session && \ rm -f /etc/nginx/conf.d/*.conf && \ rm -rf /var/cache/nginx/ && \ rm -f /etc/php/7.4/fpm/pool.d/www.conf && \ ln -sf /dev/fd/2 /var/log/nginx/error.log && \ 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/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ @@ -96,11 +107,9 @@ RUN set -eux && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ 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/ && \ 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/ && \ @@ -110,6 +119,11 @@ RUN set -eux && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + purge \ + gpg \ + dirmngr \ + gpg-agent && \ apt-get -y autoremove && \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile index eac308797..2ad460f70 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/alpine/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM alpine:3.12 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,22 +30,7 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] RUN set -eux && \ - 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 && \ - apk add --clean-protected --no-cache \ - bash \ + INSTALL_PKGS="bash \ curl \ nginx \ php7-bcmath \ @@ -65,7 +50,34 @@ RUN set -eux && \ php7-xmlwriter \ php7-openssl \ 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 -f /etc/nginx/conf.d/*.conf && \ ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \ diff --git a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile index b4643fc2d..ee93b25bc 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/centos/Dockerfile @@ -2,27 +2,27 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 centos:8 +FROM centos:centos8 ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -30,10 +30,40 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"] COPY ["conf/etc/", "/etc/"] 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -42,30 +72,6 @@ RUN set -eux && \ mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web/certs && \ 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/php-fpm.d/www.conf && \ cd /usr/share/zabbix/ && \ @@ -77,23 +83,20 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ - chown --quiet -R zabbix:root /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 \ - findutils \ - glibc-locale-source && \ + findutils \ + glibc-locale-source && \ dnf -y clean all && \ 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 diff --git a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile index 0de871c5e..ddb74f82f 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ol/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM oraclelinux:8-slim ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -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"] 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 \ - --system --comment "Zabbix monitoring system" \ - -g zabbix -G root \ + --system \ + --comment "Zabbix monitoring system" \ + -g zabbix \ + -G root \ --uid 1997 \ --shell /sbin/nologin \ --home-dir /var/lib/zabbix/ \ @@ -43,29 +73,6 @@ RUN set -eux && \ mkdir -p /etc/zabbix/web && \ mkdir -p /etc/zabbix/web/certs && \ 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/php-fpm.d/www.conf && \ cd /usr/share/zabbix/ && \ @@ -77,23 +84,20 @@ RUN set -eux && \ ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \ ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ - chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \ - chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \ + chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ + chmod -R g=u /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chown --quiet -R zabbix:root /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 && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ - chown --quiet -R zabbix:root /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 \ - findutils \ - glibc-locale-source && \ + findutils \ + glibc-locale-source && \ microdnf -y clean all && \ 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 diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile index 3ce8305b0..6974715c5 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile @@ -2,7 +2,6 @@ ARG MAJOR_VERSION=5.0 ARG ZBX_VERSION=${MAJOR_VERSION}.17 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 @@ -10,19 +9,20 @@ FROM ubuntu:focal ARG MAJOR_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)" \ - org.opencontainers.image.authors="Alexey Pustovalov " \ - org.opencontainers.image.vendor="Zabbix LLC" \ - org.opencontainers.image.url="https://zabbix.com/" \ +LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ 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.version="${ZBX_VERSION}" \ - org.opencontainers.image.source="${ZBX_SOURCES}" + org.opencontainers.image.licenses="GPL v2.0" \ + 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 @@ -31,24 +31,29 @@ COPY ["conf/etc/", "/etc/"] RUN set -eux && \ echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \ - 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 && \ + INSTALL_PKGS="bash \ + ca-certificates \ + curl \ + nginx \ + locales \ + php7.4-bcmath \ + php7.4-fpm \ + php7.4-gd \ + php7.4-json \ + php7.4-ldap \ + php7.4-mbstring \ + php7.4-xml \ + php7.4-pgsql \ + postgresql-client \ + supervisor" && \ + INSTALL_TEMP_PKGS="gpg \ + ca-certificates \ + dirmngr \ + gpg-agent" && \ apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \ - gpg \ - dirmngr \ - gpg-agent \ - ca-certificates && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + --no-install-recommends install \ + ${INSTALL_TEMP_PKGS} && \ NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \ found=''; \ for server in \ @@ -64,27 +69,33 @@ RUN set -eux && \ 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 && \ apt-get -y update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends \ - -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install \ - curl \ - nginx \ - locales \ - php7.4-bcmath \ - php7.4-fpm \ - php7.4-gd \ - php7.4-json \ - php7.4-ldap \ - php7.4-mbstring \ - php7.4-xml \ - php7.4-pgsql \ - postgresql-client \ - supervisor && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + --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 && \ + mkdir -p /var/lib/php/session && \ rm -f /etc/nginx/conf.d/*.conf && \ rm -rf /var/cache/nginx/ && \ rm -f /etc/php/7.4/fpm/pool.d/www.conf && \ ln -sf /dev/fd/2 /var/log/nginx/error.log && \ 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/ && \ rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \ rm -rf tests && \ @@ -96,8 +107,8 @@ RUN set -eux && \ mkdir -p /var/lib/locales/supported.d/ && \ rm -f /var/lib/locales/supported.d/local && \ cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \ - cut -d"'" -f 2 | sort | \ - xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ + cut -d"'" -f 2 | sort | \ + xargs -I '{}' bash -c 'echo "{}.UTF-8 UTF-8" >> /var/lib/locales/supported.d/local' && \ dpkg-reconfigure locales && \ chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/modules/ && \ @@ -108,6 +119,11 @@ RUN set -eux && \ chown --quiet -R zabbix:root /var/lib/php/session/ && \ chgrp -R 0 /var/lib/php/session/ && \ chmod -R g=u /var/lib/php/session/ && \ + DEBIAN_FRONTEND=noninteractive apt-get -y \ + purge \ + gpg \ + dirmngr \ + gpg-agent && \ apt-get -y autoremove && \ apt-get -y clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfiles/zabbix-appliance/rhel/Dockerfile b/Dockerfiles/zabbix-appliance/rhel/Dockerfile index b9c7b6865..9b2202be1 100644 --- a/Dockerfiles/zabbix-appliance/rhel/Dockerfile +++ b/Dockerfiles/zabbix-appliance/rhel/Dockerfile @@ -1,12 +1,12 @@ FROM registry.access.redhat.com/ubi8/ubi -MAINTAINER Alexey Pustovalov ARG MAJOR_VERSION=5.0 ARG RELEASE=17 ARG ZBX_VERSION=${MAJOR_VERSION}.17 - 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 LABEL name="zabbix/zabbix-appliance" \ diff --git a/build.sh b/build.sh index 6d1adb33d..ac91923da 100755 --- a/build.sh +++ b/build.sh @@ -37,7 +37,16 @@ else VCS_REF=$MAJOR_VERSION.$MINOR_VERSION fi -DOCKER_BUILDKIT=1 docker build -t zabbix-$app_component:$os-$version --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -f Dockerfile . +if hash docker 2>/dev/null; then + exec_command='docker' +elif hash podman 2>/dev/null; then + exec_command='podman' +else + echo >&2 "Build command requires docker or podman. Aborting."; + exit 1; +fi + +DOCKER_BUILDKIT=1 $exec_command build -t zabbix-$app_component:$os-$version --build-arg VCS_REF="$VCS_REF" --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -f Dockerfile . if [ "$type" != "build" ]; then links="" @@ -47,15 +56,15 @@ if [ "$type" != "build" ]; then links="$links --link mysql-server:mysql" env_vars="$env_vars -e MYSQL_DATABASE=\"zabbix\" -e MYSQL_USER=\"zabbix\" -e MYSQL_PASSWORD=\"zabbix\" -e MYSQL_RANDOM_ROOT_PASSWORD=true" - docker rm -f mysql-server - docker run --name mysql-server -t $env_vars -d mysql:5.7 + $exec_command rm -f mysql-server + $exec_command run --name mysql-server -t $env_vars -d mysql:5.7 fi if [ "$links" != "" ]; then sleep 5 fi - docker rm -f zabbix-$app_component + $exec_command rm -f zabbix-$app_component - docker run --name zabbix-$app_component -t -d $links $env_vars zabbix-$app_component:$os-$version -fi \ No newline at end of file + $exec_command run --name zabbix-$app_component -t -d $links $env_vars zabbix-$app_component:$os-$version +fi diff --git a/docker-compose_v3_alpine_mysql_local.yaml b/docker-compose_v3_alpine_mysql_local.yaml index 9f3e87bec..a782bb9f7 100644 --- a/docker-compose_v3_alpine_mysql_local.yaml +++ b/docker-compose_v3_alpine_mysql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:alpine-local image: zabbix-build-sqlite3:alpine-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_alpine_pgsql_local.yaml b/docker-compose_v3_alpine_pgsql_local.yaml index 91d2a473c..b661ad3a3 100644 --- a/docker-compose_v3_alpine_pgsql_local.yaml +++ b/docker-compose_v3_alpine_pgsql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:alpine-local image: zabbix-build-mysql:alpine-local + profiles: + - all depends_on: - zabbix-build-base @@ -37,6 +39,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:alpine-local image: zabbix-build-sqlite3:alpine-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_centos_mysql_local.yaml b/docker-compose_v3_centos_mysql_local.yaml index fdb25fd8a..312351361 100644 --- a/docker-compose_v3_centos_mysql_local.yaml +++ b/docker-compose_v3_centos_mysql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:centos-local image: zabbix-build-sqlite3:centos-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_centos_pgsql_local.yaml b/docker-compose_v3_centos_pgsql_local.yaml index 2be0ce7a2..e7b422527 100644 --- a/docker-compose_v3_centos_pgsql_local.yaml +++ b/docker-compose_v3_centos_pgsql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:centos-local image: zabbix-build-mysql:centos-local + profiles: + - all depends_on: - zabbix-build-base @@ -37,6 +39,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:centos-local image: zabbix-build-sqlite3:centos-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_ol_mysql_local.yaml b/docker-compose_v3_ol_mysql_local.yaml index 1bfd0ed37..b5700e804 100644 --- a/docker-compose_v3_ol_mysql_local.yaml +++ b/docker-compose_v3_ol_mysql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ol-local image: zabbix-build-sqlite3:ol-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_ol_pgsql_local.yaml b/docker-compose_v3_ol_pgsql_local.yaml index caeb332c6..e1c28a3f5 100644 --- a/docker-compose_v3_ol_pgsql_local.yaml +++ b/docker-compose_v3_ol_pgsql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ol-local image: zabbix-build-mysql:ol-local + profiles: + - all depends_on: - zabbix-build-base @@ -37,6 +39,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ol-local image: zabbix-build-sqlite3:ol-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_ubuntu_mysql_local.yaml b/docker-compose_v3_ubuntu_mysql_local.yaml index 22245fc7d..5efa3af63 100644 --- a/docker-compose_v3_ubuntu_mysql_local.yaml +++ b/docker-compose_v3_ubuntu_mysql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ubuntu-local image: zabbix-build-sqlite3:ubuntu-local + profiles: + - all depends_on: - zabbix-build-base diff --git a/docker-compose_v3_ubuntu_pgsql_local.yaml b/docker-compose_v3_ubuntu_pgsql_local.yaml index 0be97fb3c..b00c68b87 100644 --- a/docker-compose_v3_ubuntu_pgsql_local.yaml +++ b/docker-compose_v3_ubuntu_pgsql_local.yaml @@ -26,6 +26,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ubuntu-local image: zabbix-build-mysql:ubuntu-local + profiles: + - all depends_on: - zabbix-build-base @@ -37,6 +39,8 @@ services: args: BUILD_BASE_IMAGE: zabbix-build-base:ubuntu-local image: zabbix-build-sqlite3:ubuntu-local + profiles: + - all depends_on: - zabbix-build-base