【发布时间】:2016-03-03 17:48:46
【问题描述】:
当我使用 Cisco VPN Anyconnect 加入我的公司网络时,我无法让 docker-machine 连接到我的 virtualbox 虚拟机。这与 Cisco Anyconnect 接管所有 192.168.. 路由有关。我还尝试使用完全不同的 cidr 范围(25.0.1.100/24),但仍然无法让 docker-machine 与 VM 对话。当我检查路由表时,路由被添加到 utun0 而不是 vboxnet0。我假设 utun0 是 VPN 的主机网络接口。这里是 docker-machine 输出:
docker-machine create -d virtualbox dev
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
WARNING >>>
This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.
SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.
You may need to add the route manually, or use another related workaround.
This could be due to a VPN, proxy, or host file configuration issue.
You also might want to clear any VirtualBox host only interfaces you are not using.
To see how to connect Docker to this machine, run: docker-machine env dev
【问题讨论】:
-
当我从 vpn 断开连接时,它可以工作并且路由被添加到 vboxnet0(没有 utun0 网络接口)
标签: docker virtualbox vpn boot2docker docker-machine