Dockerfile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. FROM debian:bullseye
  2. MAINTAINER Andrey Volk <andrey@signalwire.com>
  3. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq install git
  4. RUN git clone https://github.com/signalwire/freeswitch /usr/src/freeswitch
  5. RUN git clone https://github.com/signalwire/libks /usr/src/libs/libks
  6. RUN git clone https://github.com/freeswitch/sofia-sip /usr/src/libs/sofia-sip
  7. RUN git clone https://github.com/freeswitch/spandsp /usr/src/libs/spandsp
  8. RUN git clone https://github.com/signalwire/signalwire-c /usr/src/libs/signalwire-c
  9. RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install \
  10. # build
  11. build-essential cmake automake autoconf 'libtool-bin|libtool' pkg-config \
  12. # general
  13. libssl-dev zlib1g-dev libdb-dev unixodbc-dev libncurses5-dev libexpat1-dev libgdbm-dev bison erlang-dev libtpl-dev libtiff5-dev uuid-dev \
  14. # core
  15. libpcre3-dev libedit-dev libsqlite3-dev libcurl4-openssl-dev nasm \
  16. # core codecs
  17. libogg-dev libspeex-dev libspeexdsp-dev \
  18. # mod_enum
  19. libldns-dev \
  20. # mod_python3
  21. python3-dev \
  22. # mod_av
  23. libavformat-dev libswscale-dev libavresample-dev \
  24. # mod_lua
  25. liblua5.2-dev \
  26. # mod_opus
  27. libopus-dev \
  28. # mod_pgsql
  29. libpq-dev \
  30. # mod_sndfile
  31. libsndfile1-dev libflac-dev libogg-dev libvorbis-dev \
  32. # mod_shout
  33. libshout3-dev libmpg123-dev libmp3lame-dev
  34. RUN cd /usr/src/libs/libks && cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LIBBACKTRACE=1 && make install
  35. RUN cd /usr/src/libs/sofia-sip && ./bootstrap.sh && ./configure CFLAGS="-g -ggdb" --with-pic --with-glib=no --without-doxygen --disable-stun --prefix=/usr && make -j`nproc --all` && make install
  36. RUN cd /usr/src/libs/spandsp && ./bootstrap.sh && ./configure CFLAGS="-g -ggdb" --with-pic --prefix=/usr && make -j`nproc --all` && make install
  37. RUN cd /usr/src/libs/signalwire-c && PKG_CONFIG_PATH=/usr/lib/pkgconfig cmake . -DCMAKE_INSTALL_PREFIX=/usr && make install
  38. # Enable modules
  39. RUN sed -i 's|#formats/mod_shout|formats/mod_shout|' /usr/src/freeswitch/build/modules.conf.in
  40. RUN cd /usr/src/freeswitch && ./bootstrap.sh -j
  41. RUN cd /usr/src/freeswitch && ./configure
  42. RUN cd /usr/src/freeswitch && make -j`nproc` && make install
  43. # Cleanup the image
  44. RUN apt-get clean
  45. # Uncomment to cleanup even more
  46. #RUN rm -rf /usr/src/*