Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Container host resolution fails with compose 2.0 file format #5

Closed
sauliusvl opened this issue May 11, 2016 · 3 comments
Closed

Container host resolution fails with compose 2.0 file format #5

sauliusvl opened this issue May 11, 2016 · 3 comments

Comments

@sauliusvl
Copy link
Contributor

Hi,

when using the new 2.0 file format compose creates a new docker network every time, so if you do docker inspect on any of the containers you get something like this:

"NetworkSettings": {
   "Bridge": "",
   "SandboxID": "09599d0d6575a5c1790f09fca7f9a38f89421516bb48b9b9adf868bd6bd0bb80",
   "HairpinMode": false,
   "LinkLocalIPv6Address": "",
   "LinkLocalIPv6PrefixLen": 0,
   "Ports": {},
   "SandboxKey": "/var/run/docker/netns/09599d0d6575",
   "SecondaryIPAddresses": null,
   "SecondaryIPv6Addresses": null,
   "EndpointID": "",
   "Gateway": "",
   "GlobalIPv6Address": "",
   "GlobalIPv6PrefixLen": 0,
   "IPAddress": "",
   "IPPrefixLen": 0,
   "IPv6Gateway": "",
   "MacAddress": "",
   "Networks": {
       "910330_default": {
           "IPAMConfig": null,
           "Links": null,
           "Aliases": [
               "zookeeper",
               "72471c8769e1"
           ],
           "NetworkID": "9a147c09c7f873c1ded7ad8743a7cf82fec1849a0827ed0dfc6c5ca33fa12a1c",
           "EndpointID": "5ea92039c19addeb85c32d2484e7c87b896b13e48099a0a4a688c52b308aa457",
           "Gateway": "172.18.0.1",
           "IPAddress": "172.18.0.2",
           "IPPrefixLen": 16,
           "IPv6Gateway": "",
           "GlobalIPv6Address": "",
           "GlobalIPv6PrefixLen": 0,
           "MacAddress": "02:42:ac:12:00:02"
       }
   }
}

Note that Gateway is empty, so the current approach to determine the host gives an empty string.

Everything works as expected with 1.0 compose format.

Not sure what are your plans regarding 2.0, but I suppose a warning in the docs would be nice at the very least :)

@kurtkopchik
Copy link
Contributor

Hi @sauliusvl,

Thanks for the detailed write-up! Docker-Compose 2.0 came out after this plugin was released but we fully intend to support it. I published a new SNAPSHOT release that contains a fix to read the new 2.0 network information if it exists:

addSbtPlugin("com.tapad" % "sbt-docker-compose" % "1.0.4-SNAPSHOT")

Let me know if that works for you and if so I can publish a new official release.

@sauliusvl
Copy link
Contributor Author

Yes, the snapshot version works properly, waiting for the new version :)

@kurtkopchik
Copy link
Contributor

The official 1.0.5 release is now live: addSbtPlugin("com.tapad" % "sbt-docker-compose" % "1.0.5")

Closing out this issue. Please open a new one if you hit another problem. Thanks for using the plugin!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants