Gerard Norton (38) attacked the man who was out walking his dog near his Dublin home at the time.
Judge David McHugh said he could avoid prison if he carries out community service, and adjourned the case for a suitability report.
Norton, a father of five from Glenfield Drive, Clondalkin pleaded guilty to assault, threatening, abusive and insulting behaviour and having an uncontrolled dog at Glenfield Close.
Garda Sergeant Maria Callaghan said the victim took his dog for a walk on its lead on January 31 and as soon as he left his property, a white dog, which was not on a lead, ran towards him.
He recognised the dog as Norton’s, the court heard.
The accused happened to be in his own front garden and the victim told him: “The dog should be on a leash.”
Norton approached him in an aggressive manner and punched him a number of times in the head and throat, Sgt Callaghan said.
The injured party returned to his house and called the gardaí, who spoke to him and saw that his nose was bleeding and there was swelling around his left eye, the court heard.
There was “some element of a neighbours’ dispute” and Norton had his own complaint before the gardaí, defence solicitor Michael Kelleher said.
“This was a night when a lot of things had been building up, he lost control and deeply regrets what happened.”
“Whatever the lead-up, there was no justification. He accepts he was out of order.”
Norton had been in the defence forces for 19 years with an exemplary record.
He had €500 to offer as compensation.
Judge McHugh said the assault was “vicious” and recommended 200 hours of community service instead of a four-month sentence.