docker 使用centos7 制作 ffmpeg
FROM centos:7.9.2009 LABEL NAME="MARGO" LABEL DESC="ffmpeg 测试" RUN curl -O http://mirrors.sau.edu.cn/repo/Centos-7.repo RUN yum clean all && yum makecache RUN yum -y update && yum -y install gcc build-essential && yum -y install make zlib-devel gcc-c++ libtool openssl openssl-devel WORKDIR /yasm ADD yasm-1.3.0.tar /yasm RUN cd /yasm/yasm-1.3.0; \ ./configure; \ make; \ make install; WORKDIR /ffmpeg ADD ffmpeg-4.1.tar.xz /ffmpeg RUN cd /ffmpeg/ffmpeg-4.1; \ ./configure --enable-shared --prefix=/usr/local/ffmpeg; \ make; \ make install; \ echo "/usr/local/ffmpeg/lib" >> /etc/ld.so.conf; \ ldconfig; ENV PATH /usr/local/ffmpeg/bin:$PATH VOLUME [ "/sys/fs/cgroup" ] # EXPOSE 80 CMD ["/usr/sbin/init"]
以上是Dockerfile 文件
还有两个文件下载地址如下
https://johnvansickle.com/ffmpeg/release-source/
http://www.tortall.net/projects/yasm/releases/
然后进入到这个ffmpeg 目录下依次输入以下命令
docker build --rm -t margo/centos7_ffmpeg .
docker run --name centos7_ffmpeg_demo -it margo/centos7_ffmpeg bash
然后在容器中查看效果
本文来自博客园,作者:margo,转载请注明原文链接:https://www.cnblogs.com/ZMargo/articles/16277291.html