One, Windows, Linux virtual machines, Docker diagrams
If the Pingdocker container is ping different at this time because there is no route to the 172.17.0.0/24 network on the host, the host has the opportunity to send the data destined for the 172.17.0.0/24 network to the default route so that the container cannot be reached.
Ii. Operation 2.1 Shutting down the firewall in Linux
Systemctl Stop Firewalld.service
2.2 Installing and enabling the SSH service in the Docker container
/usr/sbin/sshd-d &
2.3 Windows host and virtual machine CentOS Network Interoperability
can be connected via Xshell
2.4 Virtual machine CentOS and Docker container Network interoperability
The Docker exec-it <container_id>/bin/bash command can be accessed inside the container in CentOS
2.5 routes added to the Docker container segment in Windows
C:\windows\system32>route add 172.17.0.0 mask 255.255.255.0 192.168.123.110
The route represents a packet to the 172.17.0.0/24 network via 192.168.123.110来 forwarding.
2.6 Testing
Windows connects to a Docker container inside a Linux virtual machine