David Johnson, 27, pleaded guilty to assaulting two constables in the execution of their duties when officers visited his house in Ramsbottom Street, following reports of a domestic disturbance at 11pm on November 30 2013.
Prosecuting, Debbie Byrne, said: “The front door was locked. They tried opening a window before entering via the back door, which was unlocked.
“They entered the living room, where the defendant was asleep on the sofa.
“They roused him and he immediately became aggressive, telling them to get out of his house.”
While stood at the top of the stairs, Johnson kicked PC David Bufton in the chest before punching him in the head.
Johnson was pepper sprayed and in the ensuing fracas, PC John Roberts received wrist injuries.
He was arrested and taken to Middlewich custody suite, where he was later interviewed.
Johnson said he had been attending a works do earlier in the day and had been drinking.
The court heard that Johnson struggled to curb his alcohol intake and also smoked cannabis.
He was already subject to unpaid community work following excess alcohol and criminal damage offences in July.
Johnson was ordered to complete a total of 278 hours unpaid work, undertake a twelve month supervision course with drug and alcohol misuse requirements, pay £150 in compensation to his victims and £145 court costs.