wip
This commit is contained in:
@@ -16,14 +16,6 @@ ENV TERM=xterm \
|
|||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_agent2", "/usr/sbin/zabbix_agent2"]
|
||||||
# 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}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
|
||||||
# COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
|
||||||
# COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
|
||||||
# COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
|
||||||
# COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
|
||||||
# COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
|
||||||
|
|
||||||
COPY ["run.sh", "/usr/bin/"]
|
COPY ["run.sh", "/usr/bin/"]
|
||||||
|
|
||||||
@@ -64,25 +56,18 @@ RUN set -eux && \
|
|||||||
mkdir -p /var/lib/zabbix/enc && \
|
mkdir -p /var/lib/zabbix/enc && \
|
||||||
mkdir -p /var/lib/zabbix/modules && \
|
mkdir -p /var/lib/zabbix/modules && \
|
||||||
mkdir -p /var/lib/zabbix/buffer && \
|
mkdir -p /var/lib/zabbix/buffer && \
|
||||||
# chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
|
||||||
# chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
|
||||||
# chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
|
||||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||||
chmod a+x /usr/bin/run.sh
|
chmod a+x /usr/bin/run.sh
|
||||||
# echo "Plugins.Docker.Endpoint=unix:///run/docker.sock" >> /etc/zabbix/zabbix_agent2.d/plugins.d/docker.conf
|
|
||||||
|
|
||||||
EXPOSE 10050/TCP 31999/TCP
|
EXPOSE 10050/TCP 31999/TCP
|
||||||
|
|
||||||
WORKDIR /var/lib/zabbix
|
WORKDIR /var/lib/zabbix
|
||||||
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
# COPY ["docker-entrypoint.sh", "/usr/bin/"]
|
||||||
|
|
||||||
# ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
|
||||||
|
|
||||||
USER 1997
|
USER 1997
|
||||||
|
|
||||||
CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/config/zabbix_agent2.conf"]
|
# CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/config/zabbix_agent2.conf"]
|
||||||
|
CMD [ "run.sh" ]
|
||||||
# CMD [ "/usr/bin/run.sh" ]
|
|
||||||
@@ -10,4 +10,4 @@ if ! bashio::fs.file_exists "${ZBX_CFG_FILE}" || [ -z "$(ls -A ${ZBX_CFG_FILE})"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Run zabbix-agent2 in foreground
|
# Run zabbix-agent2 in foreground
|
||||||
zabbix_agent2 -f -c /config/zabbix_agent2.conf
|
zabbix_agent2 --foreground -c /config/zabbix_agent2.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user