This commit is contained in:
2024-04-07 14:02:35 +03:00
parent 49b940569e
commit 483d753dce
5 changed files with 90 additions and 0 deletions

27
zabbix-agent2/Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
ARG BUILD_ARCH
ARG BUILD_VERSION
ARG BUILD_BASE_IMAGE=zabbix/zabbix-agent2:alpine-trunk
FROM ${BUILD_BASE_IMAGE} as builder
FROM alpine
LABEL maintainer "sinav"
ENV LANG C.UTF-8
# Install requirements for add-on
RUN apk add --no-cache jq zabbix-agent2 && \
addgroup -g 1003 docker && \
addgroup zabbix docker && \
mkdir -p /etc/zabbix/zabbix_agent2.d/plugins.d
# Copy zabbix-agent2 plugins
COPY --from=builder ["/usr/sbin/zabbix-agent2-plugin", "/usr/sbin/zabbix-agent2-plugin"]
RUN echo -e "\nPlugins.PostgreSQL.System.Path=/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb\nPlugins.PostgreSQL.System.Path=/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql\n" >> /etc/zabbix/zabbix_agent2.conf
# Copy data for add-on
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]