Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
40036ee9
Commit
40036ee9
authored
Dec 26, 2020
by
Kevin Cheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
centos7 docker 镜像支持
parent
bc125e65
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
133 行增加
和
0 行删除
+133
-0
build_docker_images.sh
+1
-0
docker/centos7/Dockerfile.runtime
+132
-0
没有找到文件。
build_docker_images.sh
查看文件 @
40036ee9
...
...
@@ -4,3 +4,4 @@ docker build -t gemfield/zlmediakit:20.04-runtime-ubuntu18.04 -f docker/ubuntu18
docker build
-t
gemfield/zlmediakit:20.04-devel-ubuntu18.04
-f
docker/ubuntu18.04/Dockerfile.devel
.
docker build
-t
gemfield/zlmediakit:20.04-runtime-ubuntu16.04
-f
docker/ubuntu16.04/Dockerfile.runtime
.
docker build
-t
gemfield/zlmediakit:20.04-devel-ubuntu16.04
-f
docker/ubuntu16.04/Dockerfile.devel
.
docker build
-t
gemfield/zlmediakit:centos7-runtime
-f
docker/centos7/Dockerfile.runtime
.
docker/centos7/Dockerfile.runtime
0 → 100644
查看文件 @
40036ee9
ARG Version=7
FROM centos:${Version} As build
ARG HTTP_PROXY=${NO_PROXY}
ARG HTTPS_PROXY=${NO_PROXY}
ARG PKG_CONFIG_VERSION=0.29.2
ARG CMAKE_VERSION=3.18
ARG CMAKE_FULL_VERSION=3.18.4
ARG YASM_VERSION=1.3.0
ARG NASM_VERSION=2.15.05
ARG X265_VERSION=3.4
RUN yum install -y \
gcc \
gcc-c++ \
kernel-devel \
kernel-headers \
openssl \
openssl-devel \
git \
wget \
which
WORKDIR /opt
RUN wget -e "https_proxy=${HTTPS_PROXY}" https://pkgconfig.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz \
&& tar -zxvf pkg-config-${PKG_CONFIG_VERSION}.tar.gz \
&& cd pkg-config-${PKG_CONFIG_VERSION} \
&& ./configure --with-internal-glib \
&& make -j8 \
&& make install
RUN wget -e "https_proxy=${HTTPS_PROXY}" https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_FULL_VERSION}.tar.gz \
&& tar -zxvf cmake-${CMAKE_FULL_VERSION}.tar.gz \
&& cd cmake-${CMAKE_FULL_VERSION} \
&& ./bootstrap \
&& gmake -j8 \
&& gmake install
RUN cd /opt \
&& wget -e "https_proxy=${HTTPS_PROXY}" http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz \
&& tar zxvf yasm-${YASM_VERSION}.tar.gz \
&& cd yasm-${YASM_VERSION} \
&& ./configure \
&& make -j8 \
&& make install
RUN wget -e "https_proxy=${HTTPS_PROXY}" https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-${NASM_VERSION}.tar.xz \
&& tar -xvJf nasm-${NASM_VERSION}.tar.xz \
&& cd nasm-${NASM_VERSION} \
&& ./configure --disable-shared --enable-static \
&& make -j8 \
&& make install
RUN cd /opt \
&& git clone https://code.videolan.org/videolan/x264.git \
&& cd x264 \
&& git checkout -b stable origin/stable \
&& git pull --rebase \
&& ./configure --enable-pic --enable-shared --disable-asm \
&& make -j8 \
&& make install \
&& export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
RUN cd /opt \
&& wget -e "https_proxy=${HTTPS_PROXY}" https://github.com/videolan/x265/archive/Release_${X265_VERSION}.tar.gz \
&& tar zxvf Release_${X265_VERSION}.tar.gz \
&& cd x265-Release_${X265_VERSION}/build/linux \
&& cmake ../../source \
&& make -j8 \
&& make install \
&& export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
RUN cd /opt \
&& git clone https://gitee.com/xia-chu/FFmpeg.git \
&& cd /opt/FFmpeg \
&& export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH \
&& ./configure \
--disable-debug \
--disable-doc \
--disable-shared \
--enable-gpl \
--enable-version3 \
--enable-static \
--enable-nonfree \
--enable-pthreads \
--enable-libx264 \
--enable-libx265 \
--enable-small \
--pkgconfigdir=/usr/local/lib/pkgconfig \
--pkg-config-flags="--static" \
&& make -j8 \
&& make install
RUN cd /opt \
&& git clone --depth 1 https://github.com/xia-chu/ZLMediaKit.git \
&& cd ZLMediaKit \
&& git submodule update --init \
&& mkdir -p build release/linux/Release/ \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& make -j8
RUN mkdir -p /opt/build/opt/zlm/ /opt/build/usr/local/bin/ /opt/build/usr/bin/ /opt/build/usr/local/lib/ /opt/build/etc/localtime \
&& cd /opt/build \
&& /usr/bin/cp -ip /usr/local/lib/libx26* ./usr/local/lib \
&& /usr/bin/cp -ip /usr/local/bin/ffmpeg ./usr/local/bin \
&& /usr/bin/cp -ip /opt/ZLMediaKit/release/linux/Release/MediaServer ./opt/zlm/ \
&& /usr/bin/cp -irp /opt/ZLMediaKit/release/linux/Release/www ./opt/zlm/ \
&& /usr/bin/cp -ip /opt/ZLMediaKit/tests/ssl.p12 ./opt/zlm/ \
&& /usr/bin/cp -ip /usr/bin/which ./usr/bin/
FROM centos:${Version}
LABEL maintainer="chengxiaosheng <kevin__cheng@outlook.com>" project-url="https://github.com/xia-chu/ZLMediaKit" description="一个基于C++11的高性能运营级流媒体服务框架"
EXPOSE 9000/tcp \
1935/tcp \
19350/tcp \
554/tcp \
322/tcp \
80/tcp \
443/tcp \
10000/udp \
10000/tcp
WORKDIR /opt/zlm
VOLUME [ "/opt/zlm/conf/","/opt/zlm/log/","opt/zlm/ffmpeg/"]
COPY --from=build /opt/build /
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH TZ=Asia/Shanghai
CMD ./MediaServer -c ./conf/config.ini
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论