Boot2docker / Windows的:无法在Ubuntu容器中运行的bash [英] Boot2docker/Windows: can't run bash on Ubuntu container
问题描述
我通过泊坞窗书的工作,是在第3章,安装和运行Ubuntu的容器。我在Windows 7.1,使用Boot2Docker。
I'm working through "The Docker Book", am on chapter 3, installing and running an Ubuntu container. I'm on Windows 7.1, using Boot2Docker.
下面是当我尝试运行它(这是第二次尝试,所以它已经具备了图像的本地副本)会发生什么:
Here's what happens when I try to run it (this is the second attempt, so it already has a local copy of the image):
$ 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文件(86)/混帐/斌/ bash的,但我肯定有我的机器上:
It's complaining about lack of C:/Program Files (x86)/Git/bin/bash, but I certainly have that on my machine:
$ 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]
The double // avoids the conversion[1]
[1] <一个href=\"http://www.mingw.org/wiki/Posix_path_conversion\">http://www.mingw.org/wiki/Posix_path_conversion
这篇关于Boot2docker / Windows的:无法在Ubuntu容器中运行的bash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!