Green’s Dictionary of Slang

doghouse n.

1. [late 19C+] (also doghole) any small structure that seems to resemble a dog kennel.

2. an unpleasant place, irrespective of size.

3. [mid-18C–1930s] (US Und.) a prison; a solitary-confinement cell.

4. [1920s–50s] (orig. US) a double-bass; a bass-player.

5. [1930s] (US prison) a watchtower.

6. [1930s+] in fig. use, a place of disgrace or punishment; sometimes spec. of marriage; usu. as in the doghouse

7. [1940s+] (US prison) the protective custody unit in a prison.

8. [1990s+] (US campus) a romantic relationship.

In phrases

in the doghouse [SAmE doghouse, a dog kennel; i.e. in disgrace and so consigned to the dog’s kennel rather than one’s own home]

[1930s+] (orig. US) in trouble, out of favour.