-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
78 lines (68 loc) · 2.85 KB
/
Dockerfile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM balenalib/raspberry-pi:buster
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libmicrohttpd-dev \
libjansson-dev \
libssl-dev \
libsrtp-dev \
libsofia-sip-ua-dev \
libglib2.0-dev \
libopus-dev \
libogg-dev \
libcurl4-openssl-dev \
liblua5.3-dev \
libconfig-dev \
pkg-config \
gengetopt \
libtool \
automake \
cmake \
make \
wget \
git \
build-essential \
ninja-build \
python3 \
python3-pip \
# ustreamer dependencies. adding libraspberrypi-dev to enable WITH_OMX=1 on ustreamer
libevent-dev \
libjpeg8-dev \
libbsd-dev \
libraspberrypi-dev
RUN pip3 install meson
# libince is recommended to be installed from source because the version installed via apt is too low
RUN git clone https://gitlab.freedesktop.org/libnice/libnice && \
cd libnice && \
meson --prefix=/usr build && ninja -C build && sudo ninja -C build install
RUN wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz && \
tar xfv v2.2.0.tar.gz && \
cd libsrtp-2.2.0 && \
./configure --prefix=/usr --enable-openssl && \
make shared_library && sudo make install
RUN git clone https://libwebsockets.org/repo/libwebsockets && \
cd libwebsockets && \
# If you want the stable version of libwebsockets, uncomment the next line
# git checkout v3.2-stable && \
mkdir build && \
cd build && \
# See https://github.com/meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP
# See https://github.com/meetecho/janus-gateway/issues/2476 re: LWS_WITHOUT_EXTENSIONS
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" .. && \
make && sudo make install
RUN git clone https://github.com/meetecho/janus-gateway.git && \
cd janus-gateway && \
sh autogen.sh && \
# we didn't install the dependencies (nor are they needed) for the disabled parts
./configure --prefix=/opt/janus --disable-data-channels --disable-rabbitmq --disable-mqtt && \
make && make install
RUN ln -s /opt/janus/include/janus /usr/include/janus && \
# this is sort of a hack so that the ustreamer janus plugin compilation works
# it just points the dependency to being in the parent folder
sed -i -e 's|^#include "refcount.h"$|#include "../refcount.h"|g' "/usr/include/janus/plugins/plugin.h"
RUN git clone --depth=1 https://github.com/pikvm/ustreamer && \
cd ustreamer && \
make WITH_JANUS=1 && \
mv /ustreamer/janus/libjanus_ustreamer.so /opt/janus/lib/janus/plugins/libjanus_ustreamer.so
COPY janus.plugin.ustreamer.jcfg /opt/janus/lib/janus/configs/janus.plugin.ustreamer.jcfg
COPY janus.transport.websockets.jcfg /opt/janus/lib/janus/configs/janus.transport.websockets.jcfg
ENTRYPOINT ["/opt/janus/bin/janus", "-F", "/opt/janus/lib/janus/configs/", "-P", "/opt/janus/lib/janus/plugins/"]