我希望按照这些说明运行一个docker容器:
https://docs.docker.com/machine/drivers/hyper-v/#environment-variables-and-default-values
当我运行docker-machine -D create -d hyperv --hyperv-virtual-switch "minikube" --hyperv-cpu-count "1" --hyperv-memory "1024" --hyperv-disk-size "20000" worker4
docker卡住并进一步重复此步骤:
Waiting for SSH to be available...
Getting to WaitForSSH function...
(worker4) Calling .GetSSHHostname
(worker4) DBG | [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM worker4 ).state
(worker4) DBG | [stdout =====>] : Running
(worker4) DBG |
(worker4) DBG | [stderr =====>] :
(worker4) DBG | [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM worker4 ).networkadapters[0]).ipaddresses[0]
(worker4) DBG | [stdout =====>] : fe80::215:5dff:fe0a:2b3d
(worker4) DBG |
(worker4) DBG | [stderr =====>] :
(worker4) Calling .GetSSHPort
(worker4) Calling .GetSSHKeyPath
(worker4) Calling .GetSSHKeyPath
(worker4) Calling .GetSSHUsername
Using SSH client type: external
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@fe80::215:5dff:fe0a:2b3d -o IdentitiesOnly=yes -i C:\Use
rs\account\.docker\machine\machines\worker4\id_rsa -p 22] C:\Program Files\Git\usr\bin\ssh.exe <nil>}
我在家里尝试了相同的步骤(两个系统都使用Windows 10)并且它成功了。在比较我发现的日志之后,我在家里得到了一个本地的ipv4地址。我们在工作时只使用ipv4,所以我很困惑为什么我得到一个ipv6地址。这可能是它被卡住的错误吗?
更新
删除git bash并再次运行命令后,我收到此错误:
Error dialing TCP: dial tcp [fe80::215:5dff:fe0a:2b47]:22: connectex: Ein Socketvorgang bezog sich auf ein nicht verfügbares Netzwerk.
根据微软的说法,网络无法访问。可能是因为我的网卡配置错过了,或者路由器有问题吗?
答案 0 :(得分:0)
问题在于我们网络的IP地址是静态的。
minikube stop
minikube start