It has a literal and specialized meaning in animal husbandry and breeding. To "dock" an animal means to cut off a part of the animal's tail. That's the original meaning, although people not involved with animals may not know it.
Thus, by extension, to "dock" someone's pay is to cut off a part of it.
In the United States, some dog breeds, such as boxers, are traditionally docked. Some people think this is cruel, the American Veterinary Association opposes docking, but the American Kennel Club supports it. The AKC breed standard for the boxer, the standard says "The tail is set high, docked, and carried upward. An undocked tail should be severely penalized."