Closed mhubig closed 9 years ago
this is already implemented
use hostname: yourhostname in your fig.yml like this :
c1: image: dguenault/shinken-central:1.4.4 name: c1 hostname: c1
this will result into your container in :
-bash-4.1# hostname c1 -bash-4.1# cat /etc/hosts 172.17.0.21 c1 ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet
Thanks missed that one!
EDIT: I use https://github.com/crosbymichael/skydns and https://github.com/crosbymichael/skydock now ...
so am i but the question was really centered on hostname so .....
Currently when I start a container with fig the /etc/hosts file typically looks like this (with
172.17.0.61
as the IP-Address of the current container):It would be nice if there where the same predictable entries for the current container like the ones for the linked
database
container ... e.g.:EDIT: And maybe also set the hostname to the service name instead of the container id ...