After adding –subnet to Docker network Create, use docker network ls to check. No driver is found on the newly created network. Use docker network inspect to view detailed information. You can see that there is no data in many places, especially driver. Without adding –subnet, everything is normal again. The exception diagram is as follows: solve Solution: At this time, you can just change the network segment of the subnet. The reason is that the network segment specified by –subnet conflicts with the network segment of a certain network. Additional knowledge: Networks in the docker-compose file use the already created network Prerequisites: Docker version: 18.06.1-ce, build e68fc7a docker-compose version: 1.22.0, build f46880fe Using an existing network Create a network using docker. The following examples are given:
Run the command to check whether the network is created successfully:
Using the created demo network, the docker-compose.xml is as follows: version: "3.7" services: cloudgo: image: cloudgo:latest container_name: cloudgo ports: - "8080:8080" logging: driver: "json-file" options: max-size: "1000k" max-file: "20" networks: demo: ipv4_address: 192.168.88.80 networks: demo: external: true The main core configuration is: networks: demo: external: true This part indicates the use of external network demo, and external is true. The core configuration for recreating the network is: networks: demo: driver: default config: subnet: 172.16.238.0/24 gateway: 172.16.238.1 demo indicates the created network suffix, the driver is set to the default value, the subnet is: 172.16.238.0/24, and the gateway is. The above is just a brief description of the validity of the above configuration under the current docker and docker-compose versions. Other versions have not been tried, and the above method may not be applicable to other versions. I hope this can provide you with a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Pay attention to the use of HTML tags in web page creation
>>: MySQL implementation of lastInfdexOf function example
Copy code The code is as follows: <body <fo...
1. Basic use <!DOCTYPE html> <html lang=...
Simple use of Vue bus Scenario description: Compo...
A few days ago, I saw a post shared by Yu Bo on G...
Change personal account password If ordinary user...
Preface add_header is a directive defined in the ...
Table of contents 1. Basic Example 2. Set the sco...
<br /> In the first and second parts, we int...
1. Use Canvas images as CSS background images The...
View container logs First, use docker run -it --r...
Introduction The mysql-utilities toolset is a col...
Screen Introduction Screen is a free software dev...
Table of contents Preface 1. First completely uni...
need Configuring DingTalk alarms in Zabbix is s...
Table of contents npm download step (1) Import (2...