From 90dae531b8c164cfac69d24dd2e27ea10635761e Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 8 Oct 2020 11:26:56 +0200 Subject: [PATCH] Refactoring dockerfile for pandora agent base centos8 --- pandora_agents/Dockerfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile index 69117e2ca7..0ee2515a75 100644 --- a/pandora_agents/Dockerfile +++ b/pandora_agents/Dockerfile @@ -1,20 +1,27 @@ -FROM centos:centos7 +FROM centos:centos8 MAINTAINER Pandora FMS Team # Add Pandora FMS agent installer -ADD unix /tmp/pandora_agent/unix +ADD unix /opt/pandora/pandora_agent/unix + +RUN export LC_ALL=C + +RUN dnf install -y dnf-plugins-core; dnf config-manager --set-enabled PowerTools # Install dependencies -RUN yum -y install \ +RUN dnf -y install \ epel-release \ unzip \ perl \ python3 \ sed \ - "perl(Sys::Syslog)" + perl-YAML-Tiny \ + "perl(Sys::Syslog)" \ + && dnf clean all + # Install Pandora FMS agent -RUN cd /tmp/pandora_agent/unix \ +RUN cd /opt/pandora/pandora_agent/unix \ && chmod +x pandora_agent_installer \ && ./pandora_agent_installer --install @@ -41,8 +48,7 @@ if [ $TIMEZONE != "" ]; then\n \ \tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \ fi\n \ /etc/init.d/pandora_agent_daemon start\n \ -rm -f $0\n \ -tail -f /var/log/pandora/pandora_agent.log' \ +tail -F /var/log/pandora/pandora_agent.log' \ >> /entrypoint.sh && \ chmod +x /entrypoint.sh