gradle-docker-compose-plugin icon indicating copy to clipboard operation
gradle-docker-compose-plugin copied to clipboard

Compose-up waits forever if DOCKER_HOST maps the local socket

Open emilkaae opened this issue 9 years ago • 4 comments

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

emilkaae avatar May 04 '17 20:05 emilkaae

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)

augi avatar May 04 '17 20:05 augi

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 :-)

emilkaae avatar May 04 '17 21:05 emilkaae

I made a small improvement that should solve also your issue. It's released as 0.3.25.

augi avatar May 05 '17 15:05 augi

Btw. I had a similar issue when I upgraded from "Docker Toolbox" to "Docker for Windows" (I also had to remove the environment variables).

augi avatar May 05 '17 15:05 augi