Using win docker-desktop, I want to connect to container development and try various ways on the network. kill my much time! Bridging is not an option. Manually adding routes doesn't work either. So if you see this, don't think of using the conventional method to connect your Linux container using the Windows host. As of March 29, 2020 See Networking features in Docker Desktop for Windows for more information. That is to say, bridge communication between win and linux containers is not currently supported. However, port mapping is still possible, but it is a bit troublesome to add too many ports. To the hours that have passed. in addition I can use the remote-dev of vscode on the host machine to directly access the container. I suddenly found it was great and solved my development difficulties. Finally I can b2w, so happy btw My computer's graphics card couldn't match tensorflow no matter how I tried, and vm didn't support graphics cards but docker did, so I ended up with win+docker+vscode as a perfect combination (and then I found out that docker-desktop currently doesn't support graphics cards for Linux:( ) Supplement: The Docker container cannot be pinged under the win10 host, and Docker creates a static IP WorkaroundAdd the gateway IP of Docker to the host routing // CMD Administrator Mode // 172.19.0.0 is created by me, and needs to be changed according to your needs. route add 172.19.0.0/16 mask 255.255.255.0 10.0.75.2 -p // Permanent route, otherwise it will not be there after restart win: View route printDocker Gateway:Docker creates a static IP// Docker assigns static IP addresses. You must customize your own network. The default network does not work. docker network create --subnet=172.19.0.0/16 mynet //2 to the 16th power is used. docker run -itd --name nginx2 --net mynet --ip 172.19.0.1 ubuntu The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Web Design Teaching or Learning Program
>>: Two ways to implement square div using CSS
1. RTMP RTMP streaming protocol is a real-time au...
VMWare (Virtual Machine ware) is a "virtual ...
New features in MySQL 8.0 include: Full out-of-th...
Table of contents Basic instructions and usage An...
Table of contents Load Balancing Load balancing c...
1. Document flow and floating 1. What is document...
This article records the installation and configu...
To get straight to the point, there is a very com...
Recently, I encountered a problem of whether the d...
Preface The so-called fuzzy query is to provide q...
Project Documentation Directory Div+CSS Naming Sta...
Causes and consequences 1. When using the ansible...
MySql index detailed introduction and correct use...
Anyone who has worked on a large system knows tha...
1. Edit the docker.service file vi /usr/lib/syste...