OCI 运行时执行失败:执行失败:(...)在 $PATH 中找不到可执行文件":未知 [英] OCI runtime exec failed: exec failed: (...) executable file not found in $PATH": unknown
问题描述
我已经通过 libav-tools 对一个安装了 ffmpeg 的应用程序进行了docker化.该应用程序启动没有问题,但是当 fluent-ffmpeg npm 模块尝试执行未找到的 ffmpeg 命令时出现问题.当我想检查图像中设置的 ffmpeg 和 linux 发行版的版本时,我使用了 sudo docker exec -it c44f29d30753 "lsb_release -a"
命令,但它给出了以下错误:<代码>OCI运行时exec失败:exec失败:container_linux.go:296:启动容器进程导致exec:"lsb_release -a:在$PATH中找不到可执行文件":未知
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
这是我的 Dockerfile:
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!
推荐答案
这发生在我的 Windows 上.这些命令中的任何一个都可以使用
This happened to me on windows. Any of these commands will work
在 Windows CMD 上(不切换到 bash)
docker exec -it
在 Windows CMD 上(切换到 bash 后)
docker exec -it
或
winpty docker exec -it
关于 Git Bash
winpty docker exec -it
注意:您可能需要运行 use /bin/bash
或 /bin/sh
,具体取决于容器中的 shell.
NB: You might need to run use /bin/bash
or /bin/sh
, depending on the shell in your container.
原因记录在 Git 的 ReleaseNotes 文件中,这里有很好的解释 - Windows 版 Git 中的 Bash:怪异...
The reason is documented in the ReleaseNotes file of Git and it is well explained here - Bash in Git for Windows: Weirdness...
原因与试图确保 posix 路径最终正确传递给 git 实用程序有关.因此,Windows 版 Git 包含一个修改后的 MSYS 层,该层会影响命令参数."
这篇关于OCI 运行时执行失败:执行失败:(...)在 $PATH 中找不到可执行文件":未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!