Fixed CentOS images building

This commit is contained in:
root 2018-05-26 06:48:52 -07:00
commit e7afdd9bf8
13 changed files with 788 additions and 792 deletions

View File

@ -1,53 +1,13 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10050:10050 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
ENV TERM=xterm \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install \
@ -76,22 +36,61 @@ RUN yum --quiet makecache && \
--with-openssl \
--enable-ipv6 \
--silent && \
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 && \
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
cp conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
chown --quiet -R zabbix:root /etc/zabbix && \
cd /tmp/ && \
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 && \
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
make -j"$(nproc)" -s 1>/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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
ENV TERM=xterm \
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

View File

@ -1,56 +1,15 @@
FROM ubuntu:trusty
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM ubuntu:trusty as builder
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"
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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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" \
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}"
RUN apt-get ${APT_FLAGS_COMMON} update && \
RUN locale-gen $LC_ALL && \
apt-get ${APT_FLAGS_COMMON} update && \
apt-get ${APT_FLAGS_DEV} install \
autoconf \
automake \
@ -78,27 +37,61 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
--with-openssl \
--enable-ipv6 \
--silent && \
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 && \
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
cp conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
chown --quiet -R zabbix:root /etc/zabbix && \
cd /tmp/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
apt-get ${APT_FLAGS_COMMON} purge \
autoconf \
automake \
libc6-dev \
libssl-dev \
make \
pkg-config \
subversion \
gcc 1>/dev/null && \
make -j"$(nproc)" -s 1>/dev/null
FROM ubuntu:trusty
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG APT_FLAGS_COMMON="-qq -y"
ARG APT_FLAGS_PERSISTANT="${APT_FLAGS_COMMON} --no-install-recommends"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
ARG ZBX_SOURCES=svn://svn.zabbix.com/tags/${ZBX_VERSION}/
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 \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
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} clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.subversion
rm -rf /var/lib/apt/lists/*
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

View File

@ -1,48 +1,14 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:centos-${ZBX_VERSION}"
ENV TERM=xterm \
ZBX_TYPE=java-gateway ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install \
@ -67,20 +33,54 @@ RUN yum --quiet makecache && \
--enable-java \
--silent && \
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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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/ && \
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}/ && \
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
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/
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/
EXPOSE 10052/TCP

View File

@ -1,69 +1,13 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${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}"
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install \
@ -107,24 +51,78 @@ RUN yum --quiet makecache && \
--silent && \
make -j"$(nproc)" -s dbschema 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 && \
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/ && \
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 && \
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
gzip database/${ZBX_DB_TYPE}/create.sql
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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

View File

@ -1,68 +1,13 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${ZBX_TYPE}-${ZBX_DB_TYPE} --link zabbix-server:zabbix-server -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install \
@ -106,21 +51,77 @@ RUN yum --quiet makecache && \
--silent && \
make -j"$(nproc)" -s dbschema 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 && \
cd /tmp/ && \
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 && \
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
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
gzip database/${ZBX_DB_TYPE}/create.sql
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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=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

View File

@ -1,75 +1,16 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${ZBX_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql -p 10051:10051 -d zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}:centos-${ZBX_VERSION}"
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install epel-release && \
yum ${YUM_FLAGS_DEV} install \
autoconf \
automake \
@ -113,26 +54,83 @@ RUN yum --quiet makecache && \
--silent && \
make -j"$(nproc)" -s dbschema 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}/images.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 && \
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
cd /tmp/ && \
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 && \
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
gzip database/${ZBX_DB_TYPE}/create.sql
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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

View File

@ -1,76 +1,16 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-${ZBX_TYPE}-pgsql --link postgres-server:postgres -p 10051:10051 -d zabbix-${ZBX_TYPE}-pgsql:centos-${ZBX_VERSION}"
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none
RUN yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install epel-release && \
yum ${YUM_FLAGS_DEV} install \
autoconf \
automake \
@ -114,26 +54,85 @@ RUN yum --quiet makecache && \
--silent && \
make -j"$(nproc)" -s dbschema 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}/images.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 && \
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
cd /tmp/ && \
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 && \
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
gzip database/${ZBX_DB_TYPE}/create.sql
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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

View File

@ -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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
@ -6,8 +33,11 @@ ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ENV TERM=xterm MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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" \
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.build-date="${BUILD_DATE}" \
org.label-schema.schema-version="1.0" \
org.label-schema.license="GPL 2.0"
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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.license="GPL 2.0" \
org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
org.label-schema.version="1.14" \
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}"
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 && \
adduser -r --shell /sbin/nologin \
@ -38,31 +64,14 @@ RUN groupadd --system zabbix && \
-d /var/lib/zabbix/ \
zabbix && \
yum ${YUM_FLAGS_COMMON} makecache && \
yum ${YUM_FLAGS_DEV} install epel-release && \
yum ${YUM_FLAGS_PERSISTANT} install epel-release && \
yum ${YUM_FLAGS_PERSISTANT} install \
net-snmp \
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/snmptraps && \
mkdir -p /var/lib/zabbix/mibs && \
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 "traphandle default /usr/sbin/snmptrapfmthdlr" >> "/etc/snmp/snmptrapd.conf" && \
sed -i \
@ -70,17 +79,8 @@ RUN groupadd --system zabbix && \
-e '/^LOGFMT=/s/=.*/=\"$x ZBXTRAP $R $G $S $e $*\"/' \
-e "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \
"/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 && \
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
rm -rf /var/cache/yum
EXPOSE 162/UDP

