Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OCI runtime exec failed: exec failed: (...) executable file not found in $PATH": unknown

Tags:

docker

ffmpeg

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!

like image 481
Uğur Kaya Avatar asked Dec 28 '17 02:12

Uğur Kaya


1 Answers

This happened to me on windows. Any of these commands will work

On Windows CMD (not switching to bash)

docker exec -it <container-id> /bin/sh

On Windows CMD (after switching to bash)

docker exec -it <container-id> //bin//sh

or

winpty docker exec -it <container-id> //bin//sh

On Git Bash

winpty docker exec -it <container-id> //bin//sh

NB: You might need to run use /bin/bash or /bin/sh, depending on the shell in your container.

The reason is documented in the ReleaseNotes file of Git and it is well explained here - Bash in Git for Windows: Weirdness...

"The cause has to do with trying to ensure that posix paths end up being passed to the git utilities properly. For this reason, Git for Windows includes a modified MSYS layer that affects command arguments."

like image 61
papigee Avatar answered Sep 21 '22 14:09

papigee