简体   繁体   English

OCI 运行时创建失败:container_linux.go:348:启动容器进程导致“exec:\\”-it\\“:在 $PATH 中找不到可执行文件”:未知

[英]OCI runtime create failed: container_linux.go:348: starting container process caused “exec: \”-it\“: executable file not found in $PATH”:unknown

I am not able to run the container from the image in docker for windows version 18.03.1-ce.对于 Windows 版本 18.03.1-ce,我无法从 docker 中的映像运行容器。 I am trying to run the command:我正在尝试运行命令:

  docker run ubuntu -it /bin/bash

Somehow it is not able to find the path of the /bin/bash .不知何故,它无法找到/bin/bash的路径。 I don't know why this is happening.我不知道为什么会这样。

The docker command line is order sensitive. docker 命令行是顺序敏感的。 The order of args goes: args 的顺序是:

docker ${args_to_docker} run ${args_to_run} image_ref ${cmd_in_container}

Everything after ubuntu in your command goes to the command trying to be run.命令中ubuntu之后的所有内容都转到尝试运行的命令。 In your case -it .在你的情况下-it What you want instead is to pass -it to "run" so that you get interactive input with a tty terminal associated.您想要的是将-it传递给“运行”,以便您获得与 tty 终端关联的交互式输入。

docker run -it ubuntu /bin/bash

This error encountered when trying to run command that is not in docker container /usr/bin or /usr/local/bin .尝试运行不在 docker 容器/usr/bin/usr/local/bin命令时遇到此错误。 If you have let's say rar installed in the docker then you can run rar command via docker exec, if you don't, will get the error above.如果您假设在docker 中安装了rar ,那么您可以通过 docker exec 运行 rar 命令,如果没有,则会出现上述错误。

Also don't use -t only use -i like below:也不要使用 -t 只使用 -i 如下:

docker exec -i <container_name> <command>
docker exec -i <container_name> rar

在尝试任何事情之前,请检查您的 docker 版本,更新,然后重试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OCI 运行时创建失败:container_linux.go:349:启动容器进程导致“exec:\\”xxxx\\“:在 $PATH 中找不到可执行文件”:未知 - OCI runtime create failed: container_linux.go:349: starting container process caused “exec: \”xxxx\“: executable file not found in $PATH”: unknown Docker:OCI 运行时创建失败:container_linux.go:349:启动容器进程导致“exec:\”java\“:$PATH 中找不到可执行文件” - Docker: OCI runtime create failed: container_linux.go:349: starting container process caused “exec: \”java\“: executable file not found in $PATH” OCI 运行时创建失败:container_linux.go:349:启动容器进程导致“exec:\\”r-base\\“:在 $PATH 中找不到可执行文件”:未知 - OCI runtime create failed: container_linux.go:349: starting container process caused “exec: \”r-base\“: executable file not found in $PATH”: unknown 无法重新启动容器 OCI 运行时创建失败:container_linux.go:367:启动容器进程导致:exec:: 权限被拒绝:未知 - Cannot restart container OCI runtime create failed: container_linux.go:367: starting container process caused: exec:: permission denied: unknown 无法启动容器错误:API 错误(400):OCI 运行时创建失败:container_linux.go:348:导致启动容器进程 - CannotStartContainerError: API error (400): OCI runtime create failed: container_linux.go:348: starting container process caused Dockerfile-错误:用于php无法启动服务php:OCI运行时创建失败:container_linux.go:348:启动容器进程导致“ exec - Dockerfile - ERROR: for php Cannot start service php: OCI runtime create failed: container_linux.go:348: starting container process caused "exec OCI 运行时执行失败:执行失败:container_linux.go:349:启动容器进程导致“exec: - OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: OCI运行时exec失败:exec失败:container_linux.go:344:启动容器进程导致\\“exec - OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caused \"exec OCI 运行时执行失败:执行失败:container_linux.go:380:启动容器进程导致:执行:<PATH> : - OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: <PATH>: container_linux.go:349: 启动容器进程导致 exec: flask: 在 $PATH 中找不到可执行文件 - container_linux.go:349: starting container process caused exec: flask: executable file not found in $PATH
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM