Ian Rigley was drunk when he hailed the taxi on Leeming Street, with his partner, on July 23, last year, said prosecutor Andrew Conboy.
He was warned not to eat the takeaway food he had brought, but at some stage the 36-year-old spilled some of it on the back seat.
Stopping outside the One Stop store on Westfield Lane, the driver told him there was a £60 soiling charge.
Rigley tried to wipe the mess up with tissues, but when the driver told him it needed soap and water, he threatened ‘to knock his teeth out of his face.’
He loomed over the driver and forced him into a crouching position, before punching him in the back of his head.
A member of staff from the shop tried to intervene and overheard Rigley using more racist insults.
Mr Conboy asked for £300 towards the total £620 cost of preparing the case for a trial.
The court heard the defendant was jailed for 180 days in 2008 for a racially-aggravated assault, and there had been a 'recent spate of offending.'
Abbie Edwards, mitigating, said: "There is no excuse for his behaviour."
But she said there was a large gap in his offending between 2014 and last year, when ‘he managed to sort his life out’ by finding work.
Rigley lost his job as a builder's labourer during the pandemic, Ms Edwards said, and his long-term partner suffered a miscarriage.
"The couple turned to alcohol to mask their pain," she said. “Since 2014 he has been able to show the court that he doesn’t want to go down that road.”
Rigley, of Queensway, Forest Town, initially denied racially aggravated harassment and racially aggravated assault when he appeared at Mansfield Magistrates Court, on February 8, this year. He changed his pleas to guilty before a trial on Friday.
Magistrates adjourned the case so a probation report can be prepared, and the possibility of an alcohol treatment order explored, before he is sentenced on June 9.