mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-24 07:19:19 +01:00
Fixed CentOS images building
This commit is contained in:
parent
046251b853
commit
32e02d831f
@ -1,53 +1,13 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm \
|
|
||||||
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-centos" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
|
||||||
adduser -r --shell /sbin/nologin \
|
|
||||||
-g zabbix \
|
|
||||||
-d /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix && \
|
|
||||||
mkdir -p /etc/zabbix/zabbix_agentd.d && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
libldap \
|
|
||||||
openssl-libs && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV TERM=xterm \
|
||||||
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
LABEL 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} --link zabbix-server:zabbix-server -p 10050:10050 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
@ -76,22 +36,61 @@ RUN yum --quiet makecache && \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--enable-ipv6 \
|
--enable-ipv6 \
|
||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null
|
||||||
cp src/zabbix_agent/zabbix_agentd /usr/sbin/zabbix_agentd && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
FROM centos:centos7
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
cp conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
ARG BUILD_DATE
|
||||||
cd /tmp/ && \
|
ARG VCS_REF
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
ARG MAJOR_VERSION=master
|
||||||
rm -rf /var/cache/yum && \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
rm -rf /root/.pki && \
|
ENV TERM=xterm \
|
||||||
rm -rf /root/.subversion
|
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
|
||||||
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
|
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-centos" \
|
||||||
|
org.label-schema.vendor="Zabbix LLC" \
|
||||||
|
org.label-schema.url="https://zabbix.com/" \
|
||||||
|
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||||
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.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} --link zabbix-server:zabbix-server -p 10050:10050 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN groupadd --system zabbix && \
|
||||||
|
adduser -r --shell /sbin/nologin \
|
||||||
|
-g zabbix \
|
||||||
|
-d /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix && \
|
||||||
|
mkdir -p /etc/zabbix/zabbix_agentd.d && \
|
||||||
|
mkdir -p /var/lib/zabbix && \
|
||||||
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
|
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
||||||
|
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
|
libldap \
|
||||||
|
openssl-libs && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
|
rm -rf /var/cache/yum
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10050/TCP
|
EXPOSE 10050/TCP
|
||||||
|
|
||||||
|
@ -1,56 +1,15 @@
|
|||||||
FROM ubuntu:trusty
|
FROM ubuntu:trusty as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG APT_FLAGS_COMMON="-qq -y"
|
ARG APT_FLAGS_COMMON="-qq -y"
|
||||||
ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
|
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
|
|
||||||
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
||||||
addgroup --system --quiet zabbix && \
|
|
||||||
adduser --quiet \
|
|
||||||
--system --disabled-login \
|
|
||||||
--ingroup zabbix \
|
|
||||||
--home /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix && \
|
|
||||||
mkdir -p /etc/zabbix/zabbix_agentd.d && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
|
||||||
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
RUN locale-gen $LC_ALL && \
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
apt-get ${APT_FLAGS_COMMON} update && \
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
|
||||||
org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10050:10050 -d zabbix-${ZBX_TYPE}:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
apt-get ${APT_FLAGS_DEV} install \
|
apt-get ${APT_FLAGS_DEV} install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
@ -78,27 +37,61 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--enable-ipv6 \
|
--enable-ipv6 \
|
||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null
|
||||||
cp src/zabbix_agent/zabbix_agentd /usr/sbin/zabbix_agentd && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
FROM ubuntu:trusty
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
cp conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
ARG BUILD_DATE
|
||||||
cd /tmp/ && \
|
ARG VCS_REF
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} purge \
|
ARG APT_FLAGS_COMMON="-qq -y"
|
||||||
autoconf \
|
ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
|
||||||
automake \
|
ARG MAJOR_VERSION=master
|
||||||
libc6-dev \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
libssl-dev \
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
make \
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm \
|
||||||
pkg-config \
|
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
|
||||||
subversion \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
gcc 1>/dev/null && \
|
|
||||||
|
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-ubuntu" \
|
||||||
|
org.label-schema.vendor="Zabbix LLC" \
|
||||||
|
org.label-schema.url="https://zabbix.com/" \
|
||||||
|
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||||
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.license="GPL 2.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} --link zabbix-server:zabbix-server -p 10050:10050 -d zabbix-${ZBX_TYPE}:ubuntu-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN locale-gen $LC_ALL && \
|
||||||
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
|
addgroup --system --quiet zabbix && \
|
||||||
|
adduser --quiet \
|
||||||
|
--system --disabled-login \
|
||||||
|
--ingroup zabbix \
|
||||||
|
--home /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix && \
|
||||||
|
mkdir -p /etc/zabbix/zabbix_agentd.d && \
|
||||||
|
mkdir -p /var/lib/zabbix && \
|
||||||
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
|
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
||||||
|
apt-get ${APT_FLAGS_COMMON} update && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get ${APT_FLAGS_COMMON} clean && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/*
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10050/TCP
|
EXPOSE 10050/TCP
|
||||||
|
|
||||||
|
@ -1,48 +1,14 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm \
|
|
||||||
ZBX_TYPE=java-gateway ZBX_DB_TYPE=none ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-centos" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
|
||||||
adduser --system --shell /sbin/nologin \
|
|
||||||
-g zabbix \
|
|
||||||
-d /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
java-1.8.0-openjdk-headless && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV TERM=xterm \
|
||||||
|
ZBX_TYPE=java-gateway ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
|
||||||
org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
@ -67,20 +33,54 @@ RUN yum --quiet makecache && \
|
|||||||
--enable-java \
|
--enable-java \
|
||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
|
rm -rf src/zabbix_java/lib/*.xml
|
||||||
|
|
||||||
|
FROM centos:centos7
|
||||||
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
ENV TERM=xterm \
|
||||||
|
ZBX_TYPE=java-gateway ZBX_DB_TYPE=none ZBX_OPT_TYPE=none
|
||||||
|
|
||||||
|
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-centos" \
|
||||||
|
org.label-schema.vendor="Zabbix LLC" \
|
||||||
|
org.label-schema.url="https://zabbix.com/" \
|
||||||
|
org.label-schema.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||||
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.license="GPL 2.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} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN groupadd --system zabbix && \
|
||||||
|
adduser --system --shell /sbin/nologin \
|
||||||
|
-g zabbix \
|
||||||
|
-d /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/zabbix && \
|
||||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
mkdir -p /usr/sbin/zabbix_java/ && \
|
||||||
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
|
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
java-1.8.0-openjdk-headless && \
|
||||||
cd /tmp/ && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /var/cache/yum/
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/bin/* /usr/sbin/zabbix_java/bin/
|
||||||
rm -rf /var/cache/yum && \
|
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/* /usr/sbin/zabbix_java/lib/
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 10052/TCP
|
EXPOSE 10052/TCP
|
||||||
|
|
||||||
|
@ -1,69 +1,13 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
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 MySQL database support" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN 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_PERSISTANT} install \
|
|
||||||
fping \
|
|
||||||
libcurl \
|
|
||||||
libxml2 \
|
|
||||||
mariadb \
|
|
||||||
net-snmp-libs \
|
|
||||||
OpenIPMI-libs \
|
|
||||||
openldap \
|
|
||||||
openssl-libs \
|
|
||||||
pcre \
|
|
||||||
unixODBC && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
||||||
LABEL 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 mysql-server:mysql --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
@ -107,24 +51,78 @@ RUN yum --quiet makecache && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/${ZBX_DB_TYPE}/create.sql
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
FROM centos:centos7
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
ARG BUILD_DATE
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
ARG VCS_REF
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /root/.pki && \
|
ARG MAJOR_VERSION=master
|
||||||
rm -rf /root/.subversion
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
|
ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
||||||
|
|
||||||
|
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 MySQL database support" \
|
||||||
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.license="GPL 2.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 mysql-server:mysql --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN 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_PERSISTANT} install \
|
||||||
|
fping \
|
||||||
|
libcurl \
|
||||||
|
libxml2 \
|
||||||
|
mariadb \
|
||||||
|
net-snmp-libs \
|
||||||
|
OpenIPMI-libs \
|
||||||
|
openldap \
|
||||||
|
openssl-libs \
|
||||||
|
pcre \
|
||||||
|
unixODBC && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
|
@ -1,68 +1,13 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
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 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN 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_PERSISTANT} install \
|
|
||||||
fping \
|
|
||||||
libcurl \
|
|
||||||
libxml2 \
|
|
||||||
net-snmp-libs \
|
|
||||||
OpenIPMI-libs \
|
|
||||||
openldap \
|
|
||||||
openssl-libs \
|
|
||||||
pcre \
|
|
||||||
unixODBC && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
|
||||||
LABEL 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}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
@ -106,21 +51,77 @@ RUN yum --quiet makecache && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
gzip database/${ZBX_DB_TYPE}/create.sql
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
FROM centos:centos7
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
ARG BUILD_DATE
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
ARG VCS_REF
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
|
||||||
rm -rf /var/cache/yum && \
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
ARG MAJOR_VERSION=master
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
rm -rf /root/.pki && \
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
rm -rf /root/.subversion
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
|
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
|
||||||
|
|
||||||
|
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 2.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
|
||||||
|
|
||||||
|
RUN 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_PERSISTANT} install \
|
||||||
|
fping \
|
||||||
|
libcurl \
|
||||||
|
libxml2 \
|
||||||
|
net-snmp-libs \
|
||||||
|
OpenIPMI-libs \
|
||||||
|
openldap \
|
||||||
|
openssl-libs \
|
||||||
|
pcre \
|
||||||
|
unixODBC && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
|
@ -1,75 +1,16 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ARG DB_TYPE=mysql
|
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
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 MySQL database support" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
|
||||||
adduser -r --shell /sbin/nologin \
|
|
||||||
-g zabbix -G dialout \
|
|
||||||
-d /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
|
||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
|
||||||
mkdir -p /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_DEV} install epel-release && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
fping \
|
|
||||||
iksemel \
|
|
||||||
libcurl \
|
|
||||||
libxml2 \
|
|
||||||
mariadb \
|
|
||||||
net-snmp-libs \
|
|
||||||
OpenIPMI-libs \
|
|
||||||
openldap \
|
|
||||||
openssl-libs \
|
|
||||||
pcre \
|
|
||||||
unixODBC && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
||||||
LABEL 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 mysql-server:mysql -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install epel-release && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
@ -113,26 +54,83 @@ RUN yum --quiet makecache && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/${ZBX_DB_TYPE}/create.sql
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
FROM centos:centos7
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
ARG BUILD_DATE
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
ARG VCS_REF
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /root/.pki && \
|
ARG MAJOR_VERSION=master
|
||||||
rm -rf /root/.subversion
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
||||||
|
|
||||||
|
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 MySQL database support" \
|
||||||
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.license="GPL 2.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 mysql-server:mysql -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN groupadd --system zabbix && \
|
||||||
|
adduser -r --shell /sbin/nologin \
|
||||||
|
-g zabbix -G dialout \
|
||||||
|
-d /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix && \
|
||||||
|
mkdir -p /var/lib/zabbix && \
|
||||||
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
|
mkdir -p /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_PERSISTANT} install epel-release && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
|
fping \
|
||||||
|
iksemel \
|
||||||
|
libcurl \
|
||||||
|
libxml2 \
|
||||||
|
mariadb \
|
||||||
|
net-snmp-libs \
|
||||||
|
OpenIPMI-libs \
|
||||||
|
openldap \
|
||||||
|
openssl-libs \
|
||||||
|
pcre \
|
||||||
|
unixODBC && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
|
@ -1,76 +1,16 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm
|
|
||||||
ENV MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none
|
|
||||||
|
|
||||||
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 PostgreSQL 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 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
|
||||||
adduser -r --shell /sbin/nologin \
|
|
||||||
-g zabbix -G dialout \
|
|
||||||
-d /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
|
||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
|
||||||
mkdir -p /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_DEV} install epel-release && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
fping \
|
|
||||||
iksemel \
|
|
||||||
libcurl \
|
|
||||||
libxml2 \
|
|
||||||
net-snmp-libs \
|
|
||||||
OpenIPMI-libs \
|
|
||||||
openldap \
|
|
||||||
openssl-libs \
|
|
||||||
pcre \
|
|
||||||
postgresql \
|
|
||||||
postgresql-libs \
|
|
||||||
unixODBC && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none
|
||||||
LABEL 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}-pgsql --link postgres-server:postgres -p 10051:10051 -d zabbix-${ZBX_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install epel-release && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
@ -114,26 +54,85 @@ RUN yum --quiet makecache && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/${ZBX_DB_TYPE}/create.sql
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
FROM centos:centos7
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
ARG BUILD_DATE
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
ARG VCS_REF
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /root/.pki && \
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
rm -rf /root/.subversion
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none
|
||||||
|
|
||||||
|
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 PostgreSQL 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 2.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}-pgsql --link postgres-server:postgres -p 10051:10051 -d zabbix-${ZBX_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
RUN groupadd --system zabbix && \
|
||||||
|
adduser -r --shell /sbin/nologin \
|
||||||
|
-g zabbix -G dialout \
|
||||||
|
-d /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix && \
|
||||||
|
mkdir -p /var/lib/zabbix && \
|
||||||
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
|
mkdir -p /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_PERSISTANT} install epel-release && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
|
fping \
|
||||||
|
iksemel \
|
||||||
|
libcurl \
|
||||||
|
libxml2 \
|
||||||
|
net-snmp-libs \
|
||||||
|
OpenIPMI-libs \
|
||||||
|
openldap \
|
||||||
|
openssl-libs \
|
||||||
|
pcre \
|
||||||
|
postgresql \
|
||||||
|
postgresql-libs \
|
||||||
|
unixODBC && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
|
@ -1,3 +1,30 @@
|
|||||||
|
FROM centos:centos7 as builder
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
|
COPY ["snmptrapfmt_1.14+nmu1ubuntu2.tar.gz", "/tmp/"]
|
||||||
|
|
||||||
|
RUN yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
gcc \
|
||||||
|
patch \
|
||||||
|
make \
|
||||||
|
libnsl-devel \
|
||||||
|
net-snmp-devel && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
tar -zxf snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
||||||
|
cd /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
||||||
|
patch -p1 < ./patches/makefile.patch && \
|
||||||
|
make -j"$(nproc)" -s 1>/dev/null
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM centos:centos7
|
||||||
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
@ -6,8 +33,11 @@ ARG VCS_REF
|
|||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG MAJOR_VERSION=master
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-snmptraps-centos" \
|
LABEL org.label-schema.name="zabbix-snmptraps-centos" \
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
org.label-schema.vendor="Zabbix LLC" \
|
||||||
@ -16,21 +46,17 @@ LABEL org.label-schema.name="zabbix-snmptraps-centos" \
|
|||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.license="GPL 2.0"
|
org.label-schema.license="GPL 2.0" \
|
||||||
|
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
ARG MAJOR_VERSION=master
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
|
||||||
org.label-schema.version="1.14" \
|
org.label-schema.version="1.14" \
|
||||||
org.label-schema.vcs-url="https://anonscm.debian.org/gitweb/?p=collab-maint/snmptrapfmt.git" \
|
org.label-schema.vcs-url="https://anonscm.debian.org/gitweb/?p=collab-maint/snmptrapfmt.git" \
|
||||||
org.label-schema.docker.cmd="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:162/UDP -d zabbix-snmptraps:centos-${ZBX_VERSION}"
|
org.label-schema.docker.cmd="docker run --name zabbix-snmptraps --link zabbix-server:zabbix-server -p 162:162/UDP -d zabbix-snmptraps:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
COPY ["snmptrapfmt_1.14+nmu1ubuntu2.tar.gz", "/tmp/"]
|
COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmthdlr /usr/sbin/snmptrapfmthdlr
|
||||||
|
COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmt /usr/sbin/snmptrapfmt
|
||||||
|
COPY --from=builder /tmp/snmptrapfmt-1.14+nmu1ubuntu1/snmptrapfmt.conf /etc/snmp/snmptrapfmt.conf
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
RUN groupadd --system zabbix && \
|
||||||
adduser -r --shell /sbin/nologin \
|
adduser -r --shell /sbin/nologin \
|
||||||
@ -38,31 +64,14 @@ RUN groupadd --system zabbix && \
|
|||||||
-d /var/lib/zabbix/ \
|
-d /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install epel-release && \
|
yum ${YUM_FLAGS_PERSISTANT} install epel-release && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
net-snmp \
|
net-snmp \
|
||||||
supervisor && \
|
supervisor && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
gcc \
|
|
||||||
patch \
|
|
||||||
make \
|
|
||||||
libnsl-devel \
|
|
||||||
net-snmp-devel && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||||
mkdir -p /var/lib/zabbix/mibs && \
|
mkdir -p /var/lib/zabbix/mibs && \
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
||||||
cd /tmp/ && \
|
|
||||||
tar -zxf snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
|
||||||
ls -lah && \
|
|
||||||
cd /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
|
||||||
patch -p1 < ./patches/makefile.patch && \
|
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
|
||||||
cp snmptrapfmthdlr /usr/sbin/snmptrapfmthdlr && \
|
|
||||||
cp snmptrapfmt /usr/sbin/snmptrapfmt && \
|
|
||||||
cp snmptrapfmt.conf /etc/snmp/snmptrapfmt.conf && \
|
|
||||||
echo "disableAuthorization yes" >> "/etc/snmp/snmptrapd.conf" && \
|
echo "disableAuthorization yes" >> "/etc/snmp/snmptrapd.conf" && \
|
||||||
echo "traphandle default /usr/sbin/snmptrapfmthdlr" >> "/etc/snmp/snmptrapd.conf" && \
|
echo "traphandle default /usr/sbin/snmptrapfmthdlr" >> "/etc/snmp/snmptrapd.conf" && \
|
||||||
sed -i \
|
sed -i \
|
||||||
@ -70,17 +79,8 @@ RUN groupadd --system zabbix && \
|
|||||||
-e '/^LOGFMT=/s/=.*/=\"$x ZBXTRAP $R $G $S $e $*\"/' \
|
-e '/^LOGFMT=/s/=.*/=\"$x ZBXTRAP $R $G $S $e $*\"/' \
|
||||||
-e "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \
|
-e "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \
|
||||||
"/etc/snmp/snmptrapfmt.conf" && \
|
"/etc/snmp/snmptrapfmt.conf" && \
|
||||||
rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz 1>/dev/null && \
|
|
||||||
rm -rf /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ 1>/dev/null && \
|
|
||||||
yum history && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
yum ${YUM_FLAGS_COMMON} clean all && \
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
rm -rf /var/cache/yum
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 162/UDP
|
EXPOSE 162/UDP
|
||||||
|
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
FROM centos:centos7 as builder
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
|
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=apache
|
||||||
|
|
||||||
|
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
||||||
|
|
||||||
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
|
gettext \
|
||||||
|
patch \
|
||||||
|
subversion && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
||||||
|
cd /tmp/zabbix/ && \
|
||||||
|
patch -p3 < /tmp/font-config && \
|
||||||
|
rm /tmp/font-config && \
|
||||||
|
rm -f conf/zabbix.conf.php && \
|
||||||
|
rm -rf tests && \
|
||||||
|
rm /tmp/zabbix/fonts/DejaVuSans.ttf && \
|
||||||
|
./locale/make_mo.sh 2>/dev/null
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM centos:centos7
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
@ -6,8 +35,11 @@ ARG VCS_REF
|
|||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG MAJOR_VERSION=master
|
||||||
ENV TERM=xterm \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=apache
|
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=apache
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
||||||
@ -17,10 +49,16 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
|||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.license="GPL 2.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-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
RUN groupadd --system zabbix && \
|
||||||
adduser -r --shell /sbin/nologin \
|
adduser -r --shell /sbin/nologin \
|
||||||
-g zabbix \
|
-g zabbix \
|
||||||
@ -41,46 +79,10 @@ RUN groupadd --system zabbix && \
|
|||||||
php-mbstring \
|
php-mbstring \
|
||||||
php-mysql \
|
php-mysql \
|
||||||
php-xml && \
|
php-xml && \
|
||||||
|
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
rm -rf /var/cache/yum/
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
|
||||||
gettext \
|
|
||||||
patch \
|
|
||||||
subversion && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
|
||||||
patch -p3 < /tmp/font-config && \
|
|
||||||
rm /tmp/font-config && \
|
|
||||||
rm -f conf/zabbix.conf.php && \
|
|
||||||
rm -rf tests && \
|
|
||||||
rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \
|
|
||||||
./locale/make_mo.sh 2>/dev/null && \
|
|
||||||
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
|
||||||
chown -R apache:apache /usr/share/zabbix && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 80/TCP 443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
FROM centos:centos7 as builder
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
|
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=apache
|
||||||
|
|
||||||
|
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
||||||
|
|
||||||
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
|
gettext \
|
||||||
|
patch \
|
||||||
|
subversion && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
||||||
|
cd /tmp/zabbix/ && \
|
||||||
|
patch -p3 < /tmp/font-config && \
|
||||||
|
rm /tmp/font-config && \
|
||||||
|
rm -f conf/zabbix.conf.php && \
|
||||||
|
rm -rf tests && \
|
||||||
|
rm /tmp/zabbix/fonts/DejaVuSans.ttf && \
|
||||||
|
./locale/make_mo.sh 2>/dev/null
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM centos:centos7
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
@ -6,8 +35,11 @@ ARG VCS_REF
|
|||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG MAJOR_VERSION=master
|
||||||
ENV TERM=xterm \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=apache
|
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=apache
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
||||||
@ -17,10 +49,16 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
|||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.license="GPL v2.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-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
RUN groupadd --system zabbix && \
|
||||||
adduser -r --shell /sbin/nologin \
|
adduser -r --shell /sbin/nologin \
|
||||||
-g zabbix \
|
-g zabbix \
|
||||||
@ -42,46 +80,10 @@ RUN groupadd --system zabbix && \
|
|||||||
php-pgsql \
|
php-pgsql \
|
||||||
php-xml \
|
php-xml \
|
||||||
postgresql && \
|
postgresql && \
|
||||||
|
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
rm -rf /var/cache/yum/
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
|
||||||
gettext \
|
|
||||||
patch \
|
|
||||||
subversion && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
|
||||||
patch -p3 < /tmp/font-config && \
|
|
||||||
rm /tmp/font-config && \
|
|
||||||
rm -f conf/zabbix.conf.php && \
|
|
||||||
rm -rf tests && \
|
|
||||||
rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \
|
|
||||||
./locale/make_mo.sh 2>/dev/null && \
|
|
||||||
chown -R apache:apache /usr/share/zabbix && \
|
|
||||||
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 80/TCP 443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
FROM centos:centos7 as builder
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
|
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx
|
||||||
|
|
||||||
|
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
||||||
|
|
||||||
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
|
gettext \
|
||||||
|
patch \
|
||||||
|
subversion && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
||||||
|
cd /tmp/zabbix/ && \
|
||||||
|
patch -p3 < /tmp/font-config && \
|
||||||
|
rm /tmp/font-config && \
|
||||||
|
rm -f conf/zabbix.conf.php && \
|
||||||
|
rm -rf tests && \
|
||||||
|
rm /tmp/zabbix/fonts/DejaVuSans.ttf && \
|
||||||
|
./locale/make_mo.sh 2>/dev/null
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM centos:centos7
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
@ -6,8 +35,11 @@ ARG VCS_REF
|
|||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG MAJOR_VERSION=master
|
||||||
ENV TERM=xterm \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx
|
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
||||||
@ -17,10 +49,16 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
|||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.license="GPL 2.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-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
RUN groupadd --system zabbix && \
|
||||||
adduser -r --shell /sbin/nologin \
|
adduser -r --shell /sbin/nologin \
|
||||||
-g zabbix \
|
-g zabbix \
|
||||||
@ -30,7 +68,7 @@ RUN groupadd --system zabbix && \
|
|||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix && \
|
||||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install epel-release && \
|
yum ${YUM_FLAGS_PERSISTANT} install epel-release && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
dejavu-sans-fonts \
|
dejavu-sans-fonts \
|
||||||
mariadb \
|
mariadb \
|
||||||
@ -43,49 +81,13 @@ RUN groupadd --system zabbix && \
|
|||||||
php-mysql \
|
php-mysql \
|
||||||
php-xml \
|
php-xml \
|
||||||
supervisor && \
|
supervisor && \
|
||||||
|
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
mkdir -p /var/lib/php/ && \
|
mkdir -p /var/lib/php/ && \
|
||||||
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
rm -rf /var/cache/yum/
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
|
||||||
gettext \
|
|
||||||
patch \
|
|
||||||
subversion && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
|
||||||
patch -p3 < /tmp/font-config && \
|
|
||||||
rm /tmp/font-config && \
|
|
||||||
rm -f conf/zabbix.conf.php && \
|
|
||||||
rm -rf tests && \
|
|
||||||
rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \
|
|
||||||
./locale/make_mo.sh 2>/dev/null && \
|
|
||||||
chown -R nginx:nginx /usr/share/zabbix && \
|
|
||||||
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 80/TCP 443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
FROM centos:centos7 as builder
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
|
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
|
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=nginx
|
||||||
|
|
||||||
|
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
||||||
|
|
||||||
|
RUN yum --quiet makecache && \
|
||||||
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
|
gettext \
|
||||||
|
patch \
|
||||||
|
subversion && \
|
||||||
|
cd /tmp/ && \
|
||||||
|
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
||||||
|
cd /tmp/zabbix/ && \
|
||||||
|
patch -p3 < /tmp/font-config && \
|
||||||
|
rm /tmp/font-config && \
|
||||||
|
rm -f conf/zabbix.conf.php && \
|
||||||
|
rm -rf tests && \
|
||||||
|
rm /tmp/zabbix/fonts/DejaVuSans.ttf && \
|
||||||
|
./locale/make_mo.sh 2>/dev/null
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM centos:centos7
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
@ -6,8 +35,11 @@ ARG VCS_REF
|
|||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG MAJOR_VERSION=master
|
||||||
ENV TERM=xterm \
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm \
|
||||||
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=nginx
|
ZBX_TYPE=frontend ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=nginx
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
||||||
@ -17,10 +49,16 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-centos" \
|
|||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
org.label-schema.build-date="${BUILD_DATE}" \
|
||||||
org.label-schema.schema-version="1.0" \
|
org.label-schema.schema-version="1.0" \
|
||||||
org.label-schema.license="GPL 2.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-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
RUN groupadd --system zabbix && \
|
||||||
adduser -r --shell /sbin/nologin \
|
adduser -r --shell /sbin/nologin \
|
||||||
-g zabbix \
|
-g zabbix \
|
||||||
@ -30,7 +68,7 @@ RUN groupadd --system zabbix && \
|
|||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix && \
|
||||||
yum ${YUM_FLAGS_COMMON} makecache && \
|
yum ${YUM_FLAGS_COMMON} makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install epel-release && \
|
yum ${YUM_FLAGS_PERSISTANT} install epel-release && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install supervisor \
|
yum ${YUM_FLAGS_PERSISTANT} install supervisor \
|
||||||
dejavu-sans-fonts \
|
dejavu-sans-fonts \
|
||||||
nginx \
|
nginx \
|
||||||
@ -42,49 +80,13 @@ RUN groupadd --system zabbix && \
|
|||||||
php-mbstring \
|
php-mbstring \
|
||||||
php-pgsql \
|
php-pgsql \
|
||||||
php-xml && \
|
php-xml && \
|
||||||
|
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
mkdir -p /var/lib/php/ && \
|
mkdir -p /var/lib/php/ && \
|
||||||
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
rm -rf /var/cache/yum/
|
rm -rf /var/cache/yum/
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL 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-web-${ZBX_OPT_TYPE}-pgsql --link postgres-server:postgres --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-pgsql:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
|
||||||
gettext \
|
|
||||||
patch \
|
|
||||||
subversion && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
|
||||||
patch -p3 < /tmp/font-config && \
|
|
||||||
rm /tmp/font-config && \
|
|
||||||
rm -f conf/zabbix.conf.php && \
|
|
||||||
rm -rf tests && \
|
|
||||||
rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \
|
|
||||||
./locale/make_mo.sh 2>/dev/null && \
|
|
||||||
chown -R nginx:nginx /usr/share/zabbix && \
|
|
||||||
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 80/TCP 443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
@ -1,92 +1,19 @@
|
|||||||
FROM centos:centos7
|
FROM centos:centos7 as builder
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG YUM_FLAGS_COMMON="--quiet -y"
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
|
||||||
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
|
||||||
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx \
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD=true ZBX_ADD_SERVER=true ZBX_ADD_WEB=true DB_SERVER_HOST=localhost MYSQL_USER=zabbix ZBX_ADD_JAVA_GATEWAY=true ZBX_JAVAGATEWAY_ENABLE=true ZBX_JAVAGATEWAY=localhost
|
|
||||||
|
|
||||||
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 appliance with MySQL database support and ${ZBX_OPT_TYPE} web-server" \
|
|
||||||
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 2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
RUN groupadd --system zabbix && \
|
|
||||||
adduser -r --shell /sbin/nologin \
|
|
||||||
-g zabbix -G dialout \
|
|
||||||
-d /var/lib/zabbix/ \
|
|
||||||
zabbix && \
|
|
||||||
mkdir -p /etc/zabbix && \
|
|
||||||
mkdir -p /var/lib/zabbix && \
|
|
||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
|
||||||
mkdir -p /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_DEV} install epel-release && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} install \
|
|
||||||
OpenIPMI-libs \
|
|
||||||
dejavu-sans-fonts \
|
|
||||||
fping \
|
|
||||||
iksemel \
|
|
||||||
java-1.8.0-openjdk-headless \
|
|
||||||
libcurl \
|
|
||||||
libxml2 \
|
|
||||||
mariadb \
|
|
||||||
mariadb-server \
|
|
||||||
net-snmp-libs \
|
|
||||||
nginx \
|
|
||||||
openldap \
|
|
||||||
openssl-libs \
|
|
||||||
pcre \
|
|
||||||
php-bcmath \
|
|
||||||
php-fpm \
|
|
||||||
php-gd \
|
|
||||||
php-ldap \
|
|
||||||
php-mbstring \
|
|
||||||
php-mysql \
|
|
||||||
php-xml \
|
|
||||||
supervisor \
|
|
||||||
unixODBC && \
|
|
||||||
rm -f /etc/php-fpm.d/www.conf && \
|
|
||||||
mkdir -p /var/lib/php/ && \
|
|
||||||
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
|
||||||
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
|
||||||
rm -rf /var/cache/yum/
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=master
|
ARG MAJOR_VERSION=master
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx \
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
MYSQL_ALLOW_EMPTY_PASSWORD=true ZBX_ADD_SERVER=true ZBX_ADD_WEB=true DB_SERVER_HOST=localhost MYSQL_USER=zabbix ZBX_ADD_JAVA_GATEWAY=true ZBX_JAVAGATEWAY_ENABLE=true ZBX_JAVAGATEWAY=localhost
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
|
||||||
org.label-schema.docker.cmd="docker run --name zabbix-appliance -p 80:80 -p 10051:10051 -d zabbix-appliance:centos-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
COPY ["conf/tmp/font-config", "/tmp/font-config"]
|
||||||
|
|
||||||
RUN yum --quiet makecache && \
|
RUN yum ${YUM_FLAGS_DEV} install epel-release && \
|
||||||
|
yum --quiet makecache && \
|
||||||
yum ${YUM_FLAGS_DEV} install \
|
yum ${YUM_FLAGS_DEV} install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
@ -136,40 +63,113 @@ RUN yum --quiet makecache && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
make -j"$(nproc)" -s dbschema 1>/dev/null && \
|
||||||
make -j"$(nproc)" -s 1>/dev/null && \
|
make -j"$(nproc)" -s 1>/dev/null && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/*.xml && \
|
||||||
mkdir -p /usr/sbin/zabbix_java/ && \
|
cd frontends/php/ && \
|
||||||
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 && \
|
|
||||||
cd /tmp/ && \
|
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
|
||||||
cd /usr/share/ && \
|
|
||||||
svn --quiet export ${ZBX_SOURCES}/frontends/php/ zabbix 1>/dev/null && \
|
|
||||||
cd /usr/share/zabbix/ && \
|
|
||||||
patch -p3 < /tmp/font-config && \
|
patch -p3 < /tmp/font-config && \
|
||||||
rm /tmp/font-config && \
|
|
||||||
rm -f conf/zabbix.conf.php && \
|
rm -f conf/zabbix.conf.php && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
rm /usr/share/zabbix/fonts/DejaVuSans.ttf && \
|
rm /tmp/zabbix-${ZBX_VERSION}/frontends/php/fonts/DejaVuSans.ttf && \
|
||||||
./locale/make_mo.sh 2>/dev/null && \
|
./locale/make_mo.sh 2>/dev/null
|
||||||
|
|
||||||
|
FROM centos:centos7
|
||||||
|
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
||||||
|
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
|
||||||
|
ARG YUM_FLAGS_COMMON="--quiet -y"
|
||||||
|
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
|
||||||
|
ARG MAJOR_VERSION=master
|
||||||
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
|
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
|
||||||
|
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
|
TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
|
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx \
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD=true ZBX_ADD_SERVER=true ZBX_ADD_WEB=true DB_SERVER_HOST=localhost MYSQL_USER=zabbix ZBX_ADD_JAVA_GATEWAY=true ZBX_JAVAGATEWAY_ENABLE=true ZBX_JAVAGATEWAY=localhost
|
||||||
|
|
||||||
|
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 appliance with MySQL database support and ${ZBX_OPT_TYPE} web-server" \
|
||||||
|
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-appliance -p 80:80 -p 10051:10051 -d zabbix-appliance: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
|
||||||
|
|
||||||
|
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 --from=builder /tmp/zabbix-${ZBX_VERSION}/frontends/php/ /usr/share/zabbix/
|
||||||
|
|
||||||
|
RUN groupadd --system zabbix && \
|
||||||
|
adduser -r --shell /sbin/nologin \
|
||||||
|
-g zabbix -G dialout \
|
||||||
|
-d /var/lib/zabbix/ \
|
||||||
|
zabbix && \
|
||||||
|
mkdir -p /etc/zabbix && \
|
||||||
|
mkdir -p /var/lib/zabbix && \
|
||||||
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
|
mkdir -p /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_PERSISTANT} install epel-release && \
|
||||||
|
yum ${YUM_FLAGS_PERSISTANT} install \
|
||||||
|
OpenIPMI-libs \
|
||||||
|
dejavu-sans-fonts \
|
||||||
|
fping \
|
||||||
|
iksemel \
|
||||||
|
java-1.8.0-openjdk-headless \
|
||||||
|
libcurl \
|
||||||
|
libxml2 \
|
||||||
|
mariadb \
|
||||||
|
mariadb-server \
|
||||||
|
net-snmp-libs \
|
||||||
|
nginx \
|
||||||
|
openldap \
|
||||||
|
openssl-libs \
|
||||||
|
pcre \
|
||||||
|
php-bcmath \
|
||||||
|
php-fpm \
|
||||||
|
php-gd \
|
||||||
|
php-ldap \
|
||||||
|
php-mbstring \
|
||||||
|
php-mysql \
|
||||||
|
php-xml \
|
||||||
|
supervisor \
|
||||||
|
unixODBC && \
|
||||||
|
rm -f /etc/php-fpm.d/www.conf && \
|
||||||
|
mkdir -p /var/lib/php/ && \
|
||||||
|
chown --quiet -R nginx:nginx /var/lib/php/ && \
|
||||||
|
ls -lah /usr/share/zabbix/ && \
|
||||||
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
|
||||||
yum ${YUM_FLAGS_COMMON} history undo `yum history | sed -n 4p |column -t | cut -d' ' -f1` 1>/dev/null && \
|
yum ${YUM_FLAGS_PERSISTANT} clean all && \
|
||||||
yum ${YUM_FLAGS_COMMON} clean all && \
|
rm -rf /var/cache/yum/
|
||||||
rm -rf /var/cache/yum && \
|
|
||||||
rm -rf /var/lib/yum/yumdb/* && \
|
|
||||||
rm -rf /usr/lib/udev/hwdb.d/* && \
|
|
||||||
rm -rf /etc/udev/hwdb.bin && \
|
|
||||||
rm -rf /root/.pki && \
|
|
||||||
rm -rf /root/.subversion
|
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP 10051/TCP
|
EXPOSE 80/TCP 443/TCP 10051/TCP
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user