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
然后我意识到无论我尝试在镜像或容器内部运行哪些命令,都会给我相同的错误。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:
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"]
我想恳请您的帮助。非常感谢!
docker run --rm -ti your-image-name sh
进入容器,找到可执行文件。这可能只是一个PATH问题(即包含可执行文件的目录未在容器内根用户的PATH中)。 - whites11apt-get -y update && apt-get -y upgrade
命令,但在容器内尝试运行lsb_release -a
时,输出为sh: 4: lsb_release: not found
。ffmpeg也是一样的情况:sh: 5: ffmpeg: not found
。然后我运行了apt-get install libav-tools
并得到如下信息:# apt-get install libav-tools Reading package lists... Done Building dependency tree Reading state information... Done libav-tools is already the newest version.
。如果我执行find -name "ffmpeg"
命令,输出为空。 - Uğur Kayaexport PATH=$PATH:/my/bin/folder
- whites11