background All of the company's servers are purchased Alibaba Cloud ECS hosts. The default intranet segment is 172.16.0.0/12, and the services on the test server are basically deployed using Docker. Workaround 1. Stop the Docker service on the host sudo systemctl stop docker 2. Modify the container configuration file /etc/docker/daemon.json sudo cat /etc/docker/daemon.json { "registry-mirrors": ["https://gbs4gco0.mirror.aliyuncs.com"], "bip": "10.50.0.1/16", } As described in the above code, the bip field in the configuration file can set the docker network segment of the host machine and configure it to the private network address (192.168.0.0/10.0.0.0/172.0.0.0) 3. Start the Docker service
4. Verify the docker-0 bridge address sudo ifconfig ... docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.50.0.1 netmask 255.255.0.0 broadcast 10.50.255.255 inet6 fe80::42:46ff:fe18:add5 prefixlen 64 scopeid 0x20<link> ether 02:42:46:18:ad:d5 txqueuelen 0 (Ethernet) RX packets 14697564 bytes 5943503139 (5.5 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15379709 bytes 6846099156 (6.3 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ... At this point, the default network segment of Docker has been modified. You can check whether the IP of the previous container has been modified.
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of vue3 cache page keep-alive and unified routing processing
>>: Getting Started: A brief introduction to HTML's basic tags and attributes
1. SHOW PROCESSLIST command SHOW PROCESSLIST show...
Previous This is a classic old question. Since a ...
SVN service backup steps 1. Prepare the source se...
1. There are two ways to modify global variables ...
The decompressed version of MYSQL is installed 1:...
Table of contents Installing the SDK Managing loc...
Table of contents introduction Cookie What are Co...
This article mainly introduces an example of Vue ...
nginx traffic control Rate-limiting is a very use...
Preface This article introduces the installation ...
Kubernetes is the leader in the container orchest...
The <canvas> element is designed for client...
Regarding the issue that JavaScript strict mode d...
Note: I use Centos to install docker Step 1: Inst...
This article shares with you the tutorial of inst...