The pier fishes are all day, its based on random chance and luck, but like what the other poster said, you can use bait to increase the chance of pier fish.
Go fishing on mystery islands instead-- much higher rate of spawning and rare fish. You can use bait there but you really don't need to, there will be a new dock fish on one of the three sides in the time it takes to circle the beach and back
I'm not sure if this is actually true or not, but I have found that when it's raining I catch a lot more rarer fish on the pier, I also use bait which helps a lot.