forked from lmangani/docker-rtpengine-speech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (48 loc) · 2.69 KB
/
Dockerfile
File metadata and controls
56 lines (48 loc) · 2.69 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
FROM debian:jessie
LABEL MAINTAINER "Lorenzo Mangani <lorenzo.mangani@gmail.com>"
USER root
RUN apt-get update && apt-get install -y sudo git make bison flex curl libz-dev libssl-dev x11-apps && \
echo "mysql-server mysql-server/root_password password passwd" | sudo debconf-set-selections && \
echo "mysql-server mysql-server/root_password_again password passwd" | sudo debconf-set-selections && \
apt-get install -y mysql-server libmysqlclient-dev \
libncurses5 libncurses5-dev mysql-client expect && \
apt-get clean
RUN curl ipinfo.io/ip > /etc/public_ip.txt
RUN git clone https://github.com/OpenSIPS/opensips.git -b 2.2 ~/opensips_2_2 && \
sed -i 's/db_http db_mysql db_oracle/db_http db_oracle/g' ~/opensips_2_2/Makefile.conf.template && \
cd ~/opensips_2_2 && \
make all && make prefix=/usr/local install && \
cd .. && rm -rf ~/opensips_2_2
COPY /rtpengine /rtpengine
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -qqy dpkg-dev debhelper libevent-dev iptables-dev libcurl4-openssl-dev libglib2.0-dev libhiredis-dev libpcre3-dev libssl-dev libxmlrpc-core-c3-dev markdown zlib1g-dev module-assistant dkms gettext \
libavcodec-dev libavfilter-dev libavformat-dev libjson-glib-dev libpcap-dev nfs-common \
libbencode-perl libcrypt-rijndael-perl libdigest-hmac-perl libio-socket-inet6-perl libsocket6-perl netcat && \
( ( apt-get install -y linux-headers-$(uname -r) linux-image-$(uname -r) && \
module-assistant update && \
module-assistant auto-install ngcp-rtpengine-kernel-source ) || true ) && \
ln -s /lib/modules/$(uname -r) /lib/modules/3.16.0 && \
dpkg -i /rtpengine/*.deb && \
cp /lib/modules/$(uname -r)/extra/xt_RTPENGINE.ko /rtpengine/xt_RTPENGINE.ko && \
apt-get clean
RUN apt-get purge -y bison build-essential ca-certificates flex git m4 pkg-config curl && \
apt-get autoremove -y && \
apt-get install -y libmicrohttpd10 rsyslog ngrep && \
apt-get clean
RUN apt install -y curl git && \
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && \
apt-get install -y nodejs && \
cd /opt && git clone https://github.com/Broadshield/RTPEngine-Speech2Text && \
cd RTPEngine-Speech2Text && npm install && npm install -g forever
EXPOSE 5060/udp
EXPOSE 5060/tcp
EXPOSE 9060/udp
EXPOSE 9060/tcp
EXPOSE 6060/udp
EXPOSE 20000-20100/udp
COPY conf/opensipsctlrc /usr/local/etc/opensips/opensipsctlrc
COPY conf/opensips-rtpengine.cfg /usr/local/etc/opensips/opensips.cfg
COPY rtpengine/rtpengine-recording.conf /etc/rtpengine/rtpengine-recording.conf
COPY boot_run.sh /etc/boot_run.sh
RUN chown root.root /etc/boot_run.sh && chmod 700 /etc/boot_run.sh
ENTRYPOINT ["/etc/boot_run.sh"]