According to <https://docs.docker.com/userguide/dockerlinks/>, I can do the following:

```
$ sudo docker run -t -i --rm --link db:db training/webapp /bin/bash
root@aed84ee21bde:/opt/webapp# cat /etc/hosts

```

And there will be two entries in the /etc/hosts file for my link which I named `db`: 

```
172.17.0.7  aed84ee21bde
. . .
172.17.0.5  db

```

However, when I run that, I only end up with a hosts file entry for the id and not the name.

Here is what I am trying:

```
$ sudo docker run -d --name ghost dockerfile/ghost
$ sudo docker run -d --name nginx -p 80:80 --link ghost:ghost dockerfile/nginx

```

This should give me two entries in `/etc/hosts` of the container I named nginx. However, when I run `$ sudo cat `docker inspect --format '{{.HostsPath}}' nginx`` all I get back is this:

```
172.17.0.2  da1afa360504

127.0.0.1   localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters

```

Shouldn't I be seeing an entry like `172.17.0.2 ghost` in there? 

As far as I understand it, I am doing everything correctly. Is there something I am missing?