mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 06:05:37 +03:00
zabbix advanced
This commit is contained in:
parent
383a9b45ea
commit
1965d9de66
15
Makefile
15
Makefile
@ -75,14 +75,23 @@ advanced-redash-images:
|
||||
|
||||
advanced-zabbix-images:
|
||||
make advanced-zabbix-30-images
|
||||
make echo-done
|
||||
make advanced-zabbix-40-images
|
||||
make echo-done
|
||||
make advanced-zabbix-50-images
|
||||
make echo-done
|
||||
make advanced-zabbix-52-images
|
||||
make echo-done
|
||||
make advanced-zabbix-54-images
|
||||
make echo-done
|
||||
make advanced-zabbix-60-images
|
||||
make echo-done
|
||||
make advanced-zabbix-62-images
|
||||
make advanced-zabbix-64-images
|
||||
make echo-done
|
||||
# make advanced-zabbix-64-images
|
||||
make echo-done
|
||||
make advanced-zabbix-latest-images
|
||||
make echo-done
|
||||
|
||||
advanced-zabbix-30-images:
|
||||
cd `pwd`/linux/advanced/zabbix/3.0/agent && pwd && make build && make deploy
|
||||
@ -471,3 +480,7 @@ bundle-web:
|
||||
make ecosystem-apache2-images
|
||||
make ecosystem-nginx-images
|
||||
|
||||
echo-done:
|
||||
@echo "======================================="
|
||||
@echo "===== D O N E ====="
|
||||
@echo "======================================="
|
@ -1,4 +1,4 @@
|
||||
FROM zabbix/zabbix-server-pqsql:5.4-ubuntu-latest
|
||||
FROM zabbix/zabbix-server-pgsql:5.4-ubuntu-latest
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
USER root
|
||||
|
@ -1,100 +1,55 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
ARG MAJOR_VERSION=6.2
|
||||
ARG ZBX_VERSION=${MAJOR_VERSION}.0
|
||||
ARG BUILD_BASE_IMAGE=zabbix-build-sqlite3:ubuntu-${ZBX_VERSION}
|
||||
FROM zabbix/zabbix-proxy-sqlite3:ubuntu-latest
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
FROM ${BUILD_BASE_IMAGE} as builder
|
||||
USER root
|
||||
|
||||
FROM ubuntu:jammy
|
||||
##################################################################
|
||||
# editing sources list
|
||||
##################################################################
|
||||
COPY sources.list /etc/apt/sources.list
|
||||
COPY locale.gen /etc/locale.gen
|
||||
|
||||
ARG MAJOR_VERSION
|
||||
ARG ZBX_VERSION
|
||||
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
##################################################################
|
||||
# installing utils
|
||||
##################################################################
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y --allow-unauthenticated \
|
||||
acl \
|
||||
apt-transport-https \
|
||||
apt-utils \
|
||||
aptitude \
|
||||
ca-certificates \
|
||||
console-cyrillic \
|
||||
curl \
|
||||
dos2unix \
|
||||
fontconfig \
|
||||
gnupg \
|
||||
htop \
|
||||
iftop \
|
||||
iotop \
|
||||
iperf \
|
||||
iperf3 \
|
||||
iputils-ping \
|
||||
jq \
|
||||
locales \
|
||||
logrotate \
|
||||
lsb-release \
|
||||
lsof \
|
||||
lynx \
|
||||
mc \
|
||||
nano \
|
||||
nmap \
|
||||
openssl \
|
||||
pev \
|
||||
php-cli \
|
||||
php-curl \
|
||||
procps \
|
||||
smbclient \
|
||||
sudo \
|
||||
telnet \
|
||||
tmux \
|
||||
util-linux \
|
||||
uuid-runtime \
|
||||
wget
|
||||
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/mibs/ietf:/var/lib/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
|
||||
org.opencontainers.image.licenses="GPL v2.0" \
|
||||
org.opencontainers.image.source="${ZBX_SOURCES}" \
|
||||
org.opencontainers.image.title="Zabbix proxy (SQLite3)" \
|
||||
org.opencontainers.image.url="https://zabbix.com/" \
|
||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_proxy/zabbix_proxy", "/usr/sbin/zabbix_proxy"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/usr/bin/zabbix_get"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/conf/zabbix_proxy.conf", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
|
||||
RUN set -eux && \
|
||||
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
|
||||
INSTALL_PKGS="bash \
|
||||
tini \
|
||||
ca-certificates \
|
||||
fping \
|
||||
libcurl4 \
|
||||
libevent-2.1 \
|
||||
libopenipmi0 \
|
||||
libpcre2-8-0 \
|
||||
libsnmp40 \
|
||||
libsqlite3-0 \
|
||||
libssh-4 \
|
||||
libssl3 \
|
||||
libxml2 \
|
||||
snmp-mibs-downloader \
|
||||
unixodbc" && \
|
||||
apt-get-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get-get -y \
|
||||
--no-install-recommends install \
|
||||
${INSTALL_PKGS} && \
|
||||
groupadd \
|
||||
--system \
|
||||
--gid 1995 \
|
||||
zabbix && \
|
||||
useradd \
|
||||
--system \
|
||||
--comment "Zabbix monitoring system" \
|
||||
-g zabbix \
|
||||
-G root \
|
||||
--uid 1997 \
|
||||
--shell /sbin/nologin \
|
||||
--home-dir /var/lib/zabbix/ \
|
||||
zabbix && \
|
||||
mkdir -p /etc/zabbix && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/db_data && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /usr/lib/zabbix/externalscripts && \
|
||||
mkdir -p /var/lib/zabbix/mibs && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/snmptraps && \
|
||||
mkdir -p /var/lib/zabbix/ssh_keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl && \
|
||||
mkdir -p /var/lib/zabbix/ssl/certs && \
|
||||
mkdir -p /var/lib/zabbix/ssl/keys && \
|
||||
mkdir -p /var/lib/zabbix/ssl/ssl_ca && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
apt-get-get -y autoremove && \
|
||||
rm -rf /var/lib/apt-get/lists/*
|
||||
|
||||
EXPOSE 10051/TCP
|
||||
|
||||
WORKDIR /var/lib/zabbix
|
||||
|
||||
VOLUME ["/var/lib/zabbix/snmptraps"]
|
||||
|
||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/docker-entrypoint.sh"]
|
||||
|
||||
USER 1997
|
||||
|
||||
CMD ["/usr/sbin/zabbix_proxy", "--foreground", "-c", "/etc/zabbix/zabbix_proxy.conf"]
|
||||
RUN echo "zabbix ALL=(ALL) NOPASSWD: /usr/bin/nmap" > /etc/sudoers.d/zabbix
|
||||
|
Loading…
Reference in New Issue
Block a user