View File

@ -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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
@ -6,8 +35,11 @@ ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ENV TERM=xterm \
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
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.build-date="${BUILD_DATE}" \
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
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
RUN groupadd --system zabbix && \
adduser -r --shell /sbin/nologin \
-g zabbix \
@ -41,46 +79,10 @@ RUN groupadd --system zabbix && \
php-mbstring \
php-mysql \
php-xml && \
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
yum ${YUM_FLAGS_PERSISTANT} clean all && \
rm -rf /var/cache/yum/
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
WORKDIR /usr/share/zabbix

View File

@ -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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
@ -6,8 +35,11 @@ ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ENV TERM=xterm \
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
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.build-date="${BUILD_DATE}" \
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
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
RUN groupadd --system zabbix && \
adduser -r --shell /sbin/nologin \
-g zabbix \
@ -42,46 +80,10 @@ RUN groupadd --system zabbix && \
php-pgsql \
php-xml \
postgresql && \
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
yum ${YUM_FLAGS_PERSISTANT} clean all && \
rm -rf /var/cache/yum/
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
WORKDIR /usr/share/zabbix

View File

@ -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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
@ -6,8 +35,11 @@ ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ENV TERM=xterm \
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
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.build-date="${BUILD_DATE}" \
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
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
RUN groupadd --system zabbix && \
adduser -r --shell /sbin/nologin \
-g zabbix \
@ -30,7 +68,7 @@ RUN groupadd --system zabbix && \
mkdir -p /etc/zabbix/web && \
chown --quiet -R zabbix:root /etc/zabbix && \
yum ${YUM_FLAGS_COMMON} makecache && \
yum ${YUM_FLAGS_DEV} install epel-release && \
yum ${YUM_FLAGS_PERSISTANT} install epel-release && \
yum ${YUM_FLAGS_PERSISTANT} install \
dejavu-sans-fonts \
mariadb \
@ -43,49 +81,13 @@ RUN groupadd --system zabbix && \
php-mysql \
php-xml \
supervisor && \
ln -s /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf /usr/share/zabbix/fonts/graphfont.ttf && \
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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
WORKDIR /usr/share/zabbix

View File

@ -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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
@ -6,8 +35,11 @@ ARG VCS_REF
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${YUM_FLAGS_COMMON}"
ARG YUM_FLAGS_DEV="${YUM_FLAGS_COMMON}"
ENV TERM=xterm \
ARG MAJOR_VERSION=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
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.build-date="${BUILD_DATE}" \
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
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
RUN groupadd --system zabbix && \
adduser -r --shell /sbin/nologin \
-g zabbix \
@ -30,7 +68,7 @@ RUN groupadd --system zabbix && \
mkdir -p /etc/zabbix/web && \
chown --quiet -R zabbix:root /etc/zabbix && \
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 \
dejavu-sans-fonts \
nginx \
@ -42,49 +80,13 @@ RUN groupadd --system zabbix && \
php-mbstring \
php-pgsql \
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 && \
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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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
WORKDIR /usr/share/zabbix

View File

@ -1,92 +1,19 @@
FROM centos:centos7
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG BUILD_DATE
ARG VCS_REF
FROM centos:centos7 as builder
ARG YUM_FLAGS_COMMON="--quiet -y"
ARG YUM_FLAGS_PERSISTANT="${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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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-appliance -p 80:80 -p 10051:10051 -d zabbix-appliance:centos-${ZBX_VERSION}"
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
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
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 \
autoconf \
automake \
@ -136,40 +63,113 @@ RUN yum --quiet makecache && \
--silent && \
make -j"$(nproc)" -s dbschema 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}/images.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 && \
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
mkdir -p /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
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/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/src/zabbix_java/lib/*.xml && \
cd frontends/php/ && \
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 && \
rm /tmp/zabbix-${ZBX_VERSION}/frontends/php/fonts/DejaVuSans.ttf && \
./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=3.0
ARG ZBX_VERSION=${MAJOR_VERSION}.17
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 && \
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
yum ${YUM_FLAGS_PERSISTANT} clean all && \
rm -rf /var/cache/yum/
EXPOSE 80/TCP 443/TCP 10051/TCP