Boot2docker/Windows:无法在Ubuntu容器上运行bash

前端之家收集整理的这篇文章主要介绍了Boot2docker/Windows:无法在Ubuntu容器上运行bash前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在通过“Docker Book”,我在第3章,安装和运行Ubuntu容器.我在Windows 7.1上,使用Boot2Docker.

以下是我尝试运行时发生的情况(这是第二次尝试,因此它已经有了图像的本地副本):

$docker run -i -t ubuntu /bin/bash
exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/Program Files (x86)/Git/bin/bash: no such file or directory
FATA[0000] Error response from daemon: Cannot start container 5e985b0b101bb9584ea3e40355089a54d1fba29655d5a1e0900c9b32c4f7e4c4: [8] System error: exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/Program Files (x86)/Git/bin/bash: no such file or directory

状态:

$docker ps -a
CONTAINER ID    IMAGE           COMMAND                CREATED            STATUS              PORTS   NAMES
5e985b0b101b    ubuntu:latest   "C:/Program Files (x   21 minutes ago     loving_mayer

它抱怨缺少C:/ Program Files(x86)/ Git / bin / bash,但我当然在我的机器上有这个:

$ls -l "c:/Program Files (x86)/Git/bin/bash"
-rwxr-xr-x    1 neilw    Administ   598016 May  4 09:27 c:/Program Files (x86)/Git/bin/bash

有什么想法吗?

这对我有用:

docker run -t -i ubuntu //bin/bash

双// //避免转换[1]

[1] http://www.mingw.org/wiki/Posix_path_conversion

猜你在找的Docker相关文章