mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-30 23:01:05 +02:00
Updated CentOS images
This commit is contained in:
@ -19,7 +19,6 @@ RUN set -eux && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
@ -28,6 +27,7 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
apk add --clean-protected --no-cache \
|
||||
tini \
|
||||
bash \
|
||||
|
@ -14,7 +14,7 @@ Zabbix proxy is a process that may collect monitoring data from one or more moni
|
||||
|
||||
# Zabbix proxy images
|
||||
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.9, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.11, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
|
||||
Zabbix proxy 3.0 (tags: alpine-3.0-latest, ubuntu-3.0-latest, centos-3.0-latest)
|
||||
Zabbix proxy 3.0.* (tags: alpine-3.0.*, ubuntu-3.0.*, centos-3.0.*)
|
||||
|
@ -1,17 +1,71 @@
|
||||
FROM centos:centos7 as builder
|
||||
FROM centos:centos7
|
||||
|
||||
ARG YUM_FLAGS_COMMON="-y"
|
||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||
LABEL org.opencontainers.image.title="Zabbix proxy (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 proxy with SQLite3 database support" \
|
||||
org.opencontainers.image.licenses="GPL v2.0"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
ENV TINI_VERSION=v0.19.0
|
||||
|
||||
RUN set -eux && \
|
||||
groupadd -g 1995 --system zabbix && \
|
||||
adduser -r --shell /sbin/nologin \
|
||||
-g zabbix -G root \
|
||||
-d /var/lib/zabbix/ -u 1997 \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/ssh_keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl && \
|
||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /usr/share/doc/zabbix-proxy-sqlite3 && \
|
||||
yum --quiet makecache && \
|
||||
yum -y install https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm --setopt=tsflags=nodocs && \
|
||||
yum -y install --setopt=tsflags=nodocs \
|
||||
libcurl \
|
||||
libevent \
|
||||
libxml2 \
|
||||
net-snmp-libs \
|
||||
OpenIPMI-libs \
|
||||
openldap \
|
||||
openssl-libs \
|
||||
pcre \
|
||||
unixODBC && \
|
||||
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||
rm -rf /root/.gnupg && \
|
||||
chmod +x /sbin/tini && \
|
||||
yum -y clean all && \
|
||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||
rm -rf /etc/udev/hwdb.bin /root/.pki
|
||||
|
||||
ARG MAJOR_VERSION=5.0
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3
|
||||
|
||||
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 && \
|
||||
yum --quiet makecache && \
|
||||
yum ${YUM_FLAGS_DEV} install \
|
||||
yum -y install --setopt=tsflags=nodocs \
|
||||
autoconf \
|
||||
automake \
|
||||
gcc \
|
||||
@ -39,8 +93,8 @@ RUN set -eux && \
|
||||
--sysconfdir=/etc/zabbix \
|
||||
--prefix=/usr \
|
||||
--enable-agent \
|
||||
--enable-${ZBX_TYPE} \
|
||||
--with-${ZBX_DB_TYPE} \
|
||||
--enable-proxy \
|
||||
--with-sqlite3 \
|
||||
--with-ldap \
|
||||
--with-libcurl \
|
||||
--with-libxml2 \
|
||||
@ -52,84 +106,23 @@ RUN set -eux && \
|
||||
--enable-ipv6 \
|
||||
--silent && \
|
||||
make -j"$(nproc)" -s dbschema && \
|
||||
make -j"$(nproc)" -s && \
|
||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||
gzip database/${ZBX_DB_TYPE}/create.sql
|
||||
|
||||
FROM centos:centos7
|
||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
|
||||
ARG YUM_FLAGS_COMMON="-y"
|
||||
ARG YUM_FLAGS_PERSISTENT="${YUM_FLAGS_COMMON}"
|
||||
|
||||
ARG MAJOR_VERSION=5.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} \
|
||||
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
|
||||
ENV TINI_VERSION v0.18.0
|
||||
|
||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-centos" \
|
||||
org.label-schema.vendor="Zabbix LLC" \
|
||||
org.label-schema.url="https://zabbix.com/" \
|
||||
org.label-schema.description="Zabbix ${ZBX_TYPE} with SQLite3 database support" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.build-date="${BUILD_DATE}" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.license="GPL v2.0" \
|
||||
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.label-schema.version="${ZBX_VERSION}" \
|
||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
||||
org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE}
|
||||
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_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf
|
||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/create.sql.gz
|
||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
||||
|
||||
RUN set -eux && \
|
||||
groupadd --system zabbix && \
|
||||
adduser -r --shell /sbin/nologin \
|
||||
-g zabbix \
|
||||
-d /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/ssh_keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl && \
|
||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
||||
mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \
|
||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||
yum ${YUM_FLAGS_PERSISTENT} install https://repo.zabbix.com/non-supported/rhel/7/x86_64/fping-3.10-1.el7.x86_64.rpm && \
|
||||
yum ${YUM_FLAGS_PERSISTENT} install \
|
||||
libcurl \
|
||||
libevent \
|
||||
libxml2 \
|
||||
net-snmp-libs \
|
||||
OpenIPMI-libs \
|
||||
openldap \
|
||||
openssl-libs \
|
||||
pcre \
|
||||
unixODBC && \
|
||||
yum ${YUM_FLAGS_PERSISTENT} clean all && \
|
||||
rm -rf /var/cache/yum/ && \
|
||||
chmod +x /sbin/tini
|
||||
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/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
yum -y history undo `yum -q history | sed -n 3p |column -t | cut -d' ' -f1` && \
|
||||
yum -y clean all && \
|
||||
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
|
||||
rm -rf /etc/udev/hwdb.bin /root/.pki
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
@ -141,3 +134,7 @@ VOLUME ["/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbi
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_proxy", "--foreground", "-c", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
|
@ -14,7 +14,7 @@ Zabbix proxy is a process that may collect monitoring data from one or more moni
|
||||
|
||||
# Zabbix proxy images
|
||||
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.9, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.11, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
|
||||
Zabbix proxy 3.0 (tags: alpine-3.0-latest, ubuntu-3.0-latest, centos-3.0-latest)
|
||||
Zabbix proxy 3.0.* (tags: alpine-3.0.*, ubuntu-3.0.*, centos-3.0.*)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ Zabbix proxy is a process that may collect monitoring data from one or more moni
|
||||
|
||||
# Zabbix proxy images
|
||||
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.9, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
These are the only official Zabbix proxy Docker images. They are based on Alpine Linux v3.11, Ubuntu 18.04 (bionic) and CentOS 7 images. The available versions of Zabbix proxy are:
|
||||
|
||||
Zabbix proxy 3.0 (tags: alpine-3.0-latest, ubuntu-3.0-latest, centos-3.0-latest)
|
||||
Zabbix proxy 3.0.* (tags: alpine-3.0.*, ubuntu-3.0.*, centos-3.0.*)
|
||||
|
Reference in New Issue
Block a user