forked from tgoetheyn/Docker-NagiosXI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (39 loc) · 1.63 KB
/
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
36
37
38
39
40
41
42
43
44
45
FROM centos:6
MAINTAINER tgoetheyn
# get stuff from the interwebs
RUN yum -y install wget tar; yum clean all
WORKDIR /tmp
RUN wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
RUN tar xzf xi-latest.tar.gz
WORKDIR nagiosxi
# overwrite custom config file
ADD config.cfg xi-sys.cfg
# start building
RUN ./init.sh && . ./xi-sys.cfg && umask 0022 && . ./functions.sh && log="install.log"
RUN export INTERACTIVE="False" && export INSTALL_PATH=`pwd`
RUN . ./functions.sh && run_sub ./0-repos noupdate
RUN . ./functions.sh && run_sub ./1-prereqs
RUN . ./functions.sh && run_sub ./2-usersgroups
RUN . ./functions.sh && run_sub ./3-dbservers
RUN . ./functions.sh && run_sub ./4-services
RUN . ./functions.sh && run_sub ./5-sudoers
RUN sed -i.bak s/selinux/sudoers/g 9-dbbackups
RUN . ./functions.sh && run_sub ./9-dbbackups
RUN . ./functions.sh && run_sub ./10-phplimits
RUN . ./functions.sh && run_sub ./11-sourceguardian
RUN . ./functions.sh && run_sub ./12-mrtg
RUN . ./functions.sh && run_sub ./13-cacti
RUN . ./functions.sh && run_sub ./14-timezone
ADD scripts/NDOUTILS-POST subcomponents/ndoutils/post-install
RUN chmod 755 subcomponents/ndoutils/post-install && . ./functions.sh && run_sub ./A-subcomponents
RUN service mysqld start && . ./functions.sh && run_sub ./B-installxi
RUN . ./functions.sh && run_sub ./C-cronjobs
RUN . ./functions.sh && run_sub ./D-chkconfigalldaemons
RUN service mysqld start && . ./functions.sh && run_sub ./E-importnagiosql
RUN . ./functions.sh && run_sub ./F-startdaemons
RUN . ./functions.sh && run_sub ./Z-webroot
# set startup script
ADD start.sh /start.sh
RUN chmod 755 /start.sh
EXPOSE 80 5666 5667
CMD ["/start.sh"]