Six gardai were needed to restrain a highly abusive and drunken man after he was taken to a garda station.
Jonathan Bollard (44) was "clenching his fists" at officers and shouting at them.
The defendant, of Brega, Hamlet Lane, Balbriggan, admitted a string of public order offences.
Judge Dermot Dempsey adjourned sentencing until January, warning Bollard he faced jail if he came to garda attention over Christmas.
Garda David Woods told Swords District Court he was called to Ringfort Close, Balrothery, on September 7 following reports of a highly abusive male.
Gda Woods said Bollard was directed to leave but failed to do so. He was taken to Balbriggan Garda Station, where he was highly abusive, and six gardai were needed to restrain him.
Garda Stephen O'Toole said Bollard again became abusive to gardai on December 8 after he was removed from a house at Brega. He was taken to Balbriggan station and kicked out when he was searched.
Solicitor Fiona D'Arcy said Bollard was a chronic alcoholic.
She said the father-of-two had been doing well, attending Alcoholics Anonymous and volunteering in a soup kitchen.
However, his aunt then died and his partner, who also had alcohol problems, slipped and he suddenly found himself around alcohol, and the temptation was too great.
Bollard asked the judge not to jail him, saying he was moving into a dry house and was focusing on staying sober.