Macaulley Hancock, aged 24, currently of HMP Lincoln, but formerly of Potter Street, Worksop, was jailed for 18 months after admitting the attack which nearly resulted in the victim losing sight in his left eye.
Police Constable Joshua Gibbons who led the investigation, said: "The victim was incredibly lucky that his injuries didn’t impact his eyesight. He was literally millimeters to possibly losing his sight in his left-eye.
"The attack was unprovoked and left a man requiring hospital treatment for what were pretty serious injuries.
"Thankfully he's now made a full recovery.
"Hopefully today’s sentence will give Hancock time to reflect on his unnecessary and disgraceful actions.
“Nottinghamshire Police will not tolerate violence of any kind so we take incidents like this very seriously and I hope this case serves as a warning to anyone who does consider being violent that officers will work tirelessly for as long as it takes to bring offenders to justice."
Nottingham Crown Court heard the victim was walking along Carlton Road when he was approached by Hancock, who became aggressive and grabbed the victim by his shoulder and pulled his face, on November 2, 2019.
Without warning or reasoning the victim was struck to the head by Hancock, causing the pint glass to smash.
The man was knocked to the floor, whilst Hancock ran away from the scene towards Worksop town centre.
The victim had blood all over his face and sustained a cut to his left-eye lid. He had to have treatment at Bassetlaw Hospital.
Investigating officers used local CCTV footage and the Hancock was identified, which matched the description given by the victim.
Nine days later Hancock was spotted by local officers whilst out on a proactive patrol. He was stopped and arrested for the offence. He was wearing the same baseball cap that he had on at the time of the incident.
The clothing was seized for forensic examination and a small mark of blood was traced on the hat.
The victim also picked out Hancock at an identification parade without hesitation as being responsible for the assault.