2023-03-21 12:45:14 +01:00
|
|
|
ARG BBB_BUILD_TAG
|
2023-09-12 18:23:22 +02:00
|
|
|
FROM bigbluebutton/bbb-build:$BBB_BUILD_TAG AS builder
|
2020-05-14 15:21:21 +02:00
|
|
|
|
2023-11-29 22:17:49 +01:00
|
|
|
COPY --from=freeswitch / /build/freeswitch
|
2020-05-14 15:21:21 +02:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
# install most recent git version for proper sparse-checkout support
|
|
|
|
# https://stackoverflow.com/questions/72223738/failed-to-initialize-sparse-checkout
|
|
|
|
RUN echo 'deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main' > /etc/apt/sources.list.d/git-core-ppa.list && \
|
|
|
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y git
|
2020-05-14 15:21:21 +02:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
# get build files for bbb-freeswitch (build/packages-template/bbb-freeswitch-core/)
|
2023-11-29 22:17:49 +01:00
|
|
|
COPY --from=build-files / /build/
|
2022-03-21 12:00:36 +01:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
# mock files expected by build.sh
|
|
|
|
RUN mkdir -p /build/bbb-voice-conference/config/freeswitch/conf/ && \
|
|
|
|
touch \
|
|
|
|
/build/opts-build.sh \
|
|
|
|
/build/freeswitch.service.build \
|
|
|
|
/build/bbb-voice-conference/config/freeswitch/conf/a \
|
|
|
|
&& \
|
|
|
|
echo "" > /usr/local/bin/fpm
|
2022-03-21 12:00:36 +01:00
|
|
|
|
2023-11-29 22:17:49 +01:00
|
|
|
# build freeswitch
|
2023-03-21 12:45:14 +01:00
|
|
|
RUN cd /build && ./build.sh
|
2021-02-11 14:34:55 +01:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
|
|
|
|
# add english sounds
|
|
|
|
RUN mkdir -p /build/staging/opt/freeswitch/share/freeswitch && \
|
|
|
|
wget http://bigbluebutton.org/downloads/sounds.tar.gz -O sounds.tar.gz && \
|
|
|
|
tar xvfz sounds.tar.gz -C /build/staging/opt/freeswitch/share/freeswitch && \
|
|
|
|
wget https://gitlab.senfcall.de/senfcall-public/mute-and-unmute-sounds/-/archive/master/mute-and-unmute-sounds-master.zip && \
|
|
|
|
unzip mute-and-unmute-sounds-master.zip && \
|
|
|
|
cd mute-and-unmute-sounds-master/sounds && \
|
|
|
|
find . -name "*.wav" -exec /bin/bash -c "sox -v 0.3 {} /tmp/tmp.wav; cp /tmp/tmp.wav /build/staging/opt/freeswitch/share/freeswitch/sounds/en/us/callie/conference/{}" \;
|
|
|
|
|
|
|
|
# add bigblugbutton config
|
2022-04-03 23:18:15 +02:00
|
|
|
ARG TAG_FS_CONFIG
|
2023-11-29 22:17:49 +01:00
|
|
|
COPY --from=fs-config / /build/staging/opt/freeswitch/etc/freeswitch/
|
2023-03-21 12:45:14 +01:00
|
|
|
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
# we are using ubuntu here, because libjpeg8 is required, but not available in debian
|
|
|
|
FROM ubuntu:20.04
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
xmlstarlet wget iptables curl \
|
|
|
|
libfreetype6 libcurl4 libspeex1 libspeexdsp1 libopus0 libsndfile1 libopusfile0 liblua5.2-0 libjbig0 libldns2 libedit2 libtiff5 libpng16-16 \
|
|
|
|
&& \
|
|
|
|
# install libopusenc0
|
2023-11-28 15:31:31 +01:00
|
|
|
wget -O /tmp/libopusenc0_0.2.1-1bbb2_amd64.deb https://launchpad.net/~bigbluebutton/+archive/ubuntu/support/+files/libopusenc0_0.2.1-1bbb2_amd64.deb \
|
|
|
|
&& dpkg -i /tmp/libopusenc0_0.2.1-1bbb2_amd64.deb \
|
|
|
|
&& rm /tmp/libopusenc0_0.2.1-1bbb2_amd64.deb
|
2020-08-15 03:26:33 +02:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
# add dockerize
|
|
|
|
COPY --from=alangecker/bbb-docker-base-java /usr/local/bin/dockerize /usr/local/bin/dockerize
|
|
|
|
|
|
|
|
# copy over built freeswitch & config
|
|
|
|
COPY --from=builder /build/staging/opt /opt
|
|
|
|
COPY --from=builder /build/staging/etc /etc
|
2020-05-15 18:44:19 +02:00
|
|
|
|
2023-03-21 12:45:14 +01:00
|
|
|
RUN ldconfig && \
|
|
|
|
ln -s /opt/freeswitch/conf /etc/freeswitch && \
|
|
|
|
groupadd freeswitch && \
|
|
|
|
useradd --home-dir /opt/freeswitch --shell /usr/sbin/nologin -g freeswitch freeswitch
|
2020-05-15 18:44:19 +02:00
|
|
|
|
|
|
|
COPY ./entrypoint.sh /entrypoint.sh
|
2023-03-21 12:45:14 +01:00
|
|
|
COPY ./conf /etc/freeswitch/
|
|
|
|
|
2020-05-14 15:21:21 +02:00
|
|
|
ENTRYPOINT /entrypoint.sh
|