HOSTNAME variable not working in docker

even after I am setting HOSTNAME=xyz.domain it is not working rather it is requesting to the google cloud with https://localhost/logged-in as uri. Whats the reason?