Skip to content

Conversation

@lalyos
Copy link
Contributor

@lalyos lalyos commented Jan 30, 2016

Reverse lookups shoud probably resolve to the hostname, where the domain is included.

@lalyos
Copy link
Contributor Author

lalyos commented Feb 19, 2016

You can test this PR applied to resolvable as lalyos/resolvable:fqdn-ptr

$ docker run -d \
    --hostname resolvable \
    -v /var/run/docker.sock:/tmp/docker.sock \
    -v /etc/resolv.conf:/tmp/resolv.conf \
    lalyos/resolvable:fqdn-ptr

and than start a fqdn container:

$ docker run -it --hostname=myhost.example.com  gliderlabs/alpine:3.3 sh                                                                                       
# apk add -U bind-tools

# dig +short myhost.example.com
172.17.0.3

# dig +short -x 172.17.0.3
myhost.example.com.

@tilgovi
Copy link

tilgovi commented Feb 19, 2016

Only question I have is whether it's possible that the container domain name is empty, and then does the trailing . break anything?

Other than that, seems fine to me, although I admit I don't understand why this makes PTR work :).

@lalyos
Copy link
Contributor Author

lalyos commented Feb 20, 2016

reverse lookups (PTR records) is already working, it just resoles to the short name. This PR is
about resolving reverse lookups to fqdn instead of short hostname.

So right nowit works like this:

# dig +short myhost
172.17.0.3

# dig +short -x 172.17.0.3
myhost.

The trailing dot is actually how PTR-s are working, so it doesnt break anything.

@tilgovi
Copy link

tilgovi commented Feb 23, 2016

This works great for me. Tested with --name (the .docker alias works unchanged) and --hostname with short and fqdn.

@tilgovi
Copy link

tilgovi commented Feb 23, 2016

@progrium?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants