|
|
@ -774,6 +774,24 @@ get_running_containers_for_service() { |
|
|
|
export -f get_running_containers_for_service |
|
|
|
|
|
|
|
|
|
|
|
get_container_network_ips() { |
|
|
|
local container="$1" |
|
|
|
docker inspect "$container" \ |
|
|
|
--format='{{range $key, $val :=.NetworkSettings.Networks}}{{$key}}{{"\x00"}}{{$val.IPAddress}}{{"\x00"}}{{end}}' |
|
|
|
} |
|
|
|
export -f get_container_network_ips |
|
|
|
|
|
|
|
|
|
|
|
get_container_network_ip() { |
|
|
|
local container="$1" |
|
|
|
while read-0 network ip; do |
|
|
|
printf "%s\0" "$network" "$ip" |
|
|
|
break |
|
|
|
done < <(get_container_network_ips "$container") |
|
|
|
} |
|
|
|
export -f get_container_network_ip |
|
|
|
|
|
|
|
|
|
|
|
## |
|
|
|
## Internal Process |
|
|
|
## |
|
|
|