My dog barks at everything outside
Remove the visual.
Close blinds or use frosted window film. Dogs bark at what they see. Teach 'Quiet' by rewarding silence after a bark.
Boredom
Often barking is just boredom. Increase exercise and mental stimulation.