I have dockerized an app which has ffmpeg installed in it via libav-tools. The app launches without problem, yet the problem occured when fluent-ffmpeg npm module tried to execute ffmpeg command, which was not found. When I wanted to check the version of the ffmpeg and the linux distro set up in the image, I used sudo docker exec -it c44f29d30753 "lsb_release -a"
command, but it gave the following error: OCI runtime exec failed: exec failed: container_linux.go:296: starting container process caused "exec: \"lsb_release -a\": executable file not found in $PATH": unknown
Then I realized that it gives me the same error with all the commands that I try to run inside the image or the container.
OCI runtime exec failed: exec failed: container_linux.go:296: starting container process caused "exec: \"ffmpeg -a\": executable file not found in $PATH": unknown
This is my Dockerfile:
FROM ubuntu:xenial
FROM node
RUN apt-get -y update
RUN apt-get --yes install libav-tools
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN npm install
COPY . /usr/src/app
RUN npm run build
ENV NODE_ENV production
EXPOSE 8000
CMD ["npm", "run", "start:prod"]
I would kindly ask for your help. Thank you very much!
docker run --rm -ti your-image-name sh
and find your executable. It is probably only a PATH problem (the directory where your executable is placed in is not in the PATH of the root unser inside the container)apt-get install ffmpeg
, the outcome is:Package ffmpeg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'ffmpeg' has no installation candidate
. However I can get the same package in my ubuntu 16.04 OS. May something be wrong with the OS in the container?apt-get update
?apt-get -y update && apt-get -y upgrade
, and inside the container when I try to runlsb_release -a
, this time the output issh: 4: lsb_release: not found
, same for ffmpeg:sh: 5: ffmpeg: not found
. I runapt-get install libav-tools
and get# apt-get install libav-tools Reading package lists... Done Building dependency tree Reading state information... Done libav-tools is already the newest version.
. If Ifind -name "ffmpeg"
output is empty.export PATH=$PATH:/my/bin/folder