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!
Get rid of your quotes around your command. When you quote it, docker tries to run the full string
"lsb_release -a"
as a command, which doesn't exist. Instead, you want to run the commandlsb_release
with an argument-a
, and no quotes.Note, everything after the container name is the command and arguments to run inside the container, docker will not process any of that as options to the docker command.
I had this due to a simple ordering mistake on my end. I called
[WRONG] docker run <image> <arguments> <command>
When I should have used
docker run <arguments> <image> <command>
Same resolution on similar question: https://stackoverflow.com/a/50762266/6278
If @papigee does solution doesn't work, maybe you don't have the permissions.
I tried @papigee solution but does't work without sudo.
I did :
@papigee should work on Windows 10 just fine. I'm using the integrated VSCode terminal with git bash and this always works for me.
You can use another shell to execute the same command:
Error I get when i execute:
Solution: When I execute it with below command, using bash shell it works:
What I did to solve was simply:
This is for solving when using docker compose