Update /etc/hosts when linked container is restarted

Fix #6350


yes it has to be fixed in another PR