3

I've installed Docker for Windows on my Windows 10 machine, which uses Hyper-V. Its default network adapter (virtual switch) is DockerNAT, an internal network.

If I shut down the VM (the default MobyLinuxVM) and change the network adapter to one using the external network, after restarting the VM, it has switched back to DockerNAT. If I change DockerNAT itself to use the external network, it gets changed back to internal.

Why is that? And what is the preferred way of getting some connectivity for Docker?

1

Microsoft describes here how to add NAT to the DockerNAT switch in order to allow external access.

It boils down to:

New-NetNat -Name DockerNAT -InternalIPInterfaceAddressPrefix 10.0.0.0/17

Using the IP range configured in Docker 4 Windows.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.