forked from julienmathis/centreon-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (27 loc) · 986 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM centos:centos6
MAINTAINER matthieu-robin
# Update CentOS
RUN yum -y update
RUN yum -y install wget git
# Install Centreon Repository
RUN wget http://yum.centreon.com/standard/3.0/stable/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo
# Install Maria-DB
RUN yum --nogpg -y install MariaDB-server
RUN /etc/init.d/mysql start
# Install ssh
RUN yum -y install openssh-server openssh-client
RUN mkdir /var/run/sshd
RUN echo 'root:centreon' | chpasswd
RUN sed -i 's/^#PermitRootLogin/PermitRootLogin/g' /etc/ssh/sshd_config
RUN /etc/init.d/sshd start && /etc/init.d/sshd stop
# Install Centreon
RUN yum --nogpg -y install centreon-base-config-centreon-engine centreon centreon-widget*
RUN git clone https://github.com/centreon/centreon-plugins.git /usr/lib/nagios/plugins/centreon-plugins/
# Install SNMP
RUN yum -y install net-snmp*
# Start services
ADD scripts/script.sh /tmp/script.sh
RUN chmod +x /tmp/script.sh
CMD ["/tmp/script.sh"]
# Exposed ports
EXPOSE 22 80