Callum Manley, 29, of Eakring Road, Mansfield, admitted two counts of assault when he appeared before magistrates on Wednesday.
Ruth Snodin, prosecuting, said: “Police were called to the Widow Frost pub on the evening of June 16 after reports of a man being abusive.
“He was extremely drunk and staggering, with glazed eyes and a wet patch at his groin.
“He refused to leave the area and when officers tried to put him in the police van, he head butted Sergeant Wayne Turner.”
The officer suffered ‘blinding pain’ and was taken to King’s Mill Hospital, she said.
When Manley was being searched at Mansfield Police Station he kneed detention officer Mick Ward in the stomach.
The court heard he had previous convictions for a public order offence and being drunk and disorderly in 2006 and 2007.
Melanie Hoffman, mitigating, said: “He doesn’t normally drink and had consumed a lot more alcohol then he was used to.
“He tells me he can’t believe he has acted in this way. He is devastated to be appearing before the court.
“He has written to the officers he assaulted to apologise.”
The court heard Manley joined the army after leaving school and received a medical discharge. He rejoined the army and had an ‘exemplary service’ record.
Ms Hoffman said Manley worked as a street cleaner for the council.
He had been training for the last 18 months to be a driving instructor and was due to sit his final exams.
He was sentenced to 16 weeks in prison, suspended for 12 months.
A 12-month community order was imposed and he was ordered to carry out 180 hours of unpaid work.
Magistrates in Mansfield ordered him to pay the officers £150 in compensation, as well as costs of £85 and a £115 victim surcharge.