From 2de6b68f7dbdc5958e25c72cc6e621ef540ddee4 Mon Sep 17 00:00:00 2001 From: sinav Date: Sun, 23 Jun 2024 19:44:47 +0300 Subject: [PATCH] wip --- zabbix-agent2/Dockerfile | 9 ++++----- zabbix-agent2/config.yaml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/zabbix-agent2/Dockerfile b/zabbix-agent2/Dockerfile index a7b7310..2f88543 100644 --- a/zabbix-agent2/Dockerfile +++ b/zabbix-agent2/Dockerfile @@ -21,7 +21,7 @@ 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}/conf/zabbix_agentd.conf", "/etc/zabbix/zabbix_agent2.conf"] -# COPY run.sh /run.sh +COPY run.sh /run.sh COPY rootfs / RUN set -eux && \ @@ -54,9 +54,7 @@ RUN set -eux && \ --home /var/lib/zabbix/ \ zabbix && \ adduser zabbix docker && \ - # echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \ - echo "zabbix ALL=(root) NOPASSWD: ALL" >> /etc/sudoers.d/zabbix && \ - + echo "zabbix ALL=(root) NOPASSWD: /usr/sbin/smartctl" >> /etc/sudoers.d/zabbix && \ mkdir -p /etc/zabbix && \ mkdir -p /etc/zabbix/zabbix_agentd.d && \ mkdir -p /var/lib/zabbix && \ @@ -67,6 +65,7 @@ RUN set -eux && \ chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \ chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \ chmod a+x /etc/services.d/zabbix_agent2/run && \ + chmod a+x /run.sh && \ chmod a+x /etc/services.d/zabbix_agent2/finish EXPOSE 10050/TCP 31999/TCP @@ -81,4 +80,4 @@ WORKDIR /var/lib/zabbix USER 1997 # CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/config/zabbix_agent2.conf"] -# CMD [ "/run.sh" ] +CMD [ "/run.sh" ] diff --git a/zabbix-agent2/config.yaml b/zabbix-agent2/config.yaml index 56d8a88..88eebd3 100644 --- a/zabbix-agent2/config.yaml +++ b/zabbix-agent2/config.yaml @@ -12,7 +12,7 @@ arch: - i386 startup: system boot: auto -init: false +init: true full_access: true host_ipc: true host_pid: true