为什么bash在Windows的boot2docker中如此缓慢呢? [英] Why is bash so painfully slow in boot2docker for Windows?
问题描述
我已经在Windows 7上安装了boot2docker,我注意到它的运行速度非常慢.我已经在几台机器上尝试了相同的结果-加载需要一段时间,最糟糕的部分是打字和实际出现在屏幕上的字符之间的延迟太可怕了-大约20到30秒!这使得boot2docker实际上无法在Windows上使用.
I have installed boot2docker on Windows 7 and I have noticed that it is incredibly slow. I have tried on several machines with the same result - it takes a while to load and the worst part is the lag between typing and the characters actually appearing on screen is horrible - around 20-30 seconds! This makes boot2docker virtually impossible to use on windows.
我想知道是否有人遇到过这个问题并且可以看到任何解决方案吗?
I wonder if someone has come accross this problem and can see any solution?
推荐答案
运行boot2docker ssh
时,问题似乎来自SSH客户端.在%PATH%
和我的系统上搜索此SSH客户端,默认情况下为C:\Program Files (x86)\Git
.就像您报告的那样,它非常慢.
It looks like the problem comes from the SSH client when running boot2docker ssh
. This SSH client is searched on the %PATH%
and on my system, by default, it was C:\Program Files (x86)\Git
. Like you reported, it is dramatically slow.
顺便说一句,如果您打开命令行并直接运行ssh <boot2docker IP address>
以连接到boot2docker VM,这也非常慢,而在Boot2docker VM本身中使用shell很好.
By the way, if you open a command-line and run directly ssh <boot2docker IP address>
to connect to the boot2docker VM, it is also very slow whereas using shell inside the Boot2docker VM itself is fine.
我尚不知道为什么此SSH客户端运行缓慢,但是我已经通过安装Cygwin( https://www.cygwin.com/)并重载%PATH%
:
I don't know yet why this SSH client is slow BUT I've replaced it successfully by installing Cygwin (https://www.cygwin.com/) and overloading %PATH%
:
C:\> set PATH=C:\PrgFiles\cygwin64\bin;%PATH%
C:\> boot2docker ssh`
不再慢了.
这篇关于为什么bash在Windows的boot2docker中如此缓慢呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!