Change hostname of an existing container

I found a very simple way of achieving this. Install kitematic. This tools allows you to change the hostname - it will restart - after restarting it will be the newly applied hostname.