My friend told the story of an ex soldier who rode. Got chased by the same dog. Several nips at the heel, and other acts that were highly dangerous. Had yelling confrontations with the owner, who refused to do anything. Told the owner "The next time that dog chases me I'm going to kill it. Got a two letter response ending in "u". Sure enough, the next ride the dog chased him, the rider pulls his Beretta 9mm out of his bike bag and puts a round into the pooch's forehead.
The friend that told me the story averred that when the cop showed up, the owner was fulminating, but the biker just told the cop "If the owner apologizes, I won't press charges". The cop was sympathetic and agreed.
But this was Texas, more than 20 years ago. Back to reality as we know it today. I'd get and use the pepper spray. Negative operant conditioning.