Update /etc/hosts when linked container is restarted

Fix #6350


Hoho! You'll find some defers on rebase :)