Skip to content

Commit

Permalink
Minor design changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Oct 16, 2021
1 parent f263d49 commit 93cbd3d
Show file tree
Hide file tree
Showing 103 changed files with 2,480 additions and 2,263 deletions.
51 changes: 29 additions & 22 deletions Dockerfiles/agent/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:alpine-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git

FROM ${BUILD_BASE_IMAGE} as builder

FROM alpine:3.14

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 <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix 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

Expand All @@ -32,8 +32,25 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]

RUN set -eux && \
addgroup --system --gid 1995 zabbix && \
adduser --system \
INSTALL_PKGS="tini \
bash \
tzdata \
coreutils \
iputils \
pcre \
libcurl \
libmodbus \
libldap" && \
apk add \
--no-cache \
--clean-protected \
${INSTALL_PKGS} && \
addgroup \
--system \
--gid 1995 \
zabbix && \
adduser \
--system \
--gecos "Zabbix monitoring system" \
--disabled-password \
--uid 1997 \
Expand All @@ -47,16 +64,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 \
libmodbus \
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/ && \
Expand Down
13 changes: 0 additions & 13 deletions Dockerfiles/agent/alpine/hooks/build

This file was deleted.

57 changes: 30 additions & 27 deletions Dockerfiles/agent/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:centos-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git

FROM ${BUILD_BASE_IMAGE} as builder

FROM 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 <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix 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

Expand All @@ -32,7 +32,19 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]

RUN set -eux && \
groupadd --system --gid 1995 zabbix && \
REPOLIST="baseos,appstream,epel" && \
INSTALL_PKGS="bash \
tini \
tzdata \
iputils \
pcre \
libcurl-minimal \
openssl-libs \
zlib" && \
groupadd \
--system \
--gid 1995 \
zabbix && \
useradd \
--system --comment "Zabbix monitoring system" \
-g zabbix -G root \
Expand All @@ -45,27 +57,18 @@ 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 \
--disablerepo "*" \
--enablerepo "${REPOLIST}" \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
--best \
${INSTALL_PKGS} && \
dnf -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/ && \
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

Expand Down
13 changes: 0 additions & 13 deletions Dockerfiles/agent/centos/hooks/build

This file was deleted.

61 changes: 33 additions & 28 deletions Dockerfiles/agent/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
ARG MAJOR_VERSION=6.0
ARG ZBX_VERSION=${MAJOR_VERSION}
ARG BUILD_BASE_IMAGE=zabbix-build-mysql:ol-${ZBX_VERSION}
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git

FROM ${BUILD_BASE_IMAGE} as builder

FROM 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 <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.vendor="Zabbix LLC" \
org.opencontainers.image.url="https://zabbix.com/" \
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
org.opencontainers.image.description="Zabbix 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

Expand All @@ -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 \
Expand All @@ -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/ && \
Expand Down
13 changes: 0 additions & 13 deletions Dockerfiles/agent/ol/hooks/build

This file was deleted.

Loading

0 comments on commit 93cbd3d

Please sign in to comment.