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
<br />Original text: http://andymao.com/andy...
This article shares the specific code of vue echa...
It took me three hours to install MySQL myself. E...
Table of contents 1 Introduction 2 Basic usage 2....
Table of contents 1. Add attributes 2. Merge mult...
In this article, I will explain the relevant cont...
Get a deep understanding of how the Linux configu...
Table of contents 1. Use slots to make components...
Scenario A recent requirement is an h5 page for m...
Achieve results Implementation Code html <div ...
Table of contents The role of foreign keys mysql ...
After adding –subnet to Docker network Create, us...
Installation Steps 1. Create a virtual machine 2....
Install SSHPASS For most recent operating systems...
This article shares the installation of MySQL 5.7...