Ormsby pleaded guilty to charges of rioting and assault with intent to injure and was sentenced by Judge John McDonald to four months of home detention.
Before sentencing Judge McDonald watched a video footage of the riot, taken by an officer on the scene, multiple times.
"You came up from behind the detective as he was looking out towards where a majority of the persons are in the street. You struck him in the back of the head. This was a cowardly attack to the head of the detective sergeant," Judge McDonald said.
"This was an attack to his head, he was a public official, a police officer, you knew that. I must impose a sentence which will deter and denounce people who have a go at the police for just doing their job to protect us all."
Lawyer Julie Young said Ormsby realised he had reacted in an unreasonable manner to the stabbing of a family member and he was genuinely remorseful.
For the Crown, Bernadette O'Connor said the attack was on a police officer while he was working and it was lucky the injuries were not more serious.
Ormsby was given a 20 per cent discount for a relatively early plea and a reduction for the time he had spent on curfew.
"What occurred in William Jones Drive was appalling. You and the others there got your dander up and became very, very angry and it all came to a head," Judge McDonald said.
"I hope Mr Ormsby that no judge sees you back. It's in no one's interest that you keep coming back to this place."
Three others involved in the riot were also sentenced — Kalani Petera, 21, Shaquille Orsmby, 20, and Poasa Rankin, 24.
The three man were sentenced to three months' community detention.
There are still six others charged with rioting that are going through the court process.