dockerFile 安装ffmpeg

2020-04-15  本文已影响0人  coderYJ

因为最近项目需要所以在docker内部安装ffmpeg 我是各种百度无解, 去国外的stackoverflow中才找到的解决方案, 原因在于docker用的是阿里云的镜像, 但是阿里云的镜像里面没有ffmpe, 所以要强制切换源
参考地址 https://stackoverflow.com/questions/55386246/w-failed-to-fetch-http-deb-debian-org-debian-dists-jessie-updates-main-binary

上代码

RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
# As suggested by a user, for some people this line works instead of the first one. Use whichever works for your case
# RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
 
#7更新源
RUN apt-get -o Acquire::Check-Valid-Until=false update
 
#8安装ffmpeg
RUN apt-get -y --force-yes install yasm ffmpeg
上一篇下一篇

猜你喜欢

热点阅读