-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (30 loc) · 1.28 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
FROM ubuntu:latest
ARG SVN_USER
ARG SVN_PASS
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y cron libapache2-mod-php7.4 php7.4-cli php7.4-mysql php7.4-mysqli php7.4-gd php7.4-json \
php-pear rsyslog snmp fping mysql-client python3-mysqldb rrdtool subversion whois mtr-tiny \
ipmitool graphviz imagemagick apache2 python3-pymysql python-is-python3 && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /opt/observium && cd /opt && \
svn --username ${SVN_USER} --password ${SVN_PASS} --trust-server-cert --non-interactive co http://svn.observium.org/svn/observium/trunk observium && \
cd observium && \
mkdir -p /config && touch /config/config.php && \
#rm -Rf /opt/observium/.svn && \
phpenmod mcrypt && \
a2dismod mpm_event && \
a2enmod mpm_prefork && \
a2enmod php7.4 && \
a2enmod rewrite
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY 30-observium.conf /etc/rsyslog.d/30-observium.conf
COPY rsyslog.conf /etc/rsyslog.conf
COPY observium_cron.conf /etc/cron.d/observium
ADD start.sh /
RUN chmod +x /start.sh
RUN chmod 644 /etc/cron.d/observium
RUN sed -i 's/\r//' /start.sh
EXPOSE 80 514 514/udp
CMD ["/start.sh"]