mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Switch order of connection logic so TCP is tried first
This commit is contained in:
parent
a3d024e11d
commit
d4000e07a9
@ -93,9 +93,6 @@ def docker_url():
|
||||
tcp_host = '127.0.0.1'
|
||||
tcp_port = 4243
|
||||
|
||||
if os.path.exists(socket_path):
|
||||
return 'unix://%s' % socket_path
|
||||
|
||||
for host, port in tcp_hosts:
|
||||
try:
|
||||
s = socket.create_connection((host, port), timeout=1)
|
||||
@ -104,6 +101,9 @@ def docker_url():
|
||||
except:
|
||||
pass
|
||||
|
||||
if os.path.exists(socket_path):
|
||||
return 'unix://%s' % socket_path
|
||||
|
||||
raise UserError("""
|
||||
Couldn't find Docker daemon - tried:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user