GetDockerIP returns either the default Docker IP address (127.0.0.1) or the value as configured by Docker host (if it is a tcp:// URL)
()
| 132 | // GetDockerIP returns either the default Docker IP address (127.0.0.1) |
| 133 | // or the value as configured by Docker host (if it is a tcp:// URL) |
| 134 | func GetDockerIP() (string, error) { |
| 135 | dm, err := getDockerManagerInstance() |
| 136 | if err != nil { |
| 137 | return "", err |
| 138 | } |
| 139 | return dm.hostIP, dm.hostIPErr |
| 140 | } |
| 141 | |
| 142 | // IsRemoteDockerHost returns true if the Docker host IP is not a local address, |
| 143 | // indicating that Docker is running on a remote machine. |