Skip to content

Is it possible to pass the SkyDNS/SkyDock hostnames as own hostnames into containers? #89

Open
@vitalyisaev2

Description

@vitalyisaev2

First I would like to appreciate for a very useful services that you've developed. I managed to configure name resolution between Docker containers as it was proposed here.

Currently I have an urgent need to make container know its hostname assigned by SkyDNS.
When we launch a container inside Docker environment with SkyDNS+SkyDock enabled, it can be accessed with a fqdn:

isaev@wks-isaev:~$ docker run -d --name=test nginx
b48ff6a2b2718a05d4d307db17ff22f91c31ba8eb8b9c225b2e4bad375607ad3
isaev@wks-isaev:~$ dig @172.17.42.1 test.nginx.dev.skydns.local
...
;; ANSWER SECTION:
test.nginx.dev.skydns.local. 22 IN  A   172.17.0.100

However, container doesn't know it's own hostname:

isaev@wks-isaev:~$ docker exec test hostname --fqdn
b48ff6a2b271

Can container get its own hostname from dns and use it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions