A fox will attack anything if it is backed into a corner and feels threatened. A country fox would be very unlikely to attack a dog. A town fox might attack a cat (I have known a cat lose it`s tail to an attacking fox) but it would be unusual for it to attack a dog.
How big is the dog?
They would be more likely to go for something smaller than themselves but would fight to defend their young or if driven to desperation by hunger.
The question is neither place nor time specific.
A vixen can bear cubs as late as May and they will stay with her through the summer until late August/September time.
Just opinion, but I don't see why any fox would choose fight over flight unless there was a good reason. Why risk damage unless there seemed little option ? I'd doubt it'd be defending home territory, but I guess a dog could be the aggressor.