forked from fonoster/rtpengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (59 loc) · 1.77 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
##
## Build rtpengine from source
##
FROM debian:bookworm AS builder
WORKDIR /build
ARG TAG_NAME=master
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install build-essential git curl \
&& echo 'man-db man-db/auto-update boolean false' | debconf-set-selections \
&& git clone https://github.com/sipwise/rtpengine \
&& cd rtpengine \
&& git checkout ${TAG_NAME} \
&& apt-get -y build-dep -Ppkg.ngcp-rtpengine.nobcg729 . \
&& dpkg-buildpackage -Ppkg.ngcp-rtpengine.nobcg729 \
&& curl -qL -o /usr/bin/netdiscover https://github.com/CyCoreSystems/netdiscover/releases/download/v1.2.5/netdiscover.linux.amd64 \
&& chmod +x /usr/bin/netdiscover
##
## Runner
##
FROM debian:bookworm
WORKDIR /opt/rtpengine
ENV DEBIAN_FRONTEND noninteractive
RUN groupadd -r rtpengine && useradd -r -g rtpengine rtpengine
# NOTE: To include in-kernel operations and recording copy the entire build folder
COPY --from=builder /build/ngcp-rtpengine-daemon_*.deb /tmp/
COPY --from=builder /usr/bin/netdiscover /usr/bin/netdiscover
COPY ./entrypoint.sh /opt/rtpengine/entrypoint.sh
COPY ./rtpengine.conf /opt/rtpengine/rtpengine.conf
RUN apt-get update && \
mkdir -p /etc/modprobe.d/ && \
apt-get install -y \
curl \
iptables \
libavcodec59 \
libavformat59 \
libavutil57 \
libevent-2.1-7 \
libevent-pthreads-2.1-7 \
libglib2.0-0 \
libhiredis0.14 \
libip4tc2 \
libip6tc2 \
libjson-glib-1.0-0 \
libmariadb3 \
libmosquitto1 \
libopus0 \
libpcap0.8 \
libspandsp2 \
libssl3 \
libswresample4 \
libwebsockets17 \
libxmlrpc-core-c3 && \
apt-get -y install /tmp/*.deb && \
rm -rf /var/lib/apt/lists/* /tmp/*.deb
RUN chown -R rtpengine:rtpengine . && \
chmod +x entrypoint.sh
USER rtpengine
ENTRYPOINT ["/opt/rtpengine/entrypoint.sh"]
CMD ["rtpengine"]