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

查看:2123
本文介绍了OCI运行时创建失败:container_linux.go:348:启动容器进程导致“ exec:\ -it\”:在$ PATH中找不到可执行文件”:未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Windows版本18.03.1-ce,我无法从Docker中的映像运行容器。我正在尝试运行命令:

I am not able to run the container from the image in docker for windows version 18.03.1-ce. I am trying to run the command:

  docker run ubuntu -it /bin/bash

以某种方式无法找到 / bin / bash 的路径。我不知道为什么会这样。

Somehow it is not able to find the path of the /bin/bash. I don't know why this is happening.

推荐答案

docker命令行是顺序敏感的。 args的顺序为:

The docker command line is order sensitive. The order of args goes:

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

命令中 ubuntu 之后的所有内容都转到试图跑。就您而言,-它。相反,您想要的是传递 -it 进行运行,以便获得与tty终端相关联的交互式输入。

Everything after ubuntu in your command goes to the command trying to be run. In your case -it. What you want instead is to pass -it to "run" so that you get interactive input with a tty terminal associated.

docker run -it ubuntu /bin/bash

这篇关于OCI运行时创建失败:container_linux.go:348:启动容器进程导致“ exec:\ -it\”:在$ PATH中找不到可执行文件”:未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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