Joseph Martin, a father of four from Park Place, Islandbridge, pleaded guilty to assault and threatening, abusive and insulting behaviour
Joseph Martin (53) said he "didn't go down there looking for trouble" but "got caught in the middle of it".
Judge Patricia Cronin said his behaviour had been unacceptable and adjourned the case for the production of a probation report.
Martin, a father of four from Park Place, Islandbridge, pleaded guilty to assault and threatening, abusive and insulting behaviour.
Dublin District Court heard gardaí responded to a reported public order incident in Eurospar at Hanover Street East on July 27, 2019.
Staff said two men entered the shop and became abusive to the staff. Both men attacked a security guard by punching him repeatedly, the court heard.
Gardaí viewed CCTV and identified one of the assailants. While on patrol they saw the second man - Martin - who was also seen punching the victim and shouting at staff.
He was arrested and taken to Pearse Street garda station.
Martin wished to convey a "sincere and heartfelt" apology for the incident, his lawyer said.
He realised it was "totally unacceptable for someone going about their daily business working in a shop to be treated in this manner".
Martin had been a "somewhat more junior member in the attack", the court heard. He had some "historical drug abuse" but was now clean and sober for 20 years.
He had very good family and community support. Martin was embarrassed and apologetic, his solicitor added.
The accused had previous convictions dating back a number of years for offences including possession of drugs.
"It's unacceptable behaviour to go into any shop acting like that," the judge said.
"I didn't go down there looking for trouble," Martin said. "It just kicked off and I got caught in the middle of it."