forked from mwalbeck/docker-janus-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
125 lines (119 loc) · 3.67 KB
/
Dockerfile
File metadata and controls
125 lines (119 loc) · 3.67 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
FROM debian:bullseye-slim@sha256:68c1f6bae105595d2ebec1589d9d476ba2939fdb11eaba1daec4ea826635ce75
# renovate: datasource=github-tags depName=meetecho/janus-gateway versioning=semver
ENV JANUS_VERSION v1.0.4
# renovate: datasource=github-tags depName=cisco/libsrtp versioning=semver
ENV LIBSRTP_VERSION v2.4.2
# renovate: datasource=git-tags depName=https://gitlab.freedesktop.org/libnice/libnice versioning=semver
ENV LIBNICE_VERSION 0.1.19
# renovate: datasource=git-tags depName=https://libwebsockets.org/repo/libwebsockets versioning=semver
ENV LIBWEBSOCKETS_VERSION v4.3.2
ENV USRSCTP_VERSION master
RUN set -ex; \
\
groupadd --system --gid 602 janus; \
useradd --no-log-init --system --gid janus --no-create-home --uid 602 janus; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# Runtime dependencies
ca-certificates \
libconfig9 \
libglib2.0-0 \
libjansson4 \
libssl1.1 \
libcurl4 \
libopus0 \
libogg0 \
libmicrohttpd12 \
# Build dependencies
libmicrohttpd-dev \
libjansson-dev \
libssl-dev \
libglib2.0-dev \
libopus-dev \
libogg-dev \
libcurl4-openssl-dev \
liblua5.3-dev \
libconfig-dev \
pkg-config \
gengetopt \
libtool \
automake \
git \
make \
gtk-doc-tools \
ninja-build \
python3-pip \
cmake \
build-essential \
; \
pip3 install meson; \
mkdir /build; \
git clone --branch $JANUS_VERSION https://github.com/meetecho/janus-gateway.git /build/janus-gateway; \
git clone --branch $LIBSRTP_VERSION https://github.com/cisco/libsrtp.git /build/libsrtp; \
git clone --branch $LIBNICE_VERSION https://gitlab.freedesktop.org/libnice/libnice.git /build/libnice; \
git clone --branch $USRSCTP_VERSION https://github.com/sctplab/usrsctp /build/usrsctp; \
git clone --branch $LIBWEBSOCKETS_VERSION https://libwebsockets.org/repo/libwebsockets /build/libwebsockets; \
\
cd /build/libnice; \
meson --prefix=/usr build; \
ninja -C build; \
ninja -C build install; \
\
cd /build/libsrtp; \
./configure --prefix=/usr --enable-openssl; \
make shared_library && make install; \
\
cd /build/usrsctp; \
./bootstrap; \
./configure --prefix=/usr --disable-programs --disable-inet --disable-inet6; \
make; \
make install; \
\
cd /build/libwebsockets; \
mkdir build; \
cd build; \
cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..; \
make; \
make install; \
\
cd /build/janus-gateway; \
sh autogen.sh; \
./configure --prefix=/opt/janus --disable-plugin-voicemail --disable-plugin-nosip --disable-plugin-sip \
--disable-plugin-streaming --disable-plugin-recordplay --disable-unix-sockets; \
make; \
make install; \
make configs; \
cd /; \
rm -rf /build; \
chown -R janus:janus /opt/janus; \
\
pip3 uninstall -y meson; \
rm -rf /root/.cache/pip; \
\
apt-get purge -y --autoremove \
libmicrohttpd-dev \
libjansson-dev \
libssl-dev \
libglib2.0-dev \
libopus-dev \
libogg-dev \
libcurl4-openssl-dev \
liblua5.3-dev \
libconfig-dev \
pkg-config \
gengetopt \
libtool \
automake \
git \
make \
gtk-doc-tools \
ninja-build \
python3-pip \
cmake \
build-essential \
; \
rm -rf /var/lib/apt/lists/*;
EXPOSE 8088 8188
USER janus:janus
CMD ["/opt/janus/bin/janus"]