Gardai spotted a motorist three times over the drink limit driving erratically, a court was told.
Declan Timmons (41) successfully battled a drug problem but substituted one addiction for another, it was said.
He was now completely sober after receiving residential treatment and an anti-alcohol implant.
Judge Paula Murphy said that before sentencing she wanted Timmons to complete the restorative justice road traffic programme.
The judge then adjourned sentencing to a date in April to allow him to complete the programme.
The defendant, from Hollyville, Old Lucan Road, Palmerstown, admitted drink-driving and possession of cannabis on the N4 at Palmerstown on August 10, 2017.
Blanchardstown District Court heard gardai on mobile patrol came across Timmons driving a Nissan Primastar van erratically in Ballyfermot Road.
He was stopped and later gave gardai a sample of his urine.
It produced a reading of 237mgs of alcohol per 100mls of urine.
The court heard Timmons had 12 previous convictions but had not been in trouble for more than a decade.
Defence solicitor Terence Hanahoe said Timmons first took drugs when he was a teenager and had battled an addiction to drugs for some years.
He said the defendant was "very hard on drugs for a long time".
However, he had managed to get off drugs but had then substituted drugs with alcohol.
Mr Hanahoe said Timmons had attended Cuan Mhuire and was still attending on a regular basis for outpatient treatment.
The solicitor said Timmons, a divorced father with a young child, was "trying his best" and had not been in trouble for some time.
His offending behaviour was all alcohol related, Mr Hanahoe said.
The defendant was unemployed, the court heard.
Mr Hanahoe asked the judge to be as lenient as possible, saying Timmons had received implants so could not go back on the drink as it would make him sick.