spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.66k stars 575 forks source link

Problem running docker on macosx with Docker for Mac #369

Closed cirix closed 6 years ago

cirix commented 6 years ago

Description

Hi guys, I am a MacOSX user, and when I want to use the plugin with the new support of Docker for Mac. The problem with this way of working is that tcp is not supported and everything happens over the unix domain socket. The problem of the plugin comes from the usage of the library docker-client you have developed. The issue is that when you sanitize the uri for the client to speak to the deamon you replace any unix:///some/socket/path/docker.sock with unix:///localhost and later one actually if the dockerHost is set actually you are checking if the unix is present and then automatically everything is returned as unix://localhost:80.

Check class UnixConnectionFactory: public static URI sanitizeUri(final URI uri) { if (uri.getScheme().equals("unix")) { return URI.create("unix://localhost:80"); } else { return uri; } }

Software:

Full backtrace

[Paste full backtrace here]
mattnworb commented 6 years ago

Could you describe what the problem is you are seeing, e.g. what you set DOCKER_HOST to and what errors (if any) you are seeing at runtime?

We have many engineers at Spotify using this plugin and Docker for Mac, so it is definitely supported and typically works out of the box with no configuration needed.

cirix commented 6 years ago

Hi, You can considered it wrong post. After the update to the new native support of MacOSX , my .bash_profile was pointing on the alod docker-machine vm.I deleted it. Can be marked as invalid.