When I was young, a way long time ago, there was this old man who fished Buckeye Lake in Ohio and caught more bass than anyone I knew at the time. He was fishing boat docks. His lures were all beat up, most of them missing paint and some were even bare wood from hitting them on the docks so many times.
Boat docks produce shade and bass feel secure in low light areas. Docks also provide a place for bass to ambush their prey. Sometimes when you see rod holders and lights at a dock there's a chance there's some kind of structure there too. Maybe a brushpile or rocks that the owner has produced. Use your trolling motor to get close to the dock or just drift up to it and flip or pitch your lure.
Some good lures for fishing docks are a jig, worm, crankbait and spinnerbait. Of course, you want to throw as far back under the dock as you can but make sure on the retrieve that the lure bumps the dock's post as it goes by them. The erratic behavior of the lure sometimes products a strike. If you're using a crankbait, you can bend the eye and make it run under the dock. While the lure doesn't run true it does get farther under the dock where the fish are.
Now they have a lure called a _coffin bill lure that is ideal for fishing docks. Docks are one of my most favorite places to fish and apparently the bass like them too.