mirror of https://github.com/docker/docker-py.git
Handle tcp:// URLs
This means docker-py will do the Right Thing if the base url is set using the new `DOCKER_HOST` environment variable, for example. (http://docs.docker.io/en/latest/commandline/cli/)
This commit is contained in:
parent
2ac5cca84d
commit
96932fc1cb
|
@ -70,6 +70,8 @@ class Client(requests.Session):
|
|||
super(Client, self).__init__()
|
||||
if base_url.startswith('unix:///'):
|
||||
base_url = base_url.replace('unix:/', 'unix:')
|
||||
if base_url.startswith('tcp:'):
|
||||
base_url = base_url.replace('tcp:', 'http:')
|
||||
if base_url.endswith('/'):
|
||||
base_url = base_url[:-1]
|
||||
self.base_url = base_url
|
||||
|
|
Loading…
Reference in New Issue