Commit 228ba991 authored by duanjinfei's avatar duanjinfei

update docker server config parse

parent b3338c93
......@@ -76,9 +76,9 @@ func checkDockerServer(rawURL string) (bool, string) {
if parsedURL.Port() != "" {
port = parsedURL.Port()
}
if parsedURL.Host != "" {
ip = parsedURL.Host
if parsedURL.Hostname() != "" {
ip = parsedURL.Hostname()
}
newUrl := fmt.Sprintf("%s%s:%s", ip, protocol, port)
newUrl := fmt.Sprintf("%s://%s:%s", protocol, ip, port)
return true, newUrl
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment