From bd22c44ee996bd87a66417f17ba242955b36b10a Mon Sep 17 00:00:00 2001 From: KisChang <734615869@qq.com> Date: Fri, 24 Nov 2023 17:32:32 +0800 Subject: [PATCH] =?UTF-8?q?Docker=E9=95=9C=E5=83=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=94=AF=E6=8C=81webrtc=20datachannel=20=20(#3020=20#3019)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dockerfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dockerfile b/dockerfile index 84851901..f02a8fb7 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 AS build +FROM ubuntu:20.04 AS build ARG MODEL #shell,rtmp,rtsp,rtsps,http,https,rtp EXPOSE 1935/tcp @@ -31,24 +31,31 @@ RUN apt-get update && \ gcc \ g++ \ libavcodec-dev libavutil-dev libswscale-dev libresample-dev \ + libsdl-dev libusrsctp-dev \ gdb && \ apt-get autoremove -y && \ apt-get clean -y && \ - wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz -O libsrtp-2.2.0.tar.gz && tar xfv libsrtp-2.2.0.tar.gz && \ - cd libsrtp-2.2.0 && ./configure --enable-openssl && make -j $(nproc) && make install && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* RUN mkdir -p /opt/media COPY . /opt/media/ZLMediaKit WORKDIR /opt/media/ZLMediaKit + +# 3rdpart init +WORKDIR /opt/media/ZLMediaKit/3rdpart +RUN wget https://mirror.ghproxy.com/https://github.com/cisco/libsrtp/archive/v2.3.0.tar.gz -O libsrtp-2.3.0.tar.gz && \ + tar xfv libsrtp-2.3.0.tar.gz && \ + mv libsrtp-2.3.0 libsrtp && \ + cd libsrtp && ./configure --enable-openssl && make -j $(nproc) && make install #RUN git submodule update --init --recursive && \ + RUN mkdir -p build release/linux/${MODEL}/ WORKDIR /opt/media/ZLMediaKit/build RUN cmake -DCMAKE_BUILD_TYPE=${MODEL} -DENABLE_WEBRTC=true -DENABLE_FFMPEG=true -DENABLE_TESTS=false -DENABLE_API=false .. && \ make -j $(nproc) -FROM ubuntu:18.04 +FROM ubuntu:20.04 ARG MODEL # ADD sources.list /etc/apt/sources.list @@ -68,6 +75,7 @@ RUN apt-get update && \ gcc \ g++ \ libavcodec-dev libavutil-dev libswscale-dev libresample-dev \ + libsdl-dev libusrsctp-dev \ gdb && \ apt-get autoremove -y && \ apt-get clean -y && \