您的位置 首页 docker

ffmpeg 基础镜像-4.3.1

ffmpeg 基础镜像

https://ffmpeg.org/releases/

wget https://ffmpeg.org/releases/ffmpeg-4.3.1.tar.gz

基于centos比较麻烦, 用ubuntu20.04比较舒服

FROM registry.cn-hangzhou.aliyuncs.com/kattgatt-base/jdk17-ffmpeg4.3.1-ubuntu20.04:v1.1

 

Dockerfile

FROM registry.cn-hangzhou.aliyuncs.com/kattgatt-base/ubuntu20.4-aliyuan:v1.0
MAINTAINER zhaozhiyong  "715740383@qq.com"
#USER root
WORKDIR /opt
ADD ./ffmpeg-4.3.1.tar.gz .
#关闭安装yasm 交互
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y install gcc make yasm pkg-config libfreetype6-dev



#RUN ls -l /opt/ffmpeg-4.3.1/configure
RUN cd /opt/ffmpeg-4.3.1 && ./configure --enable-libfreetype   && make && make install 

RUN ffmpeg -version



#CMD ["tail","-f","/etc/hosts"]

 

build.sh

#!/bin/bash

imagename=ffmpeg4.3.1-ubuntu20.4:v1.0
#docker build -t registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename --no-cache -f Dockerfile . --progress=plain
docker build -t registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename  -f Dockerfile . --progress=plain
docker push registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename

 

 

centos 有问题:

dockerfile

FROM registry.cn-hangzhou.aliyuncs.com/kattgatt-base/centos79-ali-gcc:v1.1
MAINTAINER zhaozhiyong  "715740383@qq.com"
#USER root
WORKDIR /opt
ADD ./ffmpeg-4.3.1.tar.gz .
RUN pwd 
RUN ls -l

RUN ls -l /opt/ffmpeg-4.3.1/configure
#RUN cd /opt/ffmpeg-4.3.1 && ./configure --prefix=/opt/ffmpeg  --disable-x86asm && make && make install
RUN cd /opt/ffmpeg-4.3.1 && ./configure   --disable-x86asm && make && make install

RUN ffmpeg -version



#CMD ["tail","-f","/etc/hosts"]

 

configure 后边不配置路径,就不需要配置环境变量了

 

build.sh

[root@harbor 1ffmpeg]# cat build.sh 
#!/bin/bash

imagename=ffmpeg4.3.1-centos79:v1.1
docker build -t registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename --no-cache -f Dockerfile . --progress=plain
docker push registry.cn-hangzhou.aliyuncs.com/kattgatt-base/$imagename

 

 

./configure --prefix=/opt/ffmpeg  --disable-x86asm && make && make install

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章