Handle docker running on localhost.
This commit is contained in:
parent
21b65e61af
commit
e3b51de6b1
|
@ -56,6 +56,9 @@ class DockerizedSshDaemon(object):
|
|||
self.host = self.get_host()
|
||||
|
||||
def get_host(self):
|
||||
if self.docker.api.base_url == 'http+docker://localunixsocket':
|
||||
return 'localhost'
|
||||
|
||||
parsed = urlparse.urlparse(self.docker.api.base_url)
|
||||
return parsed.netloc.partition(':')[0]
|
||||
|
||||
|
|
Loading…
Reference in New Issue