mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-20 09:57:43 +02:00
Dedicated build environment for Oracle Linux based images
This commit is contained in:
parent
9b847d6ff6
commit
2b7d26b4ca
@ -41,6 +41,7 @@ RUN set -eux && \
|
|||||||
zlib \
|
zlib \
|
||||||
tzdata \
|
tzdata \
|
||||||
openssl-libs && \
|
openssl-libs && \
|
||||||
|
dnf -y upgrade && \
|
||||||
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \
|
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}" -o /sbin/tini && \
|
||||||
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \
|
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH_SUFFIX}.asc" -o /tmp/tini.asc && \
|
||||||
export GNUPGHOME="$(mktemp -d)" && \
|
export GNUPGHOME="$(mktemp -d)" && \
|
||||||
|
@ -1,14 +1,35 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix agent" \
|
LABEL org.opencontainers.image.title="Zabbix agent" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd", "/usr/sbin/zabbix_agentd"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agentd.conf"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -36,70 +57,18 @@ RUN set -eux && \
|
|||||||
libcurl \
|
libcurl \
|
||||||
openssl-libs \
|
openssl-libs \
|
||||||
zlib" && \
|
zlib" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && REPOLIST="ol8_baseos_latest,ol8_appstream" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
make \
|
|
||||||
openssl-devel \
|
|
||||||
openldap-devel \
|
|
||||||
git \
|
|
||||||
gcc" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-agent \
|
|
||||||
--with-libcurl \
|
|
||||||
--with-ldap \
|
|
||||||
--with-openssl \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd /usr/sbin/zabbix_agentd && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
dnf -y history undo last && \
|
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
microdnf -y clean all && \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,35 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix agent 2" \
|
LABEL org.opencontainers.image.title="Zabbix agent 2" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
org.opencontainers.image.description="Zabbix agent 2 is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -26,9 +47,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/buffer && \
|
mkdir -p /var/lib/zabbix/buffer && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
INSTALL_PKGS="bash \
|
INSTALL_PKGS="bash \
|
||||||
tini \
|
tini \
|
||||||
tzdata \
|
tzdata \
|
||||||
@ -36,99 +54,18 @@ RUN set -eux && \
|
|||||||
pcre \
|
pcre \
|
||||||
libcurl \
|
libcurl \
|
||||||
openssl-libs" && \
|
openssl-libs" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && REPOLIST="ol8_baseos_latest,ol8_appstream" && \
|
|
||||||
PATH=/usr/local/go/bin:$PATH && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
make \
|
|
||||||
openssl-devel \
|
|
||||||
openldap-devel \
|
|
||||||
git \
|
|
||||||
wget \
|
|
||||||
tar \
|
|
||||||
gcc" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
|
||||||
case "$ARCH_SUFFIX" in \
|
|
||||||
x86_64) \
|
|
||||||
url='https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz'; \
|
|
||||||
sha256='dab7d9c34361dc21ec237d584590d72500652e7c909bf082758fb63064fca0ef'; \
|
|
||||||
;; \
|
|
||||||
aarch64) \
|
|
||||||
url='https://dl.google.com/go/go1.17.1.linux-arm64.tar.gz'; \
|
|
||||||
sha256='53b29236fa03ed862670a5e5e2ab2439a2dc288fe61544aa392062104ac0128c'; \
|
|
||||||
;; \
|
|
||||||
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
|
||||||
esac; \
|
|
||||||
wget -O go.tgz.asc "$url.asc" && \
|
|
||||||
wget -O go.tgz "$url" --progress=dot:giga && \
|
|
||||||
echo "$sha256 *go.tgz" | sha256sum -c - && \
|
|
||||||
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
|
|
||||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796' && \
|
|
||||||
gpg --batch --verify go.tgz.asc go.tgz && \
|
|
||||||
gpgconf --kill all && \
|
|
||||||
rm -rf "$GNUPGHOME" go.tgz.asc && \
|
|
||||||
tar -C /usr/local -xzf go.tgz && \
|
|
||||||
rm go.tgz && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
export GOPATH=/tmp/zabbix-${ZBX_VERSION}/go && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--with-openssl \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--enable-agent2 \
|
|
||||||
--enable-agent \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 /usr/sbin/zabbix_agent2 && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf /etc/zabbix/zabbix_agent2.conf && \
|
|
||||||
strip /usr/sbin/zabbix_agent2 && \
|
|
||||||
strip /usr/bin/zabbix_get && \
|
|
||||||
strip /usr/bin/zabbix_sender && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
rm -rf /usr/local/go/ && \
|
|
||||||
dnf -y history undo last && \
|
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
microdnf -y clean all && \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
1
build-base/ol/.dockerignore
Normal file
1
build-base/ol/.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
build.sh
|
76
build-base/ol/Dockerfile
Normal file
76
build-base/ol/Dockerfile
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
PATH=/usr/local/go/bin:$PATH
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.title="Zabbix build base" \
|
||||||
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix images" \
|
||||||
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
|
RUN set -eux && \
|
||||||
|
microdnf -y module enable mysql && \
|
||||||
|
INSTALL_PKGS="autoconf \
|
||||||
|
automake \
|
||||||
|
bash \
|
||||||
|
gcc \
|
||||||
|
pcre-devel \
|
||||||
|
libcurl-devel \
|
||||||
|
libevent-devel \
|
||||||
|
libssh-devel \
|
||||||
|
libxml2-devel \
|
||||||
|
openssl-devel \
|
||||||
|
openldap-devel \
|
||||||
|
make \
|
||||||
|
mysql-devel \
|
||||||
|
net-snmp-devel \
|
||||||
|
OpenIPMI-devel \
|
||||||
|
openldap-devel \
|
||||||
|
sqlite-devel \
|
||||||
|
postgresql-devel \
|
||||||
|
java-1.8.0-openjdk-devel \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
tar \
|
||||||
|
gettext \
|
||||||
|
unixODBC-devel" && \
|
||||||
|
microdnf -y install \
|
||||||
|
--disablerepo "*" \
|
||||||
|
--enablerepo "ol8_baseos_latest" \
|
||||||
|
--enablerepo "ol8_appstream" \
|
||||||
|
--enablerepo "ol8_codeready_builder" \
|
||||||
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
|
case "$ARCH_SUFFIX" in \
|
||||||
|
x86_64) \
|
||||||
|
url='https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz'; \
|
||||||
|
sha256='dab7d9c34361dc21ec237d584590d72500652e7c909bf082758fb63064fca0ef'; \
|
||||||
|
;; \
|
||||||
|
aarch64) \
|
||||||
|
url='https://dl.google.com/go/go1.17.1.linux-arm64.tar.gz'; \
|
||||||
|
sha256='53b29236fa03ed862670a5e5e2ab2439a2dc288fe61544aa392062104ac0128c'; \
|
||||||
|
;; \
|
||||||
|
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
|
||||||
|
esac; \
|
||||||
|
wget -O go.tgz.asc "$url.asc" && \
|
||||||
|
wget -O go.tgz "$url" --progress=dot:giga && \
|
||||||
|
echo "$sha256 *go.tgz" | sha256sum -c - && \
|
||||||
|
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \
|
||||||
|
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796' && \
|
||||||
|
gpg --batch --verify go.tgz.asc go.tgz && \
|
||||||
|
gpgconf --kill all && \
|
||||||
|
rm -rf "$GNUPGHOME" go.tgz.asc && \
|
||||||
|
tar -C /usr/local -xzf go.tgz && \
|
||||||
|
rm go.tgz
|
1
build-base/ol/build.sh
Symbolic link
1
build-base/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../build.sh
|
6
build-base/ol/conf/etc/yum.repos.d/oracle-epel-ol8.repo
Normal file
6
build-base/ol/conf/etc/yum.repos.d/oracle-epel-ol8.repo
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[ol8_developer_EPEL]
|
||||||
|
name=Oracle Linux $releasever EPEL Packages for Development ($basearch)
|
||||||
|
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/developer/EPEL/$basearch/
|
||||||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||||
|
gpgcheck=1
|
||||||
|
enabled=0
|
1
build-mysql/ol/.dockerignore
Normal file
1
build-mysql/ol/.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
build.sh
|
70
build-mysql/ol/Dockerfile
Normal file
70
build-mysql/ol/Dockerfile
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
|
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 <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.description="Zabbix build base for MySQL based images" \
|
||||||
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
|
RUN set -eux && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/zabbix_java/src/com/zabbix/gateway/GeneralInformation.java && \
|
||||||
|
./bootstrap.sh && \
|
||||||
|
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
||||||
|
./configure \
|
||||||
|
--datadir=/usr/lib \
|
||||||
|
--libdir=/usr/lib/zabbix \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc/zabbix \
|
||||||
|
--enable-agent \
|
||||||
|
--enable-agent2 \
|
||||||
|
--enable-server \
|
||||||
|
--enable-proxy \
|
||||||
|
--enable-webservice \
|
||||||
|
--with-mysql \
|
||||||
|
--with-ldap \
|
||||||
|
--with-libcurl \
|
||||||
|
--with-libxml2 \
|
||||||
|
--enable-java \
|
||||||
|
--with-net-snmp \
|
||||||
|
--with-openipmi \
|
||||||
|
--with-openssl \
|
||||||
|
--with-ssh \
|
||||||
|
--with-unixodbc \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--silent && \
|
||||||
|
make -j"$(nproc)" -s dbschema && \
|
||||||
|
make -j"$(nproc)" -s && \
|
||||||
|
make -j"$(nproc)" -s gettext && \
|
||||||
|
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||||
|
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||||
|
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||||
|
gzip -c database/mysql/create.sql > database/mysql/create_server.sql.gz && \
|
||||||
|
rm -rf database/mysql/create.sql && \
|
||||||
|
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||||
|
gzip -c database/mysql/create.sql > database/mysql/create_proxy.sql.gz && \
|
||||||
|
rm -rf database/mysql/create.sql && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
1
build-mysql/ol/build.sh
Symbolic link
1
build-mysql/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../build.sh
|
1
build-pgsql/ol/.dockerignore
Normal file
1
build-pgsql/ol/.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
build.sh
|
71
build-pgsql/ol/Dockerfile
Normal file
71
build-pgsql/ol/Dockerfile
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
|
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 <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \
|
||||||
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
|
RUN set -eux && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/zabbix_java/src/com/zabbix/gateway/GeneralInformation.java && \
|
||||||
|
./bootstrap.sh && \
|
||||||
|
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
||||||
|
./configure \
|
||||||
|
--datadir=/usr/lib \
|
||||||
|
--libdir=/usr/lib/zabbix \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc/zabbix \
|
||||||
|
--enable-agent \
|
||||||
|
--enable-agent2 \
|
||||||
|
--enable-server \
|
||||||
|
--enable-proxy \
|
||||||
|
--enable-webservice \
|
||||||
|
--with-postgresql \
|
||||||
|
--with-ldap \
|
||||||
|
--with-libcurl \
|
||||||
|
--with-libxml2 \
|
||||||
|
--enable-java \
|
||||||
|
--with-net-snmp \
|
||||||
|
--with-openipmi \
|
||||||
|
--with-openssl \
|
||||||
|
--with-ssh \
|
||||||
|
# --with-libmodbus \
|
||||||
|
--with-unixodbc \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--silent && \
|
||||||
|
make -j"$(nproc)" -s dbschema && \
|
||||||
|
make -j"$(nproc)" -s && \
|
||||||
|
make -j"$(nproc)" -s gettext && \
|
||||||
|
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||||
|
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||||
|
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||||
|
gzip -c database/postgresql/create.sql > database/postgresql/create_server.sql.gz && \
|
||||||
|
rm -rf database/postgresql/create.sql && \
|
||||||
|
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||||
|
gzip -c database/postgresql/create.sql > database/postgresql/create_proxy.sql.gz && \
|
||||||
|
rm -rf database/postgresql/create.sql && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
1
build-pgsql/ol/build.sh
Symbolic link
1
build-pgsql/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../build.sh
|
@ -9,19 +9,19 @@ ARG MAJOR_VERSION
|
|||||||
ARG ZBX_VERSION
|
ARG ZBX_VERSION
|
||||||
ARG ZBX_SOURCES
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
LABEL org.opencontainers.image.title="Zabbix build base (SQLite3)" \
|
||||||
org.opencontainers.image.version="${ZBX_VERSION}" \
|
|
||||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
|
||||||
org.opencontainers.image.title="Zabbix build base (SQLite3)" \
|
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
|
org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.licenses="GPL v2.0" \
|
||||||
|
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
|
cd /tmp/ && \
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
ls -lah /tmp/ && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
1
build-sqlite3/ol/.dockerignore
Normal file
1
build-sqlite3/ol/.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
build.sh
|
58
build-sqlite3/ol/Dockerfile
Normal file
58
build-sqlite3/ol/Dockerfile
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-base:ol-${ZBX_VERSION}
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.title="Zabbix build base (SQLite3)" \
|
||||||
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
|
RUN set -eux && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||||
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
||||||
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/zabbix_java/src/com/zabbix/gateway/GeneralInformation.java && \
|
||||||
|
./bootstrap.sh && \
|
||||||
|
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
||||||
|
./configure \
|
||||||
|
--datadir=/usr/lib \
|
||||||
|
--libdir=/usr/lib/zabbix \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc/zabbix \
|
||||||
|
--enable-agent \
|
||||||
|
--enable-agent2 \
|
||||||
|
--enable-proxy \
|
||||||
|
--with-sqlite3 \
|
||||||
|
--with-ldap \
|
||||||
|
--with-libcurl \
|
||||||
|
--with-libxml2 \
|
||||||
|
--enable-java \
|
||||||
|
--with-net-snmp \
|
||||||
|
--with-openipmi \
|
||||||
|
--with-openssl \
|
||||||
|
--with-ssh \
|
||||||
|
--with-unixodbc \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--silent && \
|
||||||
|
make -j"$(nproc)" -s dbschema && \
|
||||||
|
make -j"$(nproc)" -s && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2 && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||||
|
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender
|
1
build-sqlite3/ol/build.sh
Symbolic link
1
build-sqlite3/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../build.sh
|
@ -1,10 +1,41 @@
|
|||||||
version: '3.5'
|
version: '3.5'
|
||||||
services:
|
services:
|
||||||
|
zabbix-build-base:
|
||||||
|
build:
|
||||||
|
context: ./build-base/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
image: zabbix-build-base:ol-local
|
||||||
|
|
||||||
|
zabbix-build-mysql:
|
||||||
|
build:
|
||||||
|
context: ./build-mysql/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-base:ol-local
|
||||||
|
image: zabbix-build-mysql:ol-local
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-base
|
||||||
|
|
||||||
|
zabbix-build-sqlite3:
|
||||||
|
build:
|
||||||
|
context: ./build-sqlite3/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-base:ol-local
|
||||||
|
image: zabbix-build-sqlite3:ol-local
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-base
|
||||||
|
|
||||||
zabbix-server:
|
zabbix-server:
|
||||||
build:
|
build:
|
||||||
context: ./server-mysql/ol
|
context: ./server-mysql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-server-mysql:ol-local
|
image: zabbix-server-mysql:ol-local
|
||||||
ports:
|
ports:
|
||||||
- "10051:10051"
|
- "10051:10051"
|
||||||
@ -44,6 +75,7 @@ services:
|
|||||||
# - root-ca.pem
|
# - root-ca.pem
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql-server
|
- mysql-server
|
||||||
|
- zabbix-build-mysql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -72,6 +104,8 @@ services:
|
|||||||
context: ./proxy-sqlite3/ol
|
context: ./proxy-sqlite3/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-sqlite3:ol-local
|
||||||
image: zabbix-proxy-sqlite3:ol-local
|
image: zabbix-proxy-sqlite3:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -105,6 +139,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- zabbix-java-gateway
|
- zabbix-java-gateway
|
||||||
- zabbix-snmptraps
|
- zabbix-snmptraps
|
||||||
|
- zabbix-build-sqlite3
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -125,6 +160,8 @@ services:
|
|||||||
context: ./proxy-mysql/ol
|
context: ./proxy-mysql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-proxy-mysql:ol-local
|
image: zabbix-proxy-mysql:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -160,6 +197,7 @@ services:
|
|||||||
- mysql-server
|
- mysql-server
|
||||||
- zabbix-java-gateway
|
- zabbix-java-gateway
|
||||||
- zabbix-snmptraps
|
- zabbix-snmptraps
|
||||||
|
- zabbix-build-mysql
|
||||||
secrets:
|
secrets:
|
||||||
- MYSQL_USER
|
- MYSQL_USER
|
||||||
- MYSQL_PASSWORD
|
- MYSQL_PASSWORD
|
||||||
@ -187,6 +225,8 @@ services:
|
|||||||
context: ./web-apache-mysql/ol
|
context: ./web-apache-mysql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-web-apache-mysql:ol-local
|
image: zabbix-web-apache-mysql:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -218,6 +258,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mysql-server
|
- mysql-server
|
||||||
- zabbix-server
|
- zabbix-server
|
||||||
|
- zabbix-build-mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -247,6 +288,8 @@ services:
|
|||||||
context: ./web-nginx-mysql/ol
|
context: ./web-nginx-mysql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-web-nginx-mysql:ol-local
|
image: zabbix-web-nginx-mysql:ol-local
|
||||||
ports:
|
ports:
|
||||||
- "80:8080"
|
- "80:8080"
|
||||||
@ -276,6 +319,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mysql-server
|
- mysql-server
|
||||||
- zabbix-server
|
- zabbix-server
|
||||||
|
- zabbix-build-mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -305,6 +349,8 @@ services:
|
|||||||
context: ./agent/ol
|
context: ./agent/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-agent:ol-local
|
image: zabbix-agent:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -331,6 +377,8 @@ services:
|
|||||||
- .env_agent
|
- .env_agent
|
||||||
privileged: true
|
privileged: true
|
||||||
pid: "host"
|
pid: "host"
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-mysql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -349,6 +397,8 @@ services:
|
|||||||
context: ./java-gateway/ol
|
context: ./java-gateway/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-java-gateway:ol-local
|
image: zabbix-java-gateway:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -365,6 +415,8 @@ services:
|
|||||||
memory: 256M
|
memory: 256M
|
||||||
env_file:
|
env_file:
|
||||||
- .env_java
|
- .env_java
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-mysql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -415,6 +467,8 @@ services:
|
|||||||
context: ./web-service/ol
|
context: ./web-service/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-web-service:ol-local
|
image: zabbix-web-service:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -435,6 +489,8 @@ services:
|
|||||||
memory: 256M
|
memory: 256M
|
||||||
env_file:
|
env_file:
|
||||||
- .env_web_service
|
- .env_web_service
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-mysql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -1,10 +1,52 @@
|
|||||||
version: '3.5'
|
version: '3.5'
|
||||||
services:
|
services:
|
||||||
|
zabbix-build-base:
|
||||||
|
build:
|
||||||
|
context: ./build-base/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
image: zabbix-build-base:ol-local
|
||||||
|
|
||||||
|
zabbix-build-pgsql:
|
||||||
|
build:
|
||||||
|
context: ./build-pgsql/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-base:ol-local
|
||||||
|
image: zabbix-build-pgsql:ol-local
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-base
|
||||||
|
|
||||||
|
zabbix-build-mysql:
|
||||||
|
build:
|
||||||
|
context: ./build-mysql/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-base:ol-local
|
||||||
|
image: zabbix-build-mysql:ol-local
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-base
|
||||||
|
|
||||||
|
zabbix-build-sqlite3:
|
||||||
|
build:
|
||||||
|
context: ./build-sqlite3/ol
|
||||||
|
cache_from:
|
||||||
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-base:ol-local
|
||||||
|
image: zabbix-build-sqlite3:ol-local
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-base
|
||||||
|
|
||||||
zabbix-server:
|
zabbix-server:
|
||||||
build:
|
build:
|
||||||
context: ./server-pgsql/ol
|
context: ./server-pgsql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-server-pgsql:ol-local
|
image: zabbix-server-pgsql:ol-local
|
||||||
ports:
|
ports:
|
||||||
- "10051:10051"
|
- "10051:10051"
|
||||||
@ -43,6 +85,7 @@ services:
|
|||||||
- POSTGRES_PASSWORD
|
- POSTGRES_PASSWORD
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres-server
|
- postgres-server
|
||||||
|
- zabbix-build-pgsql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -71,6 +114,8 @@ services:
|
|||||||
context: ./proxy-sqlite3/ol
|
context: ./proxy-sqlite3/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-sqlite3:ol-local
|
||||||
image: zabbix-proxy-sqlite3:ol-local
|
image: zabbix-proxy-sqlite3:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -104,6 +149,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- zabbix-java-gateway
|
- zabbix-java-gateway
|
||||||
- zabbix-snmptraps
|
- zabbix-snmptraps
|
||||||
|
- zabbix-build-sqlite3
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -124,6 +170,8 @@ services:
|
|||||||
context: ./proxy-mysql/ol
|
context: ./proxy-mysql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-mysql:ol-local
|
||||||
image: zabbix-proxy-mysql:ol-local
|
image: zabbix-proxy-mysql:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -163,6 +211,7 @@ services:
|
|||||||
- mysql-server
|
- mysql-server
|
||||||
- zabbix-java-gateway
|
- zabbix-java-gateway
|
||||||
- zabbix-snmptraps
|
- zabbix-snmptraps
|
||||||
|
- zabbix-build-mysql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -183,6 +232,8 @@ services:
|
|||||||
context: ./web-apache-pgsql/ol
|
context: ./web-apache-pgsql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-web-apache-pgsql:ol-local
|
image: zabbix-web-apache-pgsql:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- all
|
- all
|
||||||
@ -214,6 +265,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres-server
|
- postgres-server
|
||||||
- zabbix-server
|
- zabbix-server
|
||||||
|
- zabbix-build-pgsql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -243,6 +295,8 @@ services:
|
|||||||
context: ./web-nginx-pgsql/ol
|
context: ./web-nginx-pgsql/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-web-nginx-pgsql:ol-local
|
image: zabbix-web-nginx-pgsql:ol-local
|
||||||
ports:
|
ports:
|
||||||
- "80:8080"
|
- "80:8080"
|
||||||
@ -272,6 +326,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres-server
|
- postgres-server
|
||||||
- zabbix-server
|
- zabbix-server
|
||||||
|
- zabbix-build-pgsql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -301,6 +356,8 @@ services:
|
|||||||
context: ./agent/ol
|
context: ./agent/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-agent:ol-local
|
image: zabbix-agent:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -327,6 +384,8 @@ services:
|
|||||||
- .env_agent
|
- .env_agent
|
||||||
privileged: true
|
privileged: true
|
||||||
pid: "host"
|
pid: "host"
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-pgsql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -345,6 +404,8 @@ services:
|
|||||||
context: ./java-gateway/ol
|
context: ./java-gateway/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-java-gateway:ol-local
|
image: zabbix-java-gateway:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -361,6 +422,8 @@ services:
|
|||||||
memory: 256M
|
memory: 256M
|
||||||
env_file:
|
env_file:
|
||||||
- .env_java
|
- .env_java
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-pgsql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
@ -411,6 +474,8 @@ services:
|
|||||||
context: ./web-service/ol
|
context: ./web-service/ol
|
||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:8-slim
|
- oraclelinux:8-slim
|
||||||
|
args:
|
||||||
|
BUILD_BASE_IMAGE: zabbix-build-pgsql:ol-local
|
||||||
image: zabbix-web-service:ol-local
|
image: zabbix-web-service:ol-local
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
@ -431,6 +496,8 @@ services:
|
|||||||
memory: 256M
|
memory: 256M
|
||||||
env_file:
|
env_file:
|
||||||
- .env_web_service
|
- .env_web_service
|
||||||
|
depends_on:
|
||||||
|
- zabbix-build-pgsql
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -1,14 +1,35 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \
|
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin", "/usr/sbin/zabbix_java/bin"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib", "/usr/sbin/zabbix_java/lib"]
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
groupadd --system --gid 1995 zabbix && \
|
groupadd --system --gid 1995 zabbix && \
|
||||||
useradd \
|
useradd \
|
||||||
@ -21,68 +42,20 @@ RUN set -eux && \
|
|||||||
mkdir -p /etc/zabbix/ && \
|
mkdir -p /etc/zabbix/ && \
|
||||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||||
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
mkdir -p /usr/sbin/zabbix_java/ext_lib/ && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
INSTALL_PKGS="java-1.8.0-openjdk-headless \
|
INSTALL_PKGS="java-1.8.0-openjdk-headless \
|
||||||
findutils" && \
|
findutils" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
COPY ["conf/etc/", "/etc/"]
|
|
||||||
|
|
||||||
RUN set -eux && REPOLIST="ol8_baseos_latest,ol8_appstream" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
java-1.8.0-openjdk-devel \
|
|
||||||
make \
|
|
||||||
git \
|
|
||||||
gcc" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/zabbix_java/src/com/zabbix/gateway/GeneralInformation.java && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-java \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
|
||||||
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
|
|
||||||
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
|
|
||||||
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
dnf -y history undo last && \
|
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
|
microdnf -y clean all && \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,38 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG 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)" \
|
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_proxy.sql.gz", "/usr/share/doc/zabbix-proxy-mysql/create.sql.gz"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -33,9 +57,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
microdnf -y module enable mysql && \
|
microdnf -y module enable mysql && \
|
||||||
INSTALL_PKGS="libevent \
|
INSTALL_PKGS="libevent \
|
||||||
tini \
|
tini \
|
||||||
@ -53,88 +74,18 @@ RUN set -eux && \
|
|||||||
pcre \
|
pcre \
|
||||||
zlib \
|
zlib \
|
||||||
unixODBC" && \
|
unixODBC" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
libevent-devel \
|
|
||||||
libssh-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
make \
|
|
||||||
mysql-devel \
|
|
||||||
net-snmp-devel \
|
|
||||||
OpenIPMI-devel \
|
|
||||||
openldap-devel \
|
|
||||||
git \
|
|
||||||
unixODBC-devel" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-agent \
|
|
||||||
--enable-proxy \
|
|
||||||
--with-mysql \
|
|
||||||
--with-ldap \
|
|
||||||
--with-libcurl \
|
|
||||||
--with-libxml2 \
|
|
||||||
--with-net-snmp \
|
|
||||||
--with-openipmi \
|
|
||||||
--with-openssl \
|
|
||||||
--with-ssh \
|
|
||||||
--with-unixodbc \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s dbschema && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \
|
|
||||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
|
||||||
gzip database/mysql/create.sql && \
|
|
||||||
cp database/mysql/create.sql.gz /usr/share/doc/zabbix-proxy-mysql/ && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
dnf -y history undo last && \
|
microdnf -y clean all && \
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,36 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ol-${ZBX_VERSION}
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
FROM oraclelinux:8-slim
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG 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)" \
|
LABEL org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -34,9 +56,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-proxy-sqlite3 && \
|
mkdir -p /usr/share/doc/zabbix-proxy-sqlite3 && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
INSTALL_PKGS="libevent \
|
INSTALL_PKGS="libevent \
|
||||||
tini \
|
tini \
|
||||||
libssh \
|
libssh \
|
||||||
@ -51,88 +70,18 @@ RUN set -eux && \
|
|||||||
pcre \
|
pcre \
|
||||||
zlib \
|
zlib \
|
||||||
unixODBC" && \
|
unixODBC" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
libevent-devel \
|
|
||||||
libssh-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
make \
|
|
||||||
net-snmp-devel \
|
|
||||||
OpenIPMI-devel \
|
|
||||||
openldap-devel \
|
|
||||||
sqlite-devel \
|
|
||||||
git \
|
|
||||||
unixODBC-devel" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-agent \
|
|
||||||
--enable-proxy \
|
|
||||||
--with-sqlite3 \
|
|
||||||
--with-ldap \
|
|
||||||
--with-libcurl \
|
|
||||||
--with-libxml2 \
|
|
||||||
--with-net-snmp \
|
|
||||||
--with-openipmi \
|
|
||||||
--with-openssl \
|
|
||||||
--with-ssh \
|
|
||||||
--with-unixodbc \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s dbschema && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \
|
|
||||||
cat database/sqlite3/schema.sql > database/sqlite3/create.sql && \
|
|
||||||
gzip database/sqlite3/create.sql && \
|
|
||||||
cp database/sqlite3/create.sql.gz /usr/share/doc/zabbix-proxy-sqlite3/ && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
dnf -y history undo last && \
|
microdnf -y clean all && \
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,38 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG 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)" \
|
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
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_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/mysql/create_server.sql.gz", "/usr/share/doc/zabbix-server-mysql/create.sql.gz"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -35,9 +59,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-server-mysql && \
|
mkdir -p /usr/share/doc/zabbix-server-mysql && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
microdnf -y module enable mysql && \
|
microdnf -y module enable mysql && \
|
||||||
INSTALL_PKGS="fping \
|
INSTALL_PKGS="fping \
|
||||||
tini \
|
tini \
|
||||||
@ -48,7 +69,6 @@ RUN set -eux && \
|
|||||||
libevent \
|
libevent \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
libssh \
|
libssh \
|
||||||
systemd \
|
|
||||||
mysql \
|
mysql \
|
||||||
mysql-libs \
|
mysql-libs \
|
||||||
net-snmp-libs \
|
net-snmp-libs \
|
||||||
@ -58,90 +78,18 @@ RUN set -eux && \
|
|||||||
pcre \
|
pcre \
|
||||||
zlib \
|
zlib \
|
||||||
unixODBC" && \
|
unixODBC" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
libevent-devel \
|
|
||||||
libssh-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
make \
|
|
||||||
mysql-devel \
|
|
||||||
net-snmp-devel \
|
|
||||||
OpenIPMI-devel \
|
|
||||||
openldap-devel \
|
|
||||||
git \
|
|
||||||
unixODBC-devel" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--enable-agent \
|
|
||||||
--enable-server \
|
|
||||||
--with-mysql \
|
|
||||||
--with-ldap \
|
|
||||||
--with-libcurl \
|
|
||||||
--with-libxml2 \
|
|
||||||
--with-net-snmp \
|
|
||||||
--with-openipmi \
|
|
||||||
--with-openssl \
|
|
||||||
--with-ssh \
|
|
||||||
--with-unixodbc \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s dbschema && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \
|
|
||||||
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
|
||||||
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
|
||||||
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
|
||||||
gzip database/mysql/create.sql && \
|
|
||||||
cp database/mysql/create.sql.gz /usr/share/doc/zabbix-server-mysql/ && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
dnf -y history undo last && \
|
microdnf -y clean all && \
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,38 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION}
|
||||||
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
FROM oraclelinux:8-slim
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG 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)" \
|
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_server/zabbix_server", "/usr/sbin/zabbix_server"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||||
|
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_server.conf", "/etc/zabbix/zabbix_server.conf"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/create_server.sql.gz", "/usr/share/doc/zabbix-server-postgresql/create.sql.gz"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/database/postgresql/timescaledb.sql", "/usr/share/doc/zabbix-server-postgresql/timescaledb.sql"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -35,9 +59,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
|
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
INSTALL_PKGS="fping \
|
INSTALL_PKGS="fping \
|
||||||
file-libs \
|
file-libs \
|
||||||
tini \
|
tini \
|
||||||
@ -56,94 +77,18 @@ RUN set -eux && \
|
|||||||
postgresql-libs \
|
postgresql-libs \
|
||||||
zlib \
|
zlib \
|
||||||
unixODBC" && \
|
unixODBC" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
microdnf -y clean all && \
|
microdnf -y clean all && \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
pcre-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
libevent-devel \
|
|
||||||
libssh-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
make \
|
|
||||||
net-snmp-devel \
|
|
||||||
OpenIPMI-devel \
|
|
||||||
openldap-devel \
|
|
||||||
postgresql-devel \
|
|
||||||
git \
|
|
||||||
unixODBC-devel" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--enable-agent \
|
|
||||||
--enable-server \
|
|
||||||
--with-postgresql \
|
|
||||||
--with-ldap \
|
|
||||||
--with-libcurl \
|
|
||||||
--with-libxml2 \
|
|
||||||
--with-net-snmp \
|
|
||||||
--with-openipmi \
|
|
||||||
--with-openssl \
|
|
||||||
--with-ssh \
|
|
||||||
--with-unixodbc \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s dbschema && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \
|
|
||||||
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
|
||||||
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
|
||||||
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
|
||||||
gzip database/postgresql/create.sql && \
|
|
||||||
cp database/postgresql/create.sql.gz /usr/share/doc/zabbix-server-postgresql/ && \
|
|
||||||
cp database/postgresql/timescaledb.sql /usr/share/doc/zabbix-server-postgresql/timescaledb.sql && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
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 history undo last && \
|
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
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
|
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
WORKDIR /var/lib/zabbix
|
WORKDIR /var/lib/zabbix
|
||||||
|
@ -1,14 +1,33 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -23,9 +42,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
mkdir -p /etc/zabbix/web/certs && \
|
mkdir -p /etc/zabbix/web/certs && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
microdnf -y module enable mysql && \
|
microdnf -y module enable mysql && \
|
||||||
microdnf -y module enable php:7.4 && \
|
microdnf -y module enable php:7.4 && \
|
||||||
INSTALL_PKGS="curl \
|
INSTALL_PKGS="curl \
|
||||||
@ -41,11 +57,17 @@ RUN set -eux && \
|
|||||||
php-mysqlnd \
|
php-mysqlnd \
|
||||||
php-json \
|
php-json \
|
||||||
php-xml \
|
php-xml \
|
||||||
|
findutils \
|
||||||
|
glibc-locale-source \
|
||||||
supervisor" && \
|
supervisor" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
@ -54,39 +76,7 @@ RUN set -eux && \
|
|||||||
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
"/etc/httpd/conf/httpd.conf" && \
|
"/etc/httpd/conf/httpd.conf" && \
|
||||||
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \
|
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \
|
||||||
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
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
COPY ["conf/etc/", "/etc/"]
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="glibc-locale-source \
|
|
||||||
gettext \
|
|
||||||
findutils \
|
|
||||||
git" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
mkdir /usr/share/zabbix/ && \
|
|
||||||
cp -R /usr/share/zabbix-${ZBX_VERSION}/ui/* /usr/share/zabbix/ && \
|
|
||||||
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
cd /usr/share/zabbix/ && \
|
||||||
./locale/make_mo.sh && \
|
|
||||||
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||||
@ -107,9 +97,10 @@ RUN set -eux && \
|
|||||||
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
||||||
chgrp -R 0 /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 && \
|
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
|
||||||
dnf -y history undo last && \
|
microdnf -y remove \
|
||||||
dnf -y clean all && \
|
findutils \
|
||||||
microdnf -y remove dnf && \
|
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/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,33 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG 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 <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -23,9 +42,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
mkdir -p /etc/zabbix/web/certs && \
|
mkdir -p /etc/zabbix/web/certs && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
microdnf -y module enable php:7.4 && \
|
microdnf -y module enable php:7.4 && \
|
||||||
INSTALL_PKGS="curl \
|
INSTALL_PKGS="curl \
|
||||||
httpd \
|
httpd \
|
||||||
@ -40,11 +56,17 @@ RUN set -eux && \
|
|||||||
php-json \
|
php-json \
|
||||||
php-xml \
|
php-xml \
|
||||||
postgresql \
|
postgresql \
|
||||||
|
findutils \
|
||||||
|
glibc-locale-source \
|
||||||
supervisor" && \
|
supervisor" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -f "/etc/httpd/conf.d/default.conf" && \
|
rm -f "/etc/httpd/conf.d/default.conf" && \
|
||||||
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
rm -f "/etc/httpd/conf.d/ssl.conf" && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
@ -53,39 +75,7 @@ RUN set -eux && \
|
|||||||
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
"/etc/httpd/conf/httpd.conf" && \
|
"/etc/httpd/conf/httpd.conf" && \
|
||||||
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \
|
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \
|
||||||
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
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
COPY ["conf/etc/", "/etc/"]
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="glibc-locale-source \
|
|
||||||
gettext \
|
|
||||||
findutils \
|
|
||||||
git" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
mkdir /usr/share/zabbix/ && \
|
|
||||||
cp -R /usr/share/zabbix-${ZBX_VERSION}/ui/* /usr/share/zabbix/ && \
|
|
||||||
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
cd /usr/share/zabbix/ && \
|
||||||
./locale/make_mo.sh && \
|
|
||||||
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||||
@ -106,9 +96,10 @@ RUN set -eux && \
|
|||||||
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
||||||
chgrp -R 0 /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 && \
|
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
|
||||||
dnf -y history undo last && \
|
microdnf -y remove \
|
||||||
dnf -y clean all && \
|
findutils \
|
||||||
microdnf -y remove dnf && \
|
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/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,33 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -40,46 +59,20 @@ RUN set -eux && \
|
|||||||
php-mysqlnd \
|
php-mysqlnd \
|
||||||
php-json \
|
php-json \
|
||||||
php-xml \
|
php-xml \
|
||||||
|
findutils \
|
||||||
|
glibc-locale-source \
|
||||||
supervisor" && \
|
supervisor" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -f /etc/nginx/conf.d/*.conf && \
|
rm -f /etc/nginx/conf.d/*.conf && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
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
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
COPY ["conf/etc/", "/etc/"]
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="glibc-locale-source \
|
|
||||||
gettext \
|
|
||||||
findutils \
|
|
||||||
git" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
mkdir /usr/share/zabbix/ && \
|
|
||||||
cp -R /usr/share/zabbix-${ZBX_VERSION}/ui/* /usr/share/zabbix/ && \
|
|
||||||
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
cd /usr/share/zabbix/ && \
|
||||||
./locale/make_mo.sh && \
|
|
||||||
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||||
@ -100,9 +93,10 @@ RUN set -eux && \
|
|||||||
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
||||||
chgrp -R 0 /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 && \
|
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
|
||||||
dnf -y history undo last && \
|
microdnf -y remove \
|
||||||
dnf -y clean all && \
|
findutils \
|
||||||
microdnf -y remove dnf && \
|
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/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,33 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
ARG MAJOR_VERSION=6.0
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG BUILD_BASE_IMAGE=zabbix-build-pgsql:ol-${ZBX_VERSION}
|
||||||
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
|
|
||||||
|
FROM ${BUILD_BASE_IMAGE} as builder
|
||||||
|
|
||||||
FROM oraclelinux:8-slim
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.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}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/ui", "/usr/share/zabbix"]
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -24,9 +43,6 @@ RUN set -eux && \
|
|||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
mkdir -p /etc/zabbix/web/certs && \
|
mkdir -p /etc/zabbix/web/certs && \
|
||||||
mkdir -p /var/lib/php/session && \
|
mkdir -p /var/lib/php/session && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
microdnf -y module enable php:7.4 && \
|
microdnf -y module enable php:7.4 && \
|
||||||
INSTALL_PKGS="supervisor \
|
INSTALL_PKGS="supervisor \
|
||||||
curl \
|
curl \
|
||||||
@ -39,46 +55,20 @@ RUN set -eux && \
|
|||||||
php-mbstring \
|
php-mbstring \
|
||||||
php-pgsql \
|
php-pgsql \
|
||||||
php-json \
|
php-json \
|
||||||
|
findutils \
|
||||||
|
glibc-locale-source \
|
||||||
php-xml" && \
|
php-xml" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
|
--best \
|
||||||
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -f /etc/nginx/conf.d/*.conf && \
|
rm -f /etc/nginx/conf.d/*.conf && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
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
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
COPY ["conf/etc/", "/etc/"]
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream,ol8_codeready_builder" && \
|
|
||||||
INSTALL_PKGS="glibc-locale-source \
|
|
||||||
gettext \
|
|
||||||
findutils \
|
|
||||||
git" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
mkdir /usr/share/zabbix/ && \
|
|
||||||
cp -R /usr/share/zabbix-${ZBX_VERSION}/ui/* /usr/share/zabbix/ && \
|
|
||||||
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
cd /usr/share/zabbix/ && \
|
||||||
./locale/make_mo.sh && \
|
|
||||||
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
rm -f locale/add_new_language.sh locale/update_po.sh locale/make_mo.sh && \
|
||||||
@ -99,9 +89,10 @@ RUN set -eux && \
|
|||||||
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
chown --quiet -R zabbix:root /usr/share/zabbix/include/defines.inc.php && \
|
||||||
chgrp -R 0 /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 && \
|
chmod -R g=u /usr/share/zabbix/include/defines.inc.php && \
|
||||||
dnf -y history undo last && \
|
microdnf -y remove \
|
||||||
dnf -y clean all && \
|
findutils \
|
||||||
microdnf -y remove dnf && \
|
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/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
@ -1,14 +1,31 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
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
|
FROM oraclelinux:8-slim
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION
|
||||||
|
ARG ZBX_VERSION
|
||||||
|
ARG ZBX_SOURCES
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Zabbix web service" \
|
LABEL org.opencontainers.image.title="Zabbix web service" \
|
||||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
org.opencontainers.image.url="https://zabbix.com/" \
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
org.opencontainers.image.description="Zabbix web servce for performing various tasks using headless web browser" \
|
org.opencontainers.image.description="Zabbix web servce for performing various tasks using headless web browser" \
|
||||||
org.opencontainers.image.licenses="GPL v2.0"
|
org.opencontainers.image.licenses="GPL v2.0" \
|
||||||
|
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service", "/usr/sbin/zabbix_web_service"]
|
||||||
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf", "/etc/zabbix/zabbix_web_service.conf"]
|
||||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
@ -23,68 +40,21 @@ RUN set -eux && \
|
|||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /etc/yum/vars/ && \
|
|
||||||
echo "" > /etc/yum/vars/ociregion && \
|
|
||||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
|
||||||
INSTALL_PKGS="chromium \
|
INSTALL_PKGS="chromium \
|
||||||
openssl-libs \
|
openssl-libs \
|
||||||
zlib" && \
|
zlib" && \
|
||||||
microdnf -y --disablerepo="*" --enablerepo="ol8_baseos_latest" \
|
microdnf -y install \
|
||||||
|
--disablerepo="*" \
|
||||||
|
--enablerepo="ol8_baseos_latest" \
|
||||||
--enablerepo="ol8_appstream" \
|
--enablerepo="ol8_appstream" \
|
||||||
--enablerepo="ol8_developer_EPEL" \
|
--enablerepo="ol8_developer_EPEL" \
|
||||||
install --setopt=install_weak_deps=0 --best --nodocs ${INSTALL_PKGS} && \
|
--setopt=install_weak_deps=0 \
|
||||||
microdnf -y clean all && \
|
--best \
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
--nodocs ${INSTALL_PKGS} && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=6.0
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|
||||||
|
|
||||||
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
REPOLIST="ol8_baseos_latest,ol8_appstream" && \
|
|
||||||
INSTALL_PKGS="autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
make \
|
|
||||||
golang \
|
|
||||||
git" && \
|
|
||||||
microdnf -y install --setopt=install_weak_deps=0 --best \
|
|
||||||
--nodocs dnf && \
|
|
||||||
dnf -y install --disablerepo "*" --enablerepo "${REPOLIST}" --setopt=install_weak_deps=False --best \
|
|
||||||
--setopt=tsflags=nodocs ${INSTALL_PKGS} && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
|
||||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" src/go/pkg/version/version.go && \
|
|
||||||
./bootstrap.sh && \
|
|
||||||
export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \
|
|
||||||
./configure \
|
|
||||||
--datadir=/usr/lib \
|
|
||||||
--libdir=/usr/lib/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc/zabbix \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-webservice \
|
|
||||||
--silent && \
|
|
||||||
make -j"$(nproc)" -s && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service /usr/sbin/zabbix_web_service && \
|
|
||||||
cp /tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_web_service.conf /etc/zabbix/zabbix_web_service.conf && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
dnf -y history undo last && \
|
microdnf -y clean all && \
|
||||||
dnf -y clean all && \
|
|
||||||
microdnf -y remove dnf && \
|
|
||||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||||
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user