mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-04-29 13:44:36 +02:00
Updated Ubuntu images
This commit is contained in:
commit
e0e20286ae
@ -90,7 +90,7 @@ EXPOSE 10050/TCP
|
|||||||
|
|
||||||
WORKDIR /var/lib/zabbix
|
WORKDIR /var/lib/zabbix
|
||||||
|
|
||||||
VOLUME ["/var/lib/zabbix/enc"]
|
VOLUME ["/etc/zabbix/zabbix_agentd.d", "/var/lib/zabbix/enc", "/var/lib/zabbix/modules"]
|
||||||
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
@ -1,19 +1,64 @@
|
|||||||
FROM ubuntu:bionic as builder
|
FROM ubuntu:bionic
|
||||||
|
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
LABEL org.opencontainers.image.title="Zabbix agent" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
||||||
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
|
|
||||||
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
ENV TINI_VERSION=v0.19.0
|
||||||
|
|
||||||
|
RUN set -eux && \
|
||||||
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
|
adduser --quiet \
|
||||||
|
--system --disabled-login \
|
||||||
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
|
--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 && \
|
||||||
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
|
libssl1.1 \
|
||||||
|
libcurl4 \
|
||||||
|
libldap-2.4 && \
|
||||||
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||||
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||||
|
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||||
|
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||||
|
rm -rf /root/.gnupg && \
|
||||||
|
chmod +x /sbin/tini && \
|
||||||
|
apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
ZBX_TYPE=agent ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install locales && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
@ -24,7 +69,6 @@ RUN set -eux && \
|
|||||||
make \
|
make \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
ca-certificates \
|
|
||||||
gcc && \
|
gcc && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
||||||
@ -44,73 +88,30 @@ RUN set -eux && \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--enable-ipv6 \
|
--enable-ipv6 \
|
||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s
|
make -j"$(nproc)" -s && \
|
||||||
|
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd /usr/sbin/zabbix_agentd && \
|
||||||
FROM ubuntu:bionic
|
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
cp /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
||||||
|
cp /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
||||||
ARG BUILD_DATE
|
cd /tmp/ && \
|
||||||
ARG VCS_REF
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
|
apt-get -y purge \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
autoconf \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
automake \
|
||||||
|
libcurl4-openssl-dev \
|
||||||
ARG MAJOR_VERSION=5.0
|
libc6-dev \
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
libldap2-dev \
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
libssl-dev \
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
make \
|
||||||
ZBX_TYPE=agent ZBX_DB_TYPE=none ZBX_OPT_TYPE=none \
|
pkg-config \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
git \
|
||||||
ENV TINI_VERSION v0.18.0
|
gcc && \
|
||||||
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-ubuntu" \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
apt-get -y autoremove && \
|
||||||
org.label-schema.description="Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications" \
|
apt-get -y clean && \
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
rm -rf /var/lib/apt/lists/*
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_agent/zabbix_agentd /usr/sbin/zabbix_agentd
|
|
||||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get /usr/bin/zabbix_get
|
|
||||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender
|
|
||||||
COPY --from=builder /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
|
||||||
|
|
||||||
RUN set -eux && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
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 && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
|
||||||
libpcre3 \
|
|
||||||
libssl1.1 \
|
|
||||||
libcurl4 \
|
|
||||||
libldap-2.4 && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
chmod +x /sbin/tini
|
|
||||||
|
|
||||||
EXPOSE 10050/TCP
|
EXPOSE 10050/TCP
|
||||||
|
|
||||||
@ -121,3 +122,7 @@ VOLUME ["/etc/zabbix/zabbix_agentd.d", "/var/lib/zabbix/enc", "/var/lib/zabbix/m
|
|||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -401,9 +401,9 @@ services:
|
|||||||
- MYSQL_USER
|
- MYSQL_USER
|
||||||
- MYSQL_PASSWORD
|
- MYSQL_PASSWORD
|
||||||
- MYSQL_ROOT_PASSWORD
|
- MYSQL_ROOT_PASSWORD
|
||||||
- mysql-server-key.pem
|
# - server-key.pem
|
||||||
- mysql-server-cert.pem
|
# - server-cert.pem
|
||||||
- mysql-ca.pem
|
# - root-ca.pem
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
|
@ -433,9 +433,9 @@ services:
|
|||||||
- MYSQL_USER
|
- MYSQL_USER
|
||||||
- MYSQL_PASSWORD
|
- MYSQL_PASSWORD
|
||||||
- MYSQL_ROOT_PASSWORD
|
- MYSQL_ROOT_PASSWORD
|
||||||
- mysql-server-key.pem
|
# - server-key.pem
|
||||||
- mysql-server-cert.pem
|
# - server-cert.pem
|
||||||
- mysql-ca.pem
|
# - root-ca.pem
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
networks:
|
networks:
|
||||||
zbx_net_backend:
|
zbx_net_backend:
|
||||||
|
@ -199,7 +199,7 @@ services:
|
|||||||
- zabbix-server:zabbix-server
|
- zabbix-server:zabbix-server
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /etc/timezone:/etc/timezone:ro
|
# - /etc/timezone:/etc/timezone:ro
|
||||||
- ./zbx_env/etc/ssl/apache2:/etc/ssl/apache2:ro
|
- ./zbx_env/etc/ssl/apache2:/etc/ssl/apache2:ro
|
||||||
- ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro
|
- ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro
|
||||||
# - ./.ZBX_DB_CA_FILE:/run/secrets/root-ca.pem:ro
|
# - ./.ZBX_DB_CA_FILE:/run/secrets/root-ca.pem:ro
|
||||||
@ -260,7 +260,7 @@ services:
|
|||||||
- zabbix-server:zabbix-server
|
- zabbix-server:zabbix-server
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /etc/timezone:/etc/timezone:ro
|
# - /etc/timezone:/etc/timezone:ro
|
||||||
- ./zbx_env/etc/ssl/nginx:/etc/ssl/nginx:ro
|
- ./zbx_env/etc/ssl/nginx:/etc/ssl/nginx:ro
|
||||||
- ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro
|
- ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro
|
||||||
# - ./.ZBX_DB_CA_FILE:/run/secrets/root-ca.pem:ro
|
# - ./.ZBX_DB_CA_FILE:/run/secrets/root-ca.pem:ro
|
||||||
|
@ -1,60 +1,46 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix Java Gateway" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix Java Gateway performs native support for monitoring JMX applications" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
ZBX_TYPE=java-gateway 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 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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
--no-create-home \
|
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix/ && \
|
mkdir -p /etc/zabbix/ && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
apt-get -y update && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
|
||||||
openjdk-8-jre-headless && \
|
openjdk-8-jre-headless && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
org.label-schema.docker.cmd="docker run --name zabbix-${ZBX_TYPE} --link zabbix-server:zabbix-server -p 10052:10052 -d zabbix-${ZBX_TYPE}:ubuntu-${ZBX_VERSION}"
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
libc6-dev \
|
libc6-dev \
|
||||||
@ -84,7 +70,7 @@ RUN set -eux && \
|
|||||||
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
libc6-dev \
|
libc6-dev \
|
||||||
@ -93,8 +79,11 @@ RUN set -eux && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
gcc && \
|
gcc && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
|
chgrp -R 0 /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /usr/sbin/zabbix_java/ && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 10052/TCP
|
EXPOSE 10052/TCP
|
||||||
@ -103,8 +92,11 @@ WORKDIR /var/lib/zabbix
|
|||||||
|
|
||||||
VOLUME ["/usr/sbin/zabbix_java/ext_lib"]
|
VOLUME ["/usr/sbin/zabbix_java/ext_lib"]
|
||||||
|
|
||||||
COPY ["conf/etc/zabbix/zabbix_java_gateway_logback.xml", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
COPY ["conf/usr/sbin/zabbix_java_gateway", "/usr/sbin/"]
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_java_gateway"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,44 +1,28 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ARG DB_TYPE=mysql
|
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=proxy ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
|
||||||
ENV TINI_VERSION v0.18.0
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
|
|
||||||
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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
ENV TINI_VERSION=v0.19.0
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/mibs && \
|
mkdir -p /var/lib/zabbix/mibs && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||||
@ -47,10 +31,15 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \
|
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
fping \
|
fping \
|
||||||
libcurl4 \
|
libcurl4 \
|
||||||
libevent-2.1 \
|
libevent-2.1 \
|
||||||
@ -63,27 +52,32 @@ RUN set -eux && \
|
|||||||
libxml2 \
|
libxml2 \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
snmp-mibs-downloader \
|
snmp-mibs-downloader \
|
||||||
ca-certificates \
|
|
||||||
unixodbc && \
|
unixodbc && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||||
|
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||||
|
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||||
|
rm -rf /root/.gnupg && \
|
||||||
|
chmod +x /sbin/tini && \
|
||||||
|
apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -114,8 +108,8 @@ RUN set -eux && \
|
|||||||
--sysconfdir=/etc/zabbix \
|
--sysconfdir=/etc/zabbix \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-agent \
|
--enable-agent \
|
||||||
--enable-${ZBX_TYPE} \
|
--enable-proxy \
|
||||||
--with-${ZBX_DB_TYPE} \
|
--with-mysql \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-libcurl \
|
--with-libcurl \
|
||||||
--with-libxml2 \
|
--with-libxml2 \
|
||||||
@ -128,17 +122,19 @@ RUN set -eux && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema && \
|
make -j"$(nproc)" -s dbschema && \
|
||||||
make -j"$(nproc)" -s && \
|
make -j"$(nproc)" -s && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/mysql/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
cp database/mysql/create.sql.gz /usr/share/doc/zabbix-proxy-mysql/ && \
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -156,7 +152,7 @@ RUN set -eux && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
unixodbc-dev && \
|
unixodbc-dev && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
chmod +x /sbin/tini
|
chmod +x /sbin/tini
|
||||||
|
|
||||||
@ -170,3 +166,7 @@ VOLUME ["/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbi
|
|||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_proxy", "--foreground", "-c", "/etc/zabbix/zabbix_proxy.conf"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,43 +1,28 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix proxy (MySQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=proxy ZBX_DB_TYPE=sqlite3 ZBX_OPT_TYPE=none
|
|
||||||
ENV TINI_VERSION v0.18.0
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix ${ZBX_TYPE} with SQLite3 database support" \
|
|
||||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
|
||||||
org.label-schema.build-date="${BUILD_DATE}" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.license="GPL v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
ENV TINI_VERSION=v0.19.0
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/mibs && \
|
mkdir -p /var/lib/zabbix/mibs && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||||
@ -46,9 +31,15 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
mkdir -p /usr/share/doc/zabbix-proxy-mysql && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
fping \
|
fping \
|
||||||
libcurl4 \
|
libcurl4 \
|
||||||
libevent-2.1 \
|
libevent-2.1 \
|
||||||
@ -60,27 +51,32 @@ RUN set -eux && \
|
|||||||
libssl1.1 \
|
libssl1.1 \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
snmp-mibs-downloader \
|
snmp-mibs-downloader \
|
||||||
ca-certificates \
|
|
||||||
unixodbc && \
|
unixodbc && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||||
|
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||||
|
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||||
|
rm -rf /root/.gnupg && \
|
||||||
|
chmod +x /sbin/tini && \
|
||||||
|
apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -111,8 +107,8 @@ RUN set -eux && \
|
|||||||
--sysconfdir=/etc/zabbix \
|
--sysconfdir=/etc/zabbix \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-agent \
|
--enable-agent \
|
||||||
--enable-${ZBX_TYPE} \
|
--enable-proxy \
|
||||||
--with-${ZBX_DB_TYPE} \
|
--with-sqlite3 \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-libcurl \
|
--with-libcurl \
|
||||||
--with-libxml2 \
|
--with-libxml2 \
|
||||||
@ -125,14 +121,16 @@ RUN set -eux && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema && \
|
make -j"$(nproc)" -s dbschema && \
|
||||||
make -j"$(nproc)" -s && \
|
make -j"$(nproc)" -s && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -150,7 +148,7 @@ RUN set -eux && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
unixodbc-dev && \
|
unixodbc-dev && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
chmod +x /sbin/tini
|
chmod +x /sbin/tini
|
||||||
|
|
||||||
@ -164,3 +162,7 @@ VOLUME ["/var/lib/zabbix/ssh_keys", "/var/lib/zabbix/ssl/certs", "/var/lib/zabbi
|
|||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_proxy", "--foreground", "-c", "/etc/zabbix/zabbix_proxy.conf"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +1,29 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix server (MySQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=server ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=none
|
|
||||||
ENV TINI_VERSION v0.18.0
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
|
|
||||||
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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
ENV TINI_VERSION=v0.19.0
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
||||||
addgroup --system --quiet zabbix && \
|
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
usermod -G zabbix,dialout zabbix && \
|
usermod -G zabbix,dialout zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /var/lib/zabbix/export && \
|
mkdir -p /var/lib/zabbix/export && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/mibs && \
|
mkdir -p /var/lib/zabbix/mibs && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||||
@ -49,10 +32,16 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
mkdir -p /usr/share/doc/zabbix-server-mysql && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
traceroute \
|
traceroute \
|
||||||
fping \
|
fping \
|
||||||
@ -67,27 +56,32 @@ RUN set -eux && \
|
|||||||
libxml2 \
|
libxml2 \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
snmp-mibs-downloader \
|
snmp-mibs-downloader \
|
||||||
ca-certificates \
|
|
||||||
unixodbc && \
|
unixodbc && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||||
|
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||||
|
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||||
|
rm -rf /root/.gnupg && \
|
||||||
|
chmod +x /sbin/tini && \
|
||||||
|
apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -118,8 +112,8 @@ RUN set -eux && \
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc/zabbix \
|
--sysconfdir=/etc/zabbix \
|
||||||
--enable-agent \
|
--enable-agent \
|
||||||
--enable-${ZBX_TYPE} \
|
--enable-server \
|
||||||
--with-${ZBX_DB_TYPE} \
|
--with-mysql \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-libcurl \
|
--with-libcurl \
|
||||||
--with-libxml2 \
|
--with-libxml2 \
|
||||||
@ -132,19 +126,21 @@ RUN set -eux && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema && \
|
make -j"$(nproc)" -s dbschema && \
|
||||||
make -j"$(nproc)" -s && \
|
make -j"$(nproc)" -s && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
cat database/mysql/schema.sql > database/mysql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/mysql/images.sql >> database/mysql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/mysql/data.sql >> database/mysql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/mysql/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
cp database/mysql/create.sql.gz /usr/share/doc/zabbix-server-mysql/ && \
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -162,9 +158,8 @@ RUN set -eux && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
unixodbc-dev && \
|
unixodbc-dev && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/*
|
||||||
chmod +x /sbin/tini
|
|
||||||
|
|
||||||
EXPOSE 10051/TCP
|
EXPOSE 10051/TCP
|
||||||
|
|
||||||
@ -177,3 +172,7 @@ VOLUME ["/var/lib/zabbix/export"]
|
|||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_server", "--foreground", "-c", "/etc/zabbix/zabbix_server.conf"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +1,29 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
|
||||||
ZBX_TYPE=server ZBX_DB_TYPE=postgresql ZBX_OPT_TYPE=none
|
|
||||||
ENV TINI_VERSION v0.18.0
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
|
|
||||||
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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
|
ENV TINI_VERSION=v0.19.0
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
||||||
addgroup --system --quiet zabbix && \
|
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
usermod -G zabbix,dialout zabbix && \
|
usermod -G zabbix,dialout zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /var/lib/zabbix && \
|
mkdir -p /var/lib/zabbix && \
|
||||||
mkdir -p /usr/lib/zabbix/alertscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /var/lib/zabbix/export && \
|
mkdir -p /var/lib/zabbix/export && \
|
||||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
|
||||||
mkdir -p /var/lib/zabbix/mibs && \
|
mkdir -p /var/lib/zabbix/mibs && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||||
@ -49,10 +32,16 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||||
chown --quiet -R zabbix:root /var/lib/zabbix && \
|
mkdir -p /usr/lib/zabbix/alertscripts && \
|
||||||
mkdir -p /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE} && \
|
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
mkdir -p /usr/share/doc/zabbix-server-postgresql && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
traceroute \
|
traceroute \
|
||||||
fping \
|
fping \
|
||||||
@ -67,27 +56,32 @@ RUN set -eux && \
|
|||||||
libxml2 \
|
libxml2 \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
snmp-mibs-downloader \
|
snmp-mibs-downloader \
|
||||||
ca-certificates \
|
|
||||||
unixodbc && \
|
unixodbc && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tini.asc && \
|
||||||
|
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 && \
|
||||||
|
gpg --batch --verify /tini.asc /sbin/tini && \
|
||||||
|
rm -rf /root/.gnupg && \
|
||||||
|
chmod +x /sbin/tini && \
|
||||||
|
apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
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:ubuntu-${ZBX_VERSION}"
|
|
||||||
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -118,8 +112,8 @@ RUN set -eux && \
|
|||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc/zabbix \
|
--sysconfdir=/etc/zabbix \
|
||||||
--enable-agent \
|
--enable-agent \
|
||||||
--enable-${ZBX_TYPE} \
|
--enable-server \
|
||||||
--with-${ZBX_DB_TYPE} \
|
--with-postgresql \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-libcurl \
|
--with-libcurl \
|
||||||
--with-libxml2 \
|
--with-libxml2 \
|
||||||
@ -132,20 +126,22 @@ RUN set -eux && \
|
|||||||
--silent && \
|
--silent && \
|
||||||
make -j"$(nproc)" -s dbschema && \
|
make -j"$(nproc)" -s dbschema && \
|
||||||
make -j"$(nproc)" -s && \
|
make -j"$(nproc)" -s && \
|
||||||
cp src/zabbix_${ZBX_TYPE}/zabbix_${ZBX_TYPE} /usr/sbin/zabbix_${ZBX_TYPE} && \
|
cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \
|
||||||
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
cp src/zabbix_get/zabbix_get /usr/bin/zabbix_get && \
|
||||||
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
cp src/zabbix_sender/zabbix_sender /usr/bin/zabbix_sender && \
|
||||||
cp conf/zabbix_${ZBX_TYPE}.conf /etc/zabbix/zabbix_${ZBX_TYPE}.conf && \
|
cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
cat database/postgresql/schema.sql > database/postgresql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/schema.sql > database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/postgresql/images.sql >> database/postgresql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/images.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
cat database/postgresql/data.sql >> database/postgresql/create.sql && \
|
||||||
cat database/${ZBX_DB_TYPE}/data.sql >> database/${ZBX_DB_TYPE}/create.sql && \
|
gzip database/postgresql/create.sql && \
|
||||||
gzip database/${ZBX_DB_TYPE}/create.sql && \
|
cp database/postgresql/create.sql.gz /usr/share/doc/zabbix-server-postgresql/ && \
|
||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
cp database/postgresql/timescaledb.sql /usr/share/doc/zabbix-server-postgresql/timescaledb.sql && \
|
||||||
cp database/${ZBX_DB_TYPE}/timescaledb.sql /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
gcc \
|
gcc \
|
||||||
@ -163,7 +159,7 @@ RUN set -eux && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
git \
|
git \
|
||||||
unixodbc-dev && \
|
unixodbc-dev && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
chmod +x /sbin/tini
|
chmod +x /sbin/tini
|
||||||
|
|
||||||
@ -178,3 +174,7 @@ VOLUME ["/var/lib/zabbix/export"]
|
|||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/zabbix_server", "--foreground", "-c", "/etc/zabbix/zabbix_server.conf"]
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,2 +1 @@
|
|||||||
build.sh
|
build.sh
|
||||||
snmptrapfmt_1.14+nmu1ubuntu2.tar.gz
|
|
@ -1,60 +1,62 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
|
||||||
ARG APT_FLAGS_PERSISTENT="${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 TERM=xterm \
|
|
||||||
MIBDIRS=/var/lib/mibs/iana:/var/lib/mibs/ietf:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-snmptraps-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix SNMP traps receiver" \
|
|
||||||
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"
|
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
org.label-schema.version="1.14" \
|
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
|
||||||
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:ubuntu-${ZBX_VERSION}"
|
LABEL org.opencontainers.image.title="zabbix-snmptraps-ubuntu" \
|
||||||
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
|
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||||
|
org.opencontainers.image.licenses="GPL v2.0" \
|
||||||
|
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="https://anonscm.debian.org/gitweb/?p=collab-maint/snmptrapfmt.git"
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
COPY ["snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb", "/tmp/"]
|
COPY ["snmptrapfmt_1.14+nmu1ubuntu2.tar.gz", "/tmp/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
zabbix && \
|
zabbix && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
snmp-mibs-downloader \
|
snmp-mibs-downloader \
|
||||||
snmptrapd \
|
snmptrapd \
|
||||||
supervisor && \
|
supervisor && \
|
||||||
download-mibs && \
|
download-mibs && \
|
||||||
dpkg -i /tmp/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
gcc \
|
||||||
|
patch \
|
||||||
|
make \
|
||||||
|
libc6-dev \
|
||||||
|
libsnmp-dev && \
|
||||||
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 && \
|
cd /tmp/ && \
|
||||||
|
tar -zxvf snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
||||||
|
ls -lah && \
|
||||||
|
cd /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
||||||
|
patch -p1 < ./patches/makefile.patch && \
|
||||||
|
patch -p1 < ./patches/pid_location.patch && \
|
||||||
|
make -j"$(nproc)" -s && \
|
||||||
|
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 \
|
||||||
@ -62,8 +64,20 @@ RUN set -eux && \
|
|||||||
-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_amd64.deb && \
|
rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove 1>/dev/null && \
|
rm -rf /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||||
|
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||||
|
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
gcc \
|
||||||
|
patch \
|
||||||
|
make \
|
||||||
|
libc6-dev \
|
||||||
|
libsnmp-dev && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 162/UDP
|
EXPOSE 162/UDP
|
||||||
@ -75,4 +89,6 @@ VOLUME ["/var/lib/zabbix/snmptraps", "/var/lib/zabbix/mibs"]
|
|||||||
COPY ["conf/etc/supervisor/", "/etc/supervisor/"]
|
COPY ["conf/etc/supervisor/", "/etc/supervisor/"]
|
||||||
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
COPY ["conf/etc/logrotate.d/zabbix_snmptraps", "/etc/logrotate.d/"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||||
|
@ -17,7 +17,7 @@ stdout_logfile = /dev/stdout
|
|||||||
stdout_logfile_maxbytes = 0
|
stdout_logfile_maxbytes = 0
|
||||||
|
|
||||||
[program:snmptrapd]
|
[program:snmptrapd]
|
||||||
command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs:/var/lib/snmp/mibs/iana:/var/lib/snmp/mibs/ietf:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf
|
command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs:/var/lib/snmp/mibs/iana:/var/lib/snmp/mibs/ietf:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf udp:0.0.0.0:1162
|
||||||
auto_start = true
|
auto_start = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
priority = 100
|
priority = 100
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
; supervisor config file
|
; supervisor config file
|
||||||
|
|
||||||
[unix_http_server]
|
[unix_http_server]
|
||||||
file = /var/run/supervisor.sock ; (the path to the socket file)
|
file = /tmp/supervisor.sock ; (the path to the socket file)
|
||||||
chmod = 0700 ; sockef file mode (default 0700)
|
chmod = 0700 ; sockef file mode (default 0700)
|
||||||
username = zbx
|
username = zbx
|
||||||
password = password
|
password = password
|
||||||
|
|
||||||
[supervisord]
|
[supervisord]
|
||||||
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
||||||
pidfile = /var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
pidfile = /tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||||
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
||||||
critical = critical
|
critical = critical
|
||||||
user = root
|
;user = zabbix
|
||||||
logfile_maxbytes = 0
|
logfile_maxbytes = 0
|
||||||
logfile_backupcount = 0
|
logfile_backupcount = 0
|
||||||
loglevel = info
|
loglevel = info
|
||||||
@ -23,7 +23,7 @@ loglevel = info
|
|||||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
[supervisorctl]
|
[supervisorctl]
|
||||||
serverurl = unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
|
serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||||
|
|
||||||
; The [include] section can just contain the "files" setting. This
|
; The [include] section can just contain the "files" setting. This
|
||||||
; setting can list multiple files (separated by whitespace or
|
; setting can list multiple files (separated by whitespace or
|
||||||
|
Binary file not shown.
@ -1,47 +1,33 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, MySQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with MySQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TERM=xterm \
|
|
||||||
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=apache
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${DB_TYPE}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix web-interface based on Apache2 web server 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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
--no-create-home \
|
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
apt-get -y update && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
|
||||||
apache2 \
|
apache2 \
|
||||||
curl \
|
curl \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
|
ca-certificates \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
|
locales \
|
||||||
php7.2-bcmath \
|
php7.2-bcmath \
|
||||||
php7.2-gd \
|
php7.2-gd \
|
||||||
php7.2-json \
|
php7.2-json \
|
||||||
@ -49,25 +35,41 @@ RUN set -eux && \
|
|||||||
php7.2-mbstring \
|
php7.2-mbstring \
|
||||||
php7.2-mysql \
|
php7.2-mysql \
|
||||||
php7.2-xml && \
|
php7.2-xml && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
rm -f /etc/apache2/sites-available/* && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
rm -f /etc/apache2/sites-enabled/* && \
|
||||||
|
/usr/sbin/a2enmod ssl && \
|
||||||
|
sed -ri \
|
||||||
|
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
|
||||||
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
|
"/etc/apache2/apache2.conf" && \
|
||||||
|
sed -ri \
|
||||||
|
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
|
||||||
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
|
"/etc/apache2/conf-available/other-vhosts-access-log.conf" && \
|
||||||
|
sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \
|
||||||
|
sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf && \
|
||||||
|
sed -i 's|/var/run/apache2$SUFFIX|/tmp|g' /etc/apache2/envvars && \
|
||||||
|
rm -f /var/run/apache2/apache2.pid && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
gettext \
|
gettext \
|
||||||
ca-certificates \
|
|
||||||
git && \
|
git && \
|
||||||
cd /usr/share/ && \
|
cd /usr/share/ && \
|
||||||
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
||||||
@ -78,6 +80,8 @@ RUN set -eux && \
|
|||||||
rm -f conf/zabbix.conf.php && \
|
rm -f conf/zabbix.conf.php && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
|
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||||
|
./locale/make_mo.sh && \
|
||||||
mkdir -p /var/lib/locales/supported.d/ && \
|
mkdir -p /var/lib/locales/supported.d/ && \
|
||||||
rm -f /var/lib/locales/supported.d/local && \
|
rm -f /var/lib/locales/supported.d/local && \
|
||||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||||
@ -86,24 +90,29 @@ RUN set -eux && \
|
|||||||
dpkg-reconfigure locales && \
|
dpkg-reconfigure locales && \
|
||||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||||
chown --quiet -R www-data:www-data /usr/share/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
chgrp -R 0 /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
chmod -R g=u /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
gettext \
|
gettext \
|
||||||
git && \
|
git && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 8080/TCP 8443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
|
||||||
VOLUME ["/etc/ssl/apache2", "/usr/share/zabbix/modules"]
|
VOLUME ["/etc/ssl/apache2", "/usr/share/zabbix/modules"]
|
||||||
|
|
||||||
COPY ["conf/etc/zabbix/apache.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/apache_ssl.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/web/zabbix.conf.php", "/etc/zabbix/web/"]
|
|
||||||
COPY ["conf/etc/php/7.2/apache2/conf.d/99-zabbix.ini", "/etc/php/7.2/apache2/conf.d/"]
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
|
||||||
|
@ -6,4 +6,4 @@ max_input_time=300
|
|||||||
always_populate_raw_post_date=-1
|
always_populate_raw_post_date=-1
|
||||||
max_input_vars=10000
|
max_input_vars=10000
|
||||||
; date.timezone=Europe/Riga
|
; date.timezone=Europe/Riga
|
||||||
session.save_path=/var/lib/php/sessions
|
;session.save_path=/var/lib/php/session
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:8080>
|
||||||
DocumentRoot /usr/share/zabbix/
|
DocumentRoot /usr/share/zabbix/
|
||||||
ServerName zabbix
|
ServerName zabbix
|
||||||
DirectoryIndex index.php
|
DirectoryIndex index.php
|
||||||
|
@ -3,7 +3,7 @@ LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so
|
|||||||
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
||||||
|
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:8443>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
|
|
||||||
DocumentRoot /usr/share/zabbix/
|
DocumentRoot /usr/share/zabbix/
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +1,32 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Apache, PostgreSQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix web-interface based on Apache2 web server with PostgreSQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 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}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix web-interface based on Apache2 web server 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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
addgroup --system --quiet zabbix && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
--no-create-home \
|
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
apt-get -y update && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
|
||||||
apache2 \
|
apache2 \
|
||||||
curl \
|
curl \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
|
ca-certificates \
|
||||||
|
locales \
|
||||||
php7.2-bcmath \
|
php7.2-bcmath \
|
||||||
php7.2-gd \
|
php7.2-gd \
|
||||||
php7.2-json \
|
php7.2-json \
|
||||||
@ -48,28 +34,42 @@ RUN set -eux && \
|
|||||||
php7.2-mbstring \
|
php7.2-mbstring \
|
||||||
php7.2-xml \
|
php7.2-xml \
|
||||||
php7.2-pgsql \
|
php7.2-pgsql \
|
||||||
postgresql-client \
|
postgresql-client && \
|
||||||
ttf-dejavu-core && \
|
rm -f /etc/apache2/sites-available/* && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
rm -f /etc/apache2/sites-enabled/* && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
/usr/sbin/a2enmod ssl && \
|
||||||
|
sed -ri \
|
||||||
|
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
|
||||||
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
|
"/etc/apache2/apache2.conf" && \
|
||||||
|
sed -ri \
|
||||||
|
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
|
||||||
|
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
|
||||||
|
"/etc/apache2/conf-available/other-vhosts-access-log.conf" && \
|
||||||
|
sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \
|
||||||
|
sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf && \
|
||||||
|
sed -i 's|/var/run/apache2$SUFFIX|/tmp|g' /etc/apache2/envvars && \
|
||||||
|
rm -f /var/run/apache2/apache2.pid && \
|
||||||
|
apt-get -y autoremove && \
|
||||||
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
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:ubuntu-${ZBX_VERSION}"
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
gettext \
|
gettext \
|
||||||
patch \
|
|
||||||
ca-certificates \
|
|
||||||
git && \
|
git && \
|
||||||
cd /usr/share/ && \
|
cd /usr/share/ && \
|
||||||
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
git clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch zabbix-${ZBX_VERSION} && \
|
||||||
@ -80,6 +80,8 @@ RUN set -eux && \
|
|||||||
rm -f conf/zabbix.conf.php && \
|
rm -f conf/zabbix.conf.php && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
|
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||||
|
./locale/make_mo.sh && \
|
||||||
mkdir -p /var/lib/locales/supported.d/ && \
|
mkdir -p /var/lib/locales/supported.d/ && \
|
||||||
rm -f /var/lib/locales/supported.d/local && \
|
rm -f /var/lib/locales/supported.d/local && \
|
||||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||||
@ -88,25 +90,29 @@ RUN set -eux && \
|
|||||||
dpkg-reconfigure locales && \
|
dpkg-reconfigure locales && \
|
||||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||||
chown --quiet -R www-data:www-data /usr/share/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
chgrp -R 0 /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
chmod -R g=u /etc/apache2/ /etc/php/7.2/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
gettext \
|
gettext \
|
||||||
patch \
|
|
||||||
git && \
|
git && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 8080/TCP 8443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
|
||||||
VOLUME ["/etc/ssl/apache2"]
|
VOLUME ["/etc/ssl/apache2"]
|
||||||
|
|
||||||
COPY ["conf/etc/zabbix/apache.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/apache_ssl.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/web/zabbix.conf.php", "/etc/zabbix/web/"]
|
|
||||||
COPY ["conf/etc/php/7.2/apache2/conf.d/99-zabbix.ini", "/etc/php/7.2/apache2/conf.d/"]
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:8080>
|
||||||
DocumentRoot /usr/share/zabbix/
|
DocumentRoot /usr/share/zabbix/
|
||||||
ServerName zabbix
|
ServerName zabbix
|
||||||
DirectoryIndex index.php
|
DirectoryIndex index.php
|
||||||
|
@ -3,7 +3,7 @@ LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so
|
|||||||
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
||||||
|
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:8443>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
|
|
||||||
DocumentRoot /usr/share/zabbix/
|
DocumentRoot /usr/share/zabbix/
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 8443 ssl http2;
|
||||||
server_name zabbix;
|
server_name zabbix;
|
||||||
server_name_in_redirect off;
|
server_name_in_redirect off;
|
||||||
|
|
||||||
|
@ -229,8 +229,6 @@ prepare_web_server() {
|
|||||||
else
|
else
|
||||||
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
echo "**** Impossible to enable SSL support for Nginx. Certificates are missed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_deploy() {
|
clear_deploy() {
|
||||||
|
@ -1,42 +1,31 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, MySQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with MySQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 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}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix web-interface based on Nginx web server 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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
||||||
addgroup --system --quiet zabbix && \
|
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
--no-create-home \
|
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
mkdir -p /var/lib/php/session && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
|
ca-certificates && \
|
||||||
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
||||||
found=''; \
|
found=''; \
|
||||||
for server in \
|
for server in \
|
||||||
@ -51,11 +40,12 @@ RUN set -eux && \
|
|||||||
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
||||||
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
||||||
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
curl \
|
curl \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
nginx \
|
nginx \
|
||||||
|
locales \
|
||||||
php7.2-bcmath \
|
php7.2-bcmath \
|
||||||
php7.2-fpm \
|
php7.2-fpm \
|
||||||
php7.2-gd \
|
php7.2-gd \
|
||||||
@ -66,28 +56,28 @@ RUN set -eux && \
|
|||||||
php7.2-xml \
|
php7.2-xml \
|
||||||
supervisor && \
|
supervisor && \
|
||||||
rm -f /etc/nginx/conf.d/*.conf && \
|
rm -f /etc/nginx/conf.d/*.conf && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
rm -rf /var/cache/nginx/ && \
|
||||||
wget && \
|
rm -f /etc/php/7.2/fpm/pool.d/www.conf && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y autoremove && \
|
||||||
mkdir -p /var/lib/php7 && \
|
apt-get -y clean && \
|
||||||
chown --quiet -R www-data:www-data /var/lib/php7 && \
|
|
||||||
rm -rf /var/cache/nginx/* && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
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}:ubuntu-${ZBX_VERSION}"
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
gettext \
|
gettext \
|
||||||
git && \
|
git && \
|
||||||
cd /usr/share/ && \
|
cd /usr/share/ && \
|
||||||
@ -99,6 +89,8 @@ RUN set -eux && \
|
|||||||
rm -f conf/zabbix.conf.php && \
|
rm -f conf/zabbix.conf.php && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
|
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||||
|
./locale/make_mo.sh && \
|
||||||
mkdir -p /var/lib/locales/supported.d/ && \
|
mkdir -p /var/lib/locales/supported.d/ && \
|
||||||
rm -f /var/lib/locales/supported.d/local && \
|
rm -f /var/lib/locales/supported.d/local && \
|
||||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||||
@ -107,26 +99,30 @@ RUN set -eux && \
|
|||||||
dpkg-reconfigure locales && \
|
dpkg-reconfigure locales && \
|
||||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||||
chown --quiet -R www-data:www-data /usr/share/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chown --quiet -R zabbix:root /var/lib/php/session/ && \
|
||||||
|
chgrp -R 0 /var/lib/php/session/ && \
|
||||||
|
chmod -R g=u /var/lib/php/session/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
gettext \
|
gettext \
|
||||||
git && \
|
git && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 8080/TCP 8443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
|
||||||
VOLUME ["/etc/ssl/nginx"]
|
VOLUME ["/etc/ssl/nginx"]
|
||||||
|
|
||||||
COPY ["conf/etc/supervisor/", "/etc/supervisor/"]
|
|
||||||
COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/nginx_ssl.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/web/zabbix.conf.php", "/etc/zabbix/web/"]
|
|
||||||
COPY ["conf/etc/nginx/nginx.conf", "/etc/nginx/"]
|
|
||||||
COPY ["conf/etc/php/7.2/fpm/conf.d/99-zabbix.ini", "/etc/php/7.2/fpm/conf.d/"]
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
user www-data;
|
#user nginx;
|
||||||
worker_processes 5;
|
worker_processes 5;
|
||||||
#worker_rlimit_nofile 256000;
|
worker_rlimit_nofile 256000;
|
||||||
|
|
||||||
error_log /dev/fd/2 warn;
|
error_log /dev/fd/2 error;
|
||||||
|
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 5120;
|
worker_connections 5120;
|
||||||
@ -21,6 +21,13 @@ http {
|
|||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /dev/fd/1 main;
|
access_log /dev/fd/1 main;
|
||||||
|
error_log /dev/fd/2 error;
|
||||||
|
|
||||||
|
client_body_temp_path /tmp/client_body 1 2;
|
||||||
|
proxy_temp_path /tmp/proxy 1 2;
|
||||||
|
fastcgi_temp_path /tmp/fastcgi 1 2;
|
||||||
|
uwsgi_temp_path /tmp/uwsgi 1 2;
|
||||||
|
scgi_temp_path /tmp/scgi 1 2;
|
||||||
|
|
||||||
client_body_timeout 5m;
|
client_body_timeout 5m;
|
||||||
send_timeout 5m;
|
send_timeout 5m;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
max_execution_time=300
|
|
||||||
memory_limit=128M
|
|
||||||
post_max_size=16M
|
|
||||||
upload_max_filesize=2M
|
|
||||||
max_input_time=300
|
|
||||||
always_populate_raw_post_date=-1
|
|
||||||
max_input_vars=10000
|
|
||||||
; date.timezone=Europe/Riga
|
|
||||||
session.save_path=/var/lib/php7
|
|
9
web-nginx-mysql/ubuntu/conf/etc/php/7.2/fpm/php-fpm.conf
Normal file
9
web-nginx-mysql/ubuntu/conf/etc/php/7.2/fpm/php-fpm.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
include=/etc/php/7.2/fpm/pool.d/*.conf
|
||||||
|
|
||||||
|
[global]
|
||||||
|
|
||||||
|
pid = /tmp/php-fpm.pid
|
||||||
|
|
||||||
|
error_log = /dev/fd/2
|
||||||
|
|
||||||
|
daemonize = no
|
@ -0,0 +1,25 @@
|
|||||||
|
[zabbix]
|
||||||
|
|
||||||
|
listen = /tmp/php-fpm.sock
|
||||||
|
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 50
|
||||||
|
pm.start_servers = 5
|
||||||
|
pm.min_spare_servers = 5
|
||||||
|
pm.max_spare_servers = 35
|
||||||
|
|
||||||
|
slowlog = /dev/fd/1
|
||||||
|
|
||||||
|
php_admin_value[error_log] = /dev/fd/2
|
||||||
|
php_admin_flag[log_errors] = on
|
||||||
|
|
||||||
|
php_value[session.save_handler] = files
|
||||||
|
php_value[session.save_path] = /var/lib/php/session
|
||||||
|
|
||||||
|
php_value[max_execution_time]= 300
|
||||||
|
php_value[memory_limit]= 128M
|
||||||
|
php_value[post_max_size]= 16M
|
||||||
|
php_value[upload_max_filesize]= 2M
|
||||||
|
php_value[max_input_time]= 300
|
||||||
|
php_value[max_input_vars]= 10000
|
||||||
|
; php_value[date.timezone]= Europe/Riga
|
@ -1,17 +1,17 @@
|
|||||||
; supervisor config file
|
; supervisor config file
|
||||||
|
|
||||||
[unix_http_server]
|
[unix_http_server]
|
||||||
file = /var/run/supervisor.sock ; (the path to the socket file)
|
file = /tmp/supervisor.sock ; (the path to the socket file)
|
||||||
chmod = 0700 ; sockef file mode (default 0700)
|
chmod = 0700 ; sockef file mode (default 0700)
|
||||||
username = zbx
|
username = zbx
|
||||||
password = password
|
password = password
|
||||||
|
|
||||||
[supervisord]
|
[supervisord]
|
||||||
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
||||||
pidfile = /var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
pidfile = /tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||||
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
||||||
critical = critical
|
critical = critical
|
||||||
user = root
|
;user = zabbix
|
||||||
logfile_maxbytes = 0
|
logfile_maxbytes = 0
|
||||||
logfile_backupcount = 0
|
logfile_backupcount = 0
|
||||||
loglevel = info
|
loglevel = info
|
||||||
@ -23,7 +23,7 @@ loglevel = info
|
|||||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
[supervisorctl]
|
[supervisorctl]
|
||||||
serverurl = unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
|
serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||||
|
|
||||||
; The [include] section can just contain the "files" setting. This
|
; The [include] section can just contain the "files" setting. This
|
||||||
; setting can list multiple files (separated by whitespace or
|
; setting can list multiple files (separated by whitespace or
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8080;
|
||||||
server_name zabbix;
|
server_name zabbix;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ .php$ {
|
location ~ .php$ {
|
||||||
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 8443 ssl http2;
|
||||||
server_name zabbix;
|
server_name zabbix;
|
||||||
server_name_in_redirect off;
|
server_name_in_redirect off;
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ .php$ {
|
location ~ .php$ {
|
||||||
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -241,12 +241,6 @@ prepare_zbx_web_config() {
|
|||||||
ZBX_WWW_ROOT="/usr/share/zabbix"
|
ZBX_WWW_ROOT="/usr/share/zabbix"
|
||||||
ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php"
|
ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php"
|
||||||
|
|
||||||
if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then
|
|
||||||
rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php"
|
|
||||||
|
|
||||||
PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf"
|
PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf"
|
||||||
|
|
||||||
update_config_var "$PHP_CONFIG_FILE" "php_value[max_execution_time]" "${ZBX_MAXEXECUTIONTIME:-"600"}"
|
update_config_var "$PHP_CONFIG_FILE" "php_value[max_execution_time]" "${ZBX_MAXEXECUTIONTIME:-"600"}"
|
||||||
|
@ -1,42 +1,31 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
LABEL maintainer="Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
LABEL org.opencontainers.image.title="Zabbix web-interface (Nginx, PostgreSQL)" \
|
||||||
ARG VCS_REF
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
|
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||||
ARG APT_FLAGS_COMMON="-y"
|
org.opencontainers.image.url="https://zabbix.com/" \
|
||||||
ARG APT_FLAGS_PERSISTENT="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.description="Zabbix web-interface based on Nginx web server with PostgreSQL database support" \
|
||||||
ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
|
org.opencontainers.image.licenses="GPL v2.0"
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 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}-ubuntu" \
|
|
||||||
org.label-schema.vendor="Zabbix LLC" \
|
|
||||||
org.label-schema.url="https://zabbix.com/" \
|
|
||||||
org.label-schema.description="Zabbix web-interface based on Nginx web server 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 v2.0"
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
addgroup --system --gid 1995 --quiet zabbix && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \
|
|
||||||
locale-gen $LC_ALL && \
|
|
||||||
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
||||||
addgroup --system --quiet zabbix && \
|
|
||||||
adduser --quiet \
|
adduser --quiet \
|
||||||
--system --disabled-login \
|
--system --disabled-login \
|
||||||
--ingroup zabbix \
|
--ingroup zabbix --ingroup root \
|
||||||
|
--uid 1997 \
|
||||||
--home /var/lib/zabbix/ \
|
--home /var/lib/zabbix/ \
|
||||||
--no-create-home \
|
|
||||||
zabbix && \
|
zabbix && \
|
||||||
mkdir -p /etc/zabbix && \
|
mkdir -p /etc/zabbix && \
|
||||||
mkdir -p /etc/zabbix/web && \
|
mkdir -p /etc/zabbix/web && \
|
||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
mkdir -p /var/lib/php/session && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
|
gpg \
|
||||||
|
dirmngr \
|
||||||
|
gpg-agent \
|
||||||
|
ca-certificates && \
|
||||||
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
||||||
found=''; \
|
found=''; \
|
||||||
for server in \
|
for server in \
|
||||||
@ -51,10 +40,11 @@ RUN set -eux && \
|
|||||||
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
||||||
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
||||||
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
curl \
|
curl \
|
||||||
nginx \
|
nginx \
|
||||||
|
locales \
|
||||||
php7.2-bcmath \
|
php7.2-bcmath \
|
||||||
php7.2-fpm \
|
php7.2-fpm \
|
||||||
php7.2-gd \
|
php7.2-gd \
|
||||||
@ -66,28 +56,28 @@ RUN set -eux && \
|
|||||||
postgresql-client \
|
postgresql-client \
|
||||||
supervisor && \
|
supervisor && \
|
||||||
rm -f /etc/nginx/conf.d/*.conf && \
|
rm -f /etc/nginx/conf.d/*.conf && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
rm -rf /var/cache/nginx/ && \
|
||||||
wget && \
|
rm -f /etc/php/7.2/fpm/pool.d/www.conf && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge curl gpg dirmngr gpg-agent && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y autoremove && \
|
||||||
mkdir -p /var/lib/php7 && \
|
apt-get -y clean && \
|
||||||
chown --quiet -R www-data:www-data /var/lib/php7 && \
|
|
||||||
rm -rf /var/cache/nginx/* && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ARG MAJOR_VERSION=5.0
|
ARG MAJOR_VERSION=5.0
|
||||||
ARG ZBX_VERSION=${MAJOR_VERSION}
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
||||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||||
ENV ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
|
||||||
|
|
||||||
LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES}
|
||||||
org.label-schema.version="${ZBX_VERSION}" \
|
|
||||||
org.label-schema.vcs-url="${ZBX_SOURCES}" \
|
LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||||
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:ubuntu-${ZBX_VERSION}"
|
org.opencontainers.image.version="${ZBX_VERSION}" \
|
||||||
|
org.opencontainers.image.source="${ZBX_SOURCES}"
|
||||||
|
|
||||||
|
COPY ["conf/etc/", "/etc/"]
|
||||||
|
|
||||||
RUN set -eux && \
|
RUN set -eux && \
|
||||||
apt-get ${APT_FLAGS_COMMON} update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
|
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||||
gettext \
|
gettext \
|
||||||
git && \
|
git && \
|
||||||
cd /usr/share/ && \
|
cd /usr/share/ && \
|
||||||
@ -99,6 +89,8 @@ RUN set -eux && \
|
|||||||
rm -f conf/zabbix.conf.php && \
|
rm -f conf/zabbix.conf.php && \
|
||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
|
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
|
||||||
|
./locale/make_mo.sh && \
|
||||||
mkdir -p /var/lib/locales/supported.d/ && \
|
mkdir -p /var/lib/locales/supported.d/ && \
|
||||||
rm -f /var/lib/locales/supported.d/local && \
|
rm -f /var/lib/locales/supported.d/local && \
|
||||||
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
|
||||||
@ -107,26 +99,30 @@ RUN set -eux && \
|
|||||||
dpkg-reconfigure locales && \
|
dpkg-reconfigure locales && \
|
||||||
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.po' | xargs rm -f && \
|
||||||
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
find /usr/share/zabbix/locale -name '*.sh' | xargs rm -f && \
|
||||||
chown --quiet -R www-data:www-data /usr/share/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_COMMON} purge \
|
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/conf/ && \
|
||||||
|
chown --quiet -R zabbix:root /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chgrp -R 0 /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chmod -R g=u /etc/nginx/ /etc/php/7.2/fpm/php-fpm.conf /etc/php/7.2/fpm/pool.d/ && \
|
||||||
|
chown --quiet -R zabbix:root /var/lib/php/session/ && \
|
||||||
|
chgrp -R 0 /var/lib/php/session/ && \
|
||||||
|
chmod -R g=u /var/lib/php/session/ && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get -y purge \
|
||||||
gettext \
|
gettext \
|
||||||
git && \
|
git && \
|
||||||
apt-get ${APT_FLAGS_COMMON} autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get ${APT_FLAGS_COMMON} clean && \
|
apt-get -y clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 80/TCP 443/TCP
|
EXPOSE 8080/TCP 8443/TCP
|
||||||
|
|
||||||
WORKDIR /usr/share/zabbix
|
WORKDIR /usr/share/zabbix
|
||||||
|
|
||||||
VOLUME ["/etc/ssl/nginx"]
|
VOLUME ["/etc/ssl/nginx"]
|
||||||
|
|
||||||
COPY ["conf/etc/supervisor/", "/etc/supervisor/"]
|
|
||||||
COPY ["conf/etc/zabbix/nginx.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/nginx_ssl.conf", "/etc/zabbix/"]
|
|
||||||
COPY ["conf/etc/zabbix/web/zabbix.conf.php", "/etc/zabbix/web/"]
|
|
||||||
COPY ["conf/etc/nginx/nginx.conf", "/etc/nginx/"]
|
|
||||||
COPY ["conf/etc/php/7.2/fpm/conf.d/99-zabbix.ini", "/etc/php/7.2/fpm/conf.d/"]
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
USER 1997
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
user www-data;
|
#user nginx;
|
||||||
worker_processes 5;
|
worker_processes 5;
|
||||||
#worker_rlimit_nofile 256000;
|
worker_rlimit_nofile 256000;
|
||||||
|
|
||||||
error_log /dev/fd/2 warn;
|
error_log /dev/fd/2 error;
|
||||||
|
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 5120;
|
worker_connections 5120;
|
||||||
@ -21,6 +21,13 @@ http {
|
|||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /dev/fd/1 main;
|
access_log /dev/fd/1 main;
|
||||||
|
error_log /dev/fd/2 error;
|
||||||
|
|
||||||
|
client_body_temp_path /tmp/client_body 1 2;
|
||||||
|
proxy_temp_path /tmp/proxy 1 2;
|
||||||
|
fastcgi_temp_path /tmp/fastcgi 1 2;
|
||||||
|
uwsgi_temp_path /tmp/uwsgi 1 2;
|
||||||
|
scgi_temp_path /tmp/scgi 1 2;
|
||||||
|
|
||||||
client_body_timeout 5m;
|
client_body_timeout 5m;
|
||||||
send_timeout 5m;
|
send_timeout 5m;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
max_execution_time=300
|
|
||||||
memory_limit=128M
|
|
||||||
post_max_size=16M
|
|
||||||
upload_max_filesize=2M
|
|
||||||
max_input_time=300
|
|
||||||
always_populate_raw_post_date=-1
|
|
||||||
max_input_vars=10000
|
|
||||||
; date.timezone=Europe/Riga
|
|
||||||
session.save_path=/var/lib/php7
|
|
9
web-nginx-pgsql/ubuntu/conf/etc/php/7.2/fpm/php-fpm.conf
Normal file
9
web-nginx-pgsql/ubuntu/conf/etc/php/7.2/fpm/php-fpm.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
include=/etc/php/7.2/fpm/pool.d/*.conf
|
||||||
|
|
||||||
|
[global]
|
||||||
|
|
||||||
|
pid = /tmp/php-fpm.pid
|
||||||
|
|
||||||
|
error_log = /dev/fd/2
|
||||||
|
|
||||||
|
daemonize = no
|
@ -0,0 +1,25 @@
|
|||||||
|
[zabbix]
|
||||||
|
|
||||||
|
listen = /tmp/php-fpm.sock
|
||||||
|
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = 50
|
||||||
|
pm.start_servers = 5
|
||||||
|
pm.min_spare_servers = 5
|
||||||
|
pm.max_spare_servers = 35
|
||||||
|
|
||||||
|
slowlog = /dev/fd/1
|
||||||
|
|
||||||
|
php_admin_value[error_log] = /dev/fd/2
|
||||||
|
php_admin_flag[log_errors] = on
|
||||||
|
|
||||||
|
php_value[session.save_handler] = files
|
||||||
|
php_value[session.save_path] = /var/lib/php/session
|
||||||
|
|
||||||
|
php_value[max_execution_time]= 300
|
||||||
|
php_value[memory_limit]= 128M
|
||||||
|
php_value[post_max_size]= 16M
|
||||||
|
php_value[upload_max_filesize]= 2M
|
||||||
|
php_value[max_input_time]= 300
|
||||||
|
php_value[max_input_vars]= 10000
|
||||||
|
; php_value[date.timezone]= Europe/Riga
|
@ -1,17 +1,17 @@
|
|||||||
; supervisor config file
|
; supervisor config file
|
||||||
|
|
||||||
[unix_http_server]
|
[unix_http_server]
|
||||||
file = /var/run/supervisor.sock ; (the path to the socket file)
|
file = /tmp/supervisor.sock ; (the path to the socket file)
|
||||||
chmod = 0700 ; sockef file mode (default 0700)
|
chmod = 0700 ; sockef file mode (default 0700)
|
||||||
username = zbx
|
username = zbx
|
||||||
password = password
|
password = password
|
||||||
|
|
||||||
[supervisord]
|
[supervisord]
|
||||||
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
|
||||||
pidfile = /var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
pidfile = /tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||||
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
|
||||||
critical = critical
|
critical = critical
|
||||||
user = root
|
;user = zabbix
|
||||||
logfile_maxbytes = 0
|
logfile_maxbytes = 0
|
||||||
logfile_backupcount = 0
|
logfile_backupcount = 0
|
||||||
loglevel = info
|
loglevel = info
|
||||||
@ -23,7 +23,7 @@ loglevel = info
|
|||||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
[supervisorctl]
|
[supervisorctl]
|
||||||
serverurl = unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
|
serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
|
||||||
|
|
||||||
; The [include] section can just contain the "files" setting. This
|
; The [include] section can just contain the "files" setting. This
|
||||||
; setting can list multiple files (separated by whitespace or
|
; setting can list multiple files (separated by whitespace or
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8080;
|
||||||
server_name zabbix;
|
server_name zabbix;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ .php$ {
|
location ~ .php$ {
|
||||||
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 8443 ssl http2;
|
||||||
server_name zabbix;
|
server_name zabbix;
|
||||||
server_name_in_redirect off;
|
server_name_in_redirect off;
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ .php$ {
|
location ~ .php$ {
|
||||||
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user