Refactoring dockerfile for pandora agent base centos8
This commit is contained in:
parent
ed434135c2
commit
90dae531b8
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue