Compose-up waits forever if DOCKER_HOST maps the local socket
Hi,
It appears I am stuck in an endless wait on Mac if I have set the DOCKER_HOST environment variable to unix:///var/run/docker.dock.
My guess is that the getServiceHost function tries to get the hostname from the "URL" and yields null. The console output says:
Waiting for TCP socket on null:1234 of service 'foo' (Ambiguous method overloading for method java.net.Socket#<init>.
Cannot resolve which method to invoke for [null, class java.lang.Integer] due to overlapping prototypes between:
[class java.lang.String, int]
[class java.net.InetAddress, int])
Unsetting DOCKER_HOST seems to resolve the issue.
Best regards, Emil
Hi, agree - the behavior you're describing is in the getServiceHost method.
Why do you set DOCKER_HOST on Mac? (I don't have Mac so I don't know your use-case)
Wow, quick response!
Brilliant question. I believe it may be leftovers from an earlier installation of "Docker Toolbox". It has since been superseded by "Docker for Mac". The installation instructions for "Docker for Mac" does actually instruct me to unset those variables. I guess the only reason to keep them is if one needs tools or utilities from "Docker Toolbox" that relies on them.
For me, that is not an issue. I can unset the variable and get on with things. I'll leave it to you to decide if the issue should be closed :-)
I made a small improvement that should solve also your issue. It's released as 0.3.25.
Btw. I had a similar issue when I upgraded from "Docker Toolbox" to "Docker for Windows" (I also had to remove the environment variables).