Browse Source

Merge pull request #7745 from LK4D4/fix_docker_host_panic

Fix panic for DOCKER_HOST without ://
Michael Crosby 11 years ago
parent
commit
b458dd1dfb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      docker/docker.go

+ 2 - 1
docker/docker.go

@@ -44,7 +44,8 @@ func main() {
 			// If we do not have a host, default to unix socket
 			defaultHost = fmt.Sprintf("unix://%s", api.DEFAULTUNIXSOCKET)
 		}
-		if _, err := api.ValidateHost(defaultHost); err != nil {
+		defaultHost, err := api.ValidateHost(defaultHost)
+		if err != nil {
 			log.Fatal(err)
 		}
 		flHosts = append(flHosts, defaultHost)