-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (51 loc) · 2.62 KB
/
Copy pathDockerfile
File metadata and controls
64 lines (51 loc) · 2.62 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
# Ubuntu Homer.
FROM ubuntu:14.04
MAINTAINER Thomas Quintana <thomas@bettervoice.com>
# Install Dependencies
RUN apt-get update && apt-get install -y bison ca-certificates cron flex git-core libcurl4-openssl-dev libclass-dbi-mysql-perl libclass-dbi-pg-perl libdbi-perl libmysqlclient-dev libpcre3-dev libpq-dev libssl-dev libxml2-dev nginx perl php5 php5-cli php5-dev php5-fpm php5-gd php5-json php5-mysql php-pear php5-pgsql php-services-json postgresql-client python python-dev wget
# Update PIP
ADD bin/get-pip.py /usr/local/bin/get-pip.py
RUN python /usr/local/bin/get-pip.py
# Install Python Dependencies
RUN pip install --upgrade six
RUN pip install Jinja2
# Install Homer5
RUN git clone -b homer5 --depth 1 https://github.com/sipcapture/homer.git /usr/src/homer
WORKDIR /usr/src/homer
RUN git submodule init
RUN git submodule update
# Homer5 Post Install.
RUN cp -R homer-ui/* /usr/share/nginx/html/
RUN cp -R homer-api/api /usr/share/nginx/html/
RUN chmod -R 0775 /usr/share/nginx/html/store/dashboard
RUN wget https://raw.githubusercontent.com/sipcapture/homer-ui/master/lib/sweetalert/SweetAlert-base.min.js -O /usr/share/nginx/html/lib/sweetalert/SweetAlert-base.min.js
ADD conf/default-php.template /etc/nginx/sites-available/default-php.template
ADD conf/configuration.php.template /usr/share/nginx/html/api/configuration.php.template
ADD conf/preferences.php.template /usr/share/nginx/html/api/preferences.php.template
# Install Kamailio 4.3.4
RUN git clone git://git.sip-router.org/kamailio -b 4.3.4 /usr/src/kamailio
WORKDIR /usr/src/kamailio
RUN make FLAVOUR=kamailio include_modules="db_mysql db_postgres htable pv rtimer sipcapture siputils sl sqlops textops xlog" cfg
RUN make all
RUN make install
# Kamailiio Post Install.
ADD conf/sipcapture.kamailio.template /usr/local/etc/kamailio/kamailio.cfg.template
ADD sysv/kamailio.init /etc/init.d/kamailio
RUN chmod +x /etc/init.d/kamailio
RUN update-rc.d -f kamailio defaults
# Post Install Configuration.
RUN mkdir -p /usr/share/homer5/sql
ADD sql/homer_databases.sql.template /usr/share/homer5/sql/homer_databases.sql.template
ADD sql/homer_user.sql.template /usr/share/homer5/sql/homer_user.sql.template
ADD sql/schema_configuration.sql.template /usr/share/homer5/sql/schema_configuration.sql.template
ADD sql/schema_data.sql.template /usr/share/homer5/sql/schema_data.sql.template
ADD sql/schema_statistic.sql.template /usr/share/homer5/sql/schema_statistic.sql.template
ADD bin/start-homer /usr/bin/start-homer
RUN chmod +x /usr/bin/start-homer
# Change the workdir to the root home.
WORKDIR /root
# Open the container up to the world.
EXPOSE 80/tcp
EXPOSE 9060/udp
# Start Homer.
CMD start-homer