init
This commit is contained in:
27
zabbix-agent2/Dockerfile
Normal file
27
zabbix-agent2/Dockerfile
Normal 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" ]
|
||||
Reference in New Issue
Block a user