Update Dockerfile to 20.04 version

This commit is contained in:
Gemfield
2020-04-06 15:52:45 +00:00
parent 4d74360609
commit 8e3cbd11d3
6 changed files with 31 additions and 25 deletions

View File

@@ -24,9 +24,10 @@ RUN apt-get update && \
libmysqlclient-dev \
libx264-dev \
libfaac-dev \
ffmpeg \
libmp4v2-dev && \
apt autoremove -y && \
apt clean -y && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/media
@@ -38,7 +39,7 @@ RUN git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit && \
WORKDIR /opt/media/ZLMediaKit/build
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j4
make
ENV PATH /opt/media/ZLMediaKit/release/linux/Release:$PATH
CMD MediaServer
CMD MediaServer

View File

@@ -24,8 +24,8 @@ RUN apt-get update && \
libx264-dev \
libfaac-dev \
libmp4v2-dev && \
apt autoremove -y && \
apt clean -y && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/media
@@ -37,7 +37,7 @@ RUN git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit && \
WORKDIR /opt/media/ZLMediaKit/build
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
make -j4
make
FROM ubuntu:18.04
LABEL maintainer "Gemfield <gemfield@civilnet.cn>"
@@ -51,12 +51,13 @@ RUN apt-get update && \
libssl-dev \
libx264-dev \
libfaac-dev \
ffmpeg \
libmp4v2-dev && \
apt autoremove -y && \
apt clean -y && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/media/bin/
COPY --from=build /opt/media/ZLMediaKit/release/linux/Release/MediaServer /opt/media/bin/MediaServer
ENV PATH /opt/media/bin:$PATH
CMD MediaServer
CMD MediaServer