-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 1.38 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
FROM debian:bullseye-slim AS stage1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential cmake git curl wget vim ca-certificates tzdata libssl-dev \
libavcodec-dev libavutil-dev libswscale-dev libresample-dev ffmpeg \
&& apt-get clean
RUN mkdir -p /opt/media
WORKDIR /opt/media
# libsrtp
# https://github.com/cisco/libsrtp/archive/refs/tags/v2.5.0.tar.gz
RUN wget -O libsrtp-2.5.0.tar.gz https://github.com/cisco/libsrtp/archive/refs/tags/v2.5.0.tar.gz && \
tar -zxvf libsrtp-2.5.0.tar.gz && \
cd libsrtp-2.5.0 && \
./configure --enable-openssl && \
make -j $(nproc) && make install
ARG ARG_BRANCH=master
ENV ARG_BRANCH=${ARG_BRANCH}
RUN git clone --depth=1 -b ${ARG_BRANCH} https://github.com/ZLMediaKit/ZLMediaKit.git && \
cd ZLMediaKit && git submodule update --init --recursive && \
mkdir -p build release/linux/Release/
WORKDIR /opt/media/ZLMediaKit/build
RUN cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_OBJCOPY=OFF \
-DENABLE_WEBRTC=true \
-DENABLE_FFMPEG=true .. && \
make -j $(nproc)
FROM scratch AS export-stage
COPY --from=stage1 /opt/media/ZLMediaKit/release/linux/Release/MediaServer bin/MediaServer
COPY --from=stage1 /opt/media/ZLMediaKit/api/include/** include/
COPY --from=stage1 /opt/media/ZLMediaKit/release/linux/Release/*.so lib/
COPY --from=stage1 /opt/media/ZLMediaKit/release/linux/Release/*.a lib/