mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
parent
db0818c8d2
commit
bd22c44ee9
18
dockerfile
18
dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:18.04 AS build
|
FROM ubuntu:20.04 AS build
|
||||||
ARG MODEL
|
ARG MODEL
|
||||||
#shell,rtmp,rtsp,rtsps,http,https,rtp
|
#shell,rtmp,rtsp,rtsps,http,https,rtp
|
||||||
EXPOSE 1935/tcp
|
EXPOSE 1935/tcp
|
||||||
@ -31,24 +31,31 @@ RUN apt-get update && \
|
|||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
libavcodec-dev libavutil-dev libswscale-dev libresample-dev \
|
libavcodec-dev libavutil-dev libswscale-dev libresample-dev \
|
||||||
|
libsdl-dev libusrsctp-dev \
|
||||||
gdb && \
|
gdb && \
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
apt-get clean -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 && \
|
rm -rf /var/lib/apt/lists/*
|
||||||
cd libsrtp-2.2.0 && ./configure --enable-openssl && make -j $(nproc) && make install && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN mkdir -p /opt/media
|
RUN mkdir -p /opt/media
|
||||||
COPY . /opt/media/ZLMediaKit
|
COPY . /opt/media/ZLMediaKit
|
||||||
WORKDIR /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 git submodule update --init --recursive && \
|
||||||
|
|
||||||
RUN mkdir -p build release/linux/${MODEL}/
|
RUN mkdir -p build release/linux/${MODEL}/
|
||||||
|
|
||||||
WORKDIR /opt/media/ZLMediaKit/build
|
WORKDIR /opt/media/ZLMediaKit/build
|
||||||
RUN cmake -DCMAKE_BUILD_TYPE=${MODEL} -DENABLE_WEBRTC=true -DENABLE_FFMPEG=true -DENABLE_TESTS=false -DENABLE_API=false .. && \
|
RUN cmake -DCMAKE_BUILD_TYPE=${MODEL} -DENABLE_WEBRTC=true -DENABLE_FFMPEG=true -DENABLE_TESTS=false -DENABLE_API=false .. && \
|
||||||
make -j $(nproc)
|
make -j $(nproc)
|
||||||
|
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:20.04
|
||||||
ARG MODEL
|
ARG MODEL
|
||||||
|
|
||||||
# ADD sources.list /etc/apt/sources.list
|
# ADD sources.list /etc/apt/sources.list
|
||||||
@ -68,6 +75,7 @@ RUN apt-get update && \
|
|||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
libavcodec-dev libavutil-dev libswscale-dev libresample-dev \
|
libavcodec-dev libavutil-dev libswscale-dev libresample-dev \
|
||||||
|
libsdl-dev libusrsctp-dev \
|
||||||
gdb && \
|
gdb && \
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
apt-get clean -y && \
|
apt-get clean -y && \
|
||||||
|
Loading…
Reference in New Issue
Block a user