There are two requirements that must be met for opportunity attacks.
According to the Player’s Handbook:
In a fight, everyone is constantly watching for enemies to drop their guard. You can rarely move heedlessly past your foes without putting yourself in danger; doing so provokes an opportunity attack.
You can make an opportunity attack when a hostile creature that you can see moves out of your reach. To make the opportunity attack, you use your reaction to make one melee attack against the provoking creature. (PHB, pg. 195)
So, assuming you have a reaction available, to be able to make an opportunity attack, 1) a hostile creature must move out of your reach, and 2) you must be able to make a melee attack.
Melee attacks can be made via the duplicate, but there are complexities to keep in mind.
The duplicate doesn’t make weapon attacks, but the cleric can cast spells through it
(as described in the text quoted in the question). Because clerics have access to melee spell attacks (e.g. from Inflict Wounds), they are able to make melee attacks through the duplicate.
Bonus Action Spells and Reactions on Your Turn
In the rare case of using a reaction during your turn (as opposed to on someone else’s turn in a round), there is a limitation to be aware of:
A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven’t already taken a bonus action this turn. You can’t cast another spell during the same turn, except for a cantrip with a casting time of 1 action. (PHB, pg. 202)
Therefore, once you cast a bonus action spell on your turn, you may then only cast a 1-action cantrip for any spell-based opportunity attack that later happens during that turn.
Unfortunately, clerics do not (as of yet) get access to any cantrips that are melee spell attacks, so a cleric with no cantrips from other sources (such as multiclassing or the Magic Initiate feat) has no ability to make spell-based opportunity attacks during their turn if they have already cast a bonus action spell.
The War Caster Feat
The limitation to melee attacks becomes irrelevant if the cleric has the War Caster feat. With it, certain spells that are not melee attacks may be used in place of a standard opportunity attack:
When a hostile creature’s movement provokes an opportunity attack from you, you can use your reaction to cast a spell at the creature, rather than making an opportunity attack. The spell must have a casting time of 1 action and must target only that creature. (PHB, pg. 170)
Although this replaces an opportunity attack rather than altering it, that difference is largely semantic.
The Bottom Line
The cleric is capable of casting spells through their duplicate that would be eligible to be used as opportunity attacks.
The interpretation of reach is critical.
Having confirmed that the cleric can make eligible attacks through the duplicate, we’re left with the question of reach.
Reach is described as follows:
Most creatures have a 5-foot reach and can thus attack targets within 5 feet of them when making a melee attack. Certain creatures (typically those larger than Medium) have melee attacks with a greater reach than 5 feet, as noted in their descriptions. (PHB, pg. 195)
I see two possible interpretations of reach regarding the duplicate:
Extended Reach – Because the illusory duplicate allows the cleric to cast spells “as though (they) were in the illusion’s space,” that duplicate expands the cleric’s reach to also include the five feet around it. This is no different than how wielding a glaive expands a character’s reach from 5 feet to 10 feet. As such, a creature leaving the “reach of the duplicate” (which is actually the extended reach of the cleric) would trigger an opportunity attack.
Personal Reach – The description of opportunity attacks mentions that they’re caused by “everyone constantly watching for enemies to drop their guard.” However, the illusory duplicate is unable to watch for anything, and the cleric doesn’t perceive anything from the duplicate’s perspective. Instead, the cleric must “use (their) own senses.” Because the cleric doesn’t have the same personal awareness of the space around their duplicate that they do of the space around their own physical body, an enemy moving out of what would be the duplicate’s reach cannot trigger an opportunity attack from the more distant cleric.
Each DM will have to decide which interpretation they prefer.