A drydock is a facility equipped to build, upgrade and refit naval ships, starships and other water- and space-faring craft.
A space-based drydock normally independently orbits a planet or is part of a starbase or space station, although some may be based in an asteroid or other stellar body. (Star Trek: The Motion Picture; Star Trek Generations; ENT: "In a Mirror, Darkly") Some facilities, like at Utopia Planitia Fleet Yards in orbit of Mars, consist of a group of drydocks in one area. (VOY: "Relativity")
The USS Enterprise (NCC-1701) underwent a major refit in the 2270s at the San Francisco Fleet Yards in Earth's orbit. (Star Trek: The Motion Picture)
In 2367, McKinley Station, also in Earth's orbit, facilitated repairs on the USS Enterprise-D after its skirmish with the Borg. (TNG: "Family")