Anthony McDonnell (22) spat at another officer when he was taken to a garda station after being arrested.
Judge Treasa Kelly adjourned the case at Dublin District Court for a probation report.
McDonnell, of Tallaght Cross West, pleaded guilty to assaulting two gardaí at Phoenix Manor, Blackhorse Avenue, Dublin 7.
He also admitted violent behaviour at Bridewell garda station last December 1.
Garda Sergeant Niall Murphy said officers attended the address at 3am after a call in relation to an argument.
McDonnell was there and punched one of the gardaí on the back of the head and swung a golf club at another.
He was restrained and arrested before being taken to the garda station, where he spat at another officer, the court heard.
McDonnell had no previous convictions.
The gardaí who were assaulted did not make any victim impact statements, the court heard.
It was a "very distasteful incident", but the case had been met appropriately by the accused with an extremely early guilty plea, defence solicitor Peter Connolly said.
McDonnell "deeply regretted" his actions. He had been inebriated, but accepted that was not an excuse.
It was a domestic incident in relation to another family member at his mother's house and gardaí were called, Mr Connolly said.
Things escalated over a short period of time.
The accused had been out drinking with friends earlier in the day.
He was prepared to make a charity donation.
Judge Kelly said she wanted to see a probation report before finalising the case, saying it was a serious matter.
"I'm deeply sorry about it," McDonnell told the judge, saying it was a once-off.