Update /etc/hosts when linked container is restarted

Fix #6350


changing `sleep` to `top` make the test fail