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
Table of contents 1. React Hooks vs. Pure Functio...
A hyperlink URL in Vm needs to be concatenated wit...
1. Install tomcat8 with docker 1. Find the tomcat...
Normally, you'll need to read everyone's s...
You can use the command: docker tag [image id] [n...
Overview I have recently started learning MySQL r...
recommend: Navicat for MySQL 15 Registration and ...
Table of contents 1. Achieve results 2. Implement...
1. InnoDB storage engine must be used It has bett...
Let's take a look at the situation where Secu...
Because I have a database tutorial based on SQL S...
Overview The builder pattern is a relatively simp...
One demand Generally speaking, a company has mult...
I just want to make a small thing that combines w...
introduction If you are familiar with using JDBC ...