Open nickdoikov opened 7 years ago
Also, it seems that we can't rely on HOSTNAME env var set by compose during docker-compose up, since it's not exposed via docker inspect api.
in this case we use Gobetween container as a part of linked containers infrastructure. Hostnames should be available from inside containers. https://docs.docker.com/compose/compose-file/#links
how's this going? I'm trying gobetween but as this is missing it broke my legs :(
@WoLfulus please describe your case.
I couldn't make docker work at all. The IP addresses on /stats API always seems to be empty and port 0. Seems like it's not getting the proper host info at all to correctly make the connection.
In resume, I have a compose file which defines several services and networks, one of the services is gobetween with docker.sock mounted.
gobetween couldn't detect the ip and ports on the services (I had to expose the port, but IP is still empty).
Also, there's no way to define weight and stuff in docker: my suggestion is to define several labels (like gobetween.service.weight and maybe override its them in configs)
Note: I'm not in swarm mode.
BTW: I forked gobetween to try "fixing" it, and I made it get the proper IP address/port, but I couldn't continue working on it anymore. But I don't think it's the best way to retrieve it because there could be more networks in a container.
according to a #46 need to add such functionality.
We need to add mechanism for discovery linked containers this is a common use case for developers , regular users etc.. I will add more info here later