-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (26 loc) · 1.62 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
FROM ubuntu:18.04
MAINTAINER OEMS "[email protected]"
ENV NAGVIS 1.9.11
ENV SOCKET unix:/opt/nagios/var/rw/live
#ENV TZ=Europe/Prague
#RUN echo 'Acquire::http::Proxy "http://172.23.33.39:8000/";' >> /etc/apt/apt.conf
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 \
gzip rsync graphviz sqlite3 libjpeg-turbo8-dev \
libpng-dev php-sqlite3 php-gettext php-curl \
libfreetype6-dev openssl libapache2-mod-php && \
ln -sfT /dev/stderr "/var/log/apache2/error.log" && \
ln -sfT /dev/stdout "/var/log/apache2/access.log"
ADD http://www.nagvis.org/share/nagvis-${NAGVIS}.tar.gz /
RUN tar -zxvf /nagvis-${NAGVIS}.tar.gz && cd /nagvis-${NAGVIS} && \
./install.sh -q -p /usr/local/nagvis -l "tcp:icinga:6558" -b mklivestatus -u www-data -g www-data -w /etc/apache2/conf-available -a y && \
cp /nagvis-${NAGVIS}/nagvis-make-admin /usr/local/nagvis/etc/ && \
cp /nagvis-${NAGVIS}/nagvis-make-admin /usr/local/nagvis/etc/ && \
printf "nagvis:$(openssl passwd -crypt nagvis)\n" >> /etc/apache2/htpasswd.users
# There is not way to create this on preparition config, auth.db is create on first time with the apache.
# cd /usr/local/nagvis/etc && ./nagvis-make-admin nagvis
ADD nagvis.conf /etc/apache2/conf-available/nagvis.conf
ADD nagvis.ini.php /usr/local/nagvis/etc/nagvis.ini.php
RUN ln -s /etc/apache2/conf-available/nagvis.conf /etc/apache2/conf-enabled/nagvis.conf
CMD /usr/sbin/apache2ctl -D FOREGROUND