2017-06-05 72 views
2

我在Windows 10上用https://docs.docker.com/docker-for-windows/install/#install-docker-for-windows安裝docker。它不使用VirtualBox和默認VM來託管Docker。用ssh連接到windows上的docker守護進程

我能運行容器,但我怎麼連接到一個碼頭與SSH?

docker-machine ls不顯示我的碼頭主機。

試圖連接到[email protected],但它需要密碼。而tcuser是用於boot2docker VM不匹配

ssh [email protected] 
Could not create directory '/home/stan/.ssh'. 
The authenticity of host '10.0.75.1 (10.0.75.1)' can't be established. 
RSA key fingerprint is .... 
Are you sure you want to continue connecting (yes/no)? yes 
Failed to add the host to the list of known hosts (/home/stan/.ssh/known_hosts). 
[email protected]'s password: 
Write failed: Connection reset by peer 
+0

Hi @Stan B!你的具體用例是什麼?也就是說,你想通過SSH連接做什麼?可能有另一種方法來做你想做的事情。樂於幫助,只需要更多的信息:)乾杯, –

+0

我正在學習碼頭內部。我想看看在容器中運行的進程,並找到在主機上運行的相關進程。我想訪問/ var/lib/docker/aufs來查看圖像和容器文件系統。我有兩個環境。一個人在家裏與虛擬機和我成功做一切,碼頭機顯示默認的機器,我可以連接到它與SSH。第二個是與直接安裝在帶有hyper-v的windows上的docker引擎一起工作。 docker命令有效,但我如何訪問引擎內部的文件和進程? –

+0

我認爲線程@nhol鏈接是你最好的選擇。尤其是,Ailurarctos在那裏的答案對我來說聽起來很合理。如果你有更多的問題,可能會在那邊碰到話題? –

回答

2

據我所知,使用SSH,你不能連接到泊塢窗VM,你不能連接到使用Hyper-V管理器或者控制檯/終端。 https://forums.docker.com/t/how-can-i-ssh-into-the-betas-mobylinuxvm/10991/17

+0

我有另一臺虛擬機裏面安裝有作爲虛擬機的docker。當然,我可以通過ssh連接到它。當您在已安裝VirtualBox和Hyper-V的計算機上安裝docker for windows時,它將在virtualbox中創建名爲default的VM(boot2docker映像)。你可以用ssh來連接它,就像普通的linux VM一樣。 –

+1

是的,但你的問題表明它不使用virtualbox – NHol

相關問題