-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (64 loc) · 1.79 KB
/
Copy pathDockerfile
File metadata and controls
72 lines (64 loc) · 1.79 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM centos:6
MAINTAINER cbpeckles
# get stuff from the interwebs
RUN yum -y install wget tar; yum clean all
RUN mkdir /tmp/nagiosxi \
&& wget -qO- https://assets.nagios.com/downloads/nagiosxi/5/xi‑5.8.3.tar.gz \
| tar xz -C /tmp
WORKDIR /tmp/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 ./11-sourceguardian
RUN . ./functions.sh \
&& run_sub ./13-phpini
ADD scripts/NDOUTILS-POST subcomponents/ndoutils/post-install
ADD scripts/install subcomponents/ndoutils/install
RUN chmod 755 subcomponents/ndoutils/post-install \
&& chmod 755 subcomponents/ndoutils/install \
&& . ./functions.sh \
&& run_sub ./A-subcomponents \
&& run_sub ./A0-mrtg
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
RUN yum clean all
# set startup script
ADD start.sh /start.sh
RUN chmod 755 /start.sh
EXPOSE 80 5666 5667
CMD ["/start.sh"]