私の環境では以下のようにしたらできました。
OS: Windows10 Pro 1803
docker-machine: docker-machine version 0.7.0, build a650a40
1. 仮想スイッチを作成する
Hyper-Vの仮想スイッチマネージャーで内部ネットワークで新規に作成します。
名前は英字なら何でも良いと思います。
2. ホスト側のネットワークの共有を作成する
ホスト側ネットワークも共有を作成して 1で作成した仮想スイッチに接続を許可する
3. 実行するときのsshを内部で持っているものにする
docker-machine create のときに --native-ssh
をオプションとしてつける
仮想スイッチの名前をDockerNATとした場合、管理者権限を持つコマンドプロンプトで以下を実行します。
docker-machine.exe --native-ssh create -d hyperv --hyperv-virtual-switch DockerNAT default
【参考】
Docker-docs 異なる種類の SSH
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\xxxxxxx.docker\machine\cache\boot2docker.iso to C:\Users\xxxxxxx.docker\machine\machines\default\boot2docker.iso...
(default) Creating SSH key...
(default) Creating VM...
(default) Using switch "DockerNAT"
(default) Creating VHD
(default) Starting VM...
(default) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine.exe env default
ちなみに docker-machine ssh をするときにも --native-ssh を付ける必要がありました
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。