Refactoring dockerfile for pandora agent base centos8

This commit is contained in:
rafael 2020-10-08 11:26:56 +02:00
parent ed434135c2
commit 90dae531b8
1 changed files with 13 additions and 7 deletions

View File

@ -1,20 +1,27 @@
FROM centos:centos7
FROM centos:centos8
MAINTAINER Pandora FMS Team <info@pandorafms.com>
# 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