OCI运行时exec失败:exec失败:(...)在$ PATH中找不到可执行文件“”:未知 [英] OCI runtime exec failed: exec failed: (...) executable file not found in $PATH": unknown

查看:801
本文介绍了OCI运行时exec失败:exec失败:(...)在$ PATH中找不到可执行文件“”:未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过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"]

我恳请您的帮助。

推荐答案

这在Windows上发生了。
这些命令中的任何一条都可以使用

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

在Windows CMD上(不切换到bash)

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

在Windows CMD上(切换为bash之后)

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

Winpty泊坞窗exec -it< container-id> // bin // sh

在Git Bash上

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

NB:您可能需要使用 / bin / bash / bin / sh ,具体取决于容器中的外壳。

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

原因已记录在Git的ReleaseNotes文件中,并在此处进行了很好的解释-的命令:怪异...

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运行时exec失败:exec失败:(...)在$ PATH中找不到可执行文件“”:未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