Providing 3 images for the first tile of the dock for each of the 4 rotations is probably the way to go I think. Some of these could be optional to disable building on that slope type.

At the moment for docks dat entries are:

BackImage[rotation][ x ][y][height][animation][season]

number of rotations can be either 4 or 16 to give docks with graphics dependent on neighbours. x (I think maybe y) controls how many tiles a pier extends into the water. y is unused. height and animation may be used by various paks

What I would suggest would be to have 4, 8, 12, 16, 32 or 48 rotations for each dock. I don't suggest to use y because this would complicate hausbauer.

4 or 16 rotations would only allow docks to start on single height slopes

8 or 32 rotations would allow docks to start on single or double height slopes

12 or 48 rotations would allow docks to start on flat tiles, or single or double height slopes

While 12 or 48 rotations sounds like a lot, graphics for tiles other than the start would be identical for different slopes most likely, and the graphics for flat/single/double slopes would likely be very similar.