|
1 |
| -FROM debian:jessie |
| 1 | +FROM debian:stretch |
2 | 2 | RUN apt-get update
|
3 |
| -RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y curl git vim |
4 |
| -RUN curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - |
5 |
| -RUN echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list |
6 |
| -RUN apt-get update |
7 |
| -RUN apt-get install -y --force-yes freeswitch-video-deps-most |
8 |
| -#RUN apt-get install -y autoconf automake devscripts gawk chkconfig dnsutils sendmail-bin sensible-mda ntpdate ntp g++ git-core curl libjpeg62-turbo-dev libncurses5-dev make python-dev pkg-config libgdbm-dev libyuv-dev libdb-dev libvpx2-dev gettext sudo lua5.1 libxml2 libxml2-dev openssl libcurl4-openssl-dev gettext gcc libldns-dev libpcre3-dev build-essential libssl-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev bc |
9 |
| -RUN apt-get install -y autoconf automake devscripts gawk chkconfig dnsutils sendmail-bin sensible-mda ntpdate ntp g++ git-core curl libjpeg62-turbo-dev libncurses5-dev make python-dev pkg-config libgdbm-dev libdb-dev gettext sudo lua5.1 libxml2 libxml2-dev openssl libcurl4-openssl-dev gettext gcc libldns-dev libpcre3-dev build-essential libssl-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev bc libtool-bin yasm libmyodbc net-tools |
10 |
| -RUN git config --global pull.rebase true |
11 |
| -RUN git clone -b v1.6.19 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/local/src/freeswitch |
12 |
| -RUN cd /usr/local/src/freeswitch; ./bootstrap.sh -j |
13 |
| -RUN sed -i "s#\#xml_int/mod_xml_curl#xml_int/mod_xml_curl#g" /usr/local/src/freeswitch/modules.conf |
14 |
| -RUN sed -i "s#\#mod_db#mod_db#g" /usr/local/src/freeswitch/modules.conf |
15 |
| -RUN sed -i "s#\#applications/mod_voicemail#applications/mod_voicemail#g" /usr/local/src/freeswitch/modules.conf |
16 |
| -RUN sed -i "s#\#event_handlers/mod_json_cdr#event_handlers/mod_json_cdr#g" /usr/local/src/freeswitch/modules.conf |
17 |
| -RUN cd /usr/local/src/freeswitch; ./configure -C |
18 |
| -#RUN cd /usr/local/src/freeswitch; make all cd-sounds-install cd-moh-install |
19 |
| -RUN cd /usr/local/src/freeswitch; make all install cd-sounds-install cd-moh-install |
20 |
| -RUN cd /usr/local/src/freeswitch; make && make install |
21 |
| -RUN ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch |
22 |
| -RUN ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli |
23 | 3 |
|
24 |
| -RUN git clone -b v3.6 https://github.com/iNextrix/ASTPP /usr/src/ASTPP |
25 |
| -RUN cp /usr/src/ASTPP/freeswitch/init/freeswitch.debian.init /etc/init.d/freeswitch |
26 |
| -RUN chmod 755 /etc/init.d/freeswitch |
27 |
| -RUN chmod +x /etc/init.d/freeswitch |
28 |
| -RUN update-rc.d freeswitch defaults |
29 |
| -RUN chkconfig --add freeswitch |
30 |
| -RUN chkconfig --level 345 freeswitch on |
| 4 | +RUN apt-get install -y gnupg2 wget git |
| 5 | +RUN wget -O - https://files.freeswitch.org/repo/deb/freeswitch-1.8/fsstretch-archive-keyring.asc | apt-key add - |
| 6 | +RUN echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" > /etc/apt/sources.list.d/freeswitch.list |
| 7 | +RUN echo "deb-src http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list |
| 8 | +RUN apt-get update && apt-get install -y freeswitch-meta-all |
| 9 | + |
| 10 | +RUN cd /opt && git clone -b v4.0.1 https://github.com/iNextrix/ASTPP.git |
| 11 | + |
| 12 | +RUN mv -f /usr/share/freeswitch/scripts /tmp/. |
| 13 | +RUN ln -s /opt/ASTPP/freeswitch/scripts /usr/share/freeswitch/ |
| 14 | +RUN cp -rf /opt/ASTPP/freeswitch/sounds/*.wav /usr/share/freeswitch/sounds/en/us/callie |
| 15 | +RUN cp -rf /opt/ASTPP/freeswitch/conf/autoload_configs/* /etc/freeswitch/autoload_configs/ |
31 | 16 |
|
32 |
| -RUN cp /usr/src/ASTPP/freeswitch/conf/autoload_configs/* /usr/local/freeswitch/conf/autoload_configs/ |
33 |
| -RUN cp -rf /usr/src/ASTPP/freeswitch/scripts/* /usr/local/freeswitch/scripts/ |
34 |
| -RUN cp -rf /usr/src/ASTPP/freeswitch/sounds/*.wav /usr/local/freeswitch/sounds/en/us/callie/ |
35 |
| -RUN chmod -Rf 777 /usr/local/freeswitch/sounds/en/us/callie/ |
36 |
| -RUN rm -rf /usr/local/freeswitch/conf/dialplan/* |
37 |
| -RUN touch /usr/local/freeswitch/conf/dialplan/astpp.xml |
38 |
| -RUN rm -rf /usr/local/freeswitch/conf/directory/* |
39 |
| -RUN touch /usr/local/freeswitch/conf/directory/astpp.xml |
40 |
| -RUN rm -rf /usr/local/freeswitch/conf/sip_profiles/* |
41 |
| -RUN touch /usr/local/freeswitch/conf/sip_profiles/astpp.xml |
| 17 | +RUN /bin/systemctl start freeswitch |
| 18 | +RUN /bin/systemctl enable freeswitch |
| 19 | +RUN sed -i "s#max-sessions\" value=\"1000#max-sessions\" value=\"2000#g" /etc/freeswitch/autoload_configs/switch.conf.xml |
| 20 | +RUN sed -i "s#sessions-per-second\" value=\"30#sessions-per-second\" value=\"50#g" /etc/freeswitch/autoload_configs/switch.conf.xml |
| 21 | +RUN sed -i "s#max-db-handles\" value=\"50#max-db-handles\" value=\"500#g" /etc/freeswitch/autoload_configs/switch.conf.xml |
| 22 | +RUN sed -i "s#db-handle-timeout\" value=\"10#db-handle-timeout\" value=\"30#g" /etc/freeswitch/autoload_configs/switch.conf.xml |
| 23 | +RUN rm -rf /etc/freeswitch/dialplan/* |
| 24 | +RUN touch /etc/freeswitch/dialplan/astpp.xml |
| 25 | +RUN rm -rf /etc/freeswitch/directory/* |
| 26 | +RUN touch /etc/freeswitch/directory/astpp.xml |
| 27 | +RUN rm -rf /etc/freeswitch/sip_profiles/* |
| 28 | +RUN touch /etc/freeswitch/sip_profiles/astpp.xml |
| 29 | +RUN chmod -Rf 755 /usr/share/freeswitch/sounds/en/us/callie |
| 30 | +RUN /bin/systemctl restart freeswitch |
| 31 | +RUN /bin/systemctl enable freeswitch |
42 | 32 |
|
43 |
| -RUN sed -i "s#\FS_USER=freeswitch#FS_USER=root#g" /etc/init.d/freeswitch |
44 |
| -RUN sed -i "s#\FS_GROUP=daemon#FS_GROUP=staff#g" /etc/init.d/freeswitch |
45 |
| -ENTRYPOINT service freeswitch restart && bash |
| 33 | +ENTRYPOINT /bin/systemctl freeswitch restart && bash |
0 commit comments