Update article
This commit is contained in:
parent
30b02e6084
commit
dab7a7d0f8
@ -227,7 +227,7 @@ echo "No available IP addresses found in the subnet of network '$network_name'."
|
|||||||
exit 1
|
exit 1
|
||||||
```
|
```
|
||||||
|
|
||||||
This script checks if exactly one argument (a network name) is provided, and if not, it displays usage instructions and exits. It retrieves the subnet of the specified Docker network, checks if the network exists and has an assigned subnet, and extracts the subnet prefix (e.g., 172.18.0). The script then loops through possible IP addresses within the subnet range, checking if each is available by attempting to ping it. If an available IP is found, it prints the IP and exits. If no available IP is found, it notifies the user and exits.
|
This script checks if exactly one argument (a network name) is provided, and if not, it displays usage instructions and exits. It retrieves the subnet of the specified Docker network, checks if the network exists and has an assigned subnet, and extracts the subnet prefix (e.g., 172.18.0). The script then loops through possible IP addresses within the subnet range, checking if each is available by attempting to ping it. If an available IP is found, it prints the IP and exits. If no available IP is found, it notifies the system and exits.
|
||||||
|
|
||||||
#### Operating System Selection
|
#### Operating System Selection
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user