Klingons have and use starbases just like the Federation. It's just that they haven't appeared on screen in the shows or movies. There are several mentions of Klingon starbases in Deep Space Nine, which also give an example of a non-starbase dock for starships (the station itself is Cardassian, run by the Federation, and virtually every kind of ship known was seen to dock there at some point). It's reasonable to presume that Romulans also maintain starbases although no direct mention is made of them.
And just to geek out completely, a space dock and a starbase aren't the same thing. A space dock is the starship equivalent to a dry dock, and is specifically for repairing ships, where a starbase is a space station. For example, the Utopia Planitia Fleet Yards on and near Mars comprises several space docks and space stations, in addition to the ground facilities.