ffmpeg install failing on docker container

2.1k Views Asked by At

I have a Dockerfile as below, where i am trying to install ffmpeg for audio-video processing.

FROM ubuntu:18.04
RUN  apt-get update  
RUN  apt install ffmpeg -y --fix-missing

I have tried other versions of Ubuntu docker image as well, but i keep getting the error as

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/s/slang2/libslang2_2.3.1a-3ubuntu1_amd64.deb  503  Service Unavailable [IP: 91.189.88.162 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/lm-sensors/libsensors4_3.4.0-4_amd64.deb  503  Service Unavailable [IP: 91.189.88.162 80]
E: Aborting install.

Where if i use the Libav-tools as :

RUN apt-get install libav-tools -y

I get the error as I need to update to avconv version 10, which is not helping either.

Can anyone here help for how should I go about extracting audio from videos on docker container ?

2

There are 2 best solutions below

0
Kerolos William On

Well as mentioned in the comments from @Sarang the image you are trying to build should work fine I can suggest few solutions:

  • Start small sever and build the image and then push it to docker hub if you don't wanna to use your own image
  • you can change the the Repos and try again
0
Compadre Javo On

I solved this issue changing this

RUN  apt-get install 'ffmpeg'

to

RUN  apt-get update && apt-get install 'ffmpeg' 

And then rebuilding the image with no-cache.

It seems to be a problem with the cached image of docker, according to Phil Kulak