Australia defeated Denmark 1-0 and clinched second place in Group D.
The 31-year-old reeled away in celebration holding up his hands in the shape of the letter 'J' for his son Jaxson as his teammates embraced him near the corner flag.
Duk scored from a counter-attack when he got on the end of Craig Goodwin's cross and directed a glancing header past the goalkeeper.
Christian Eriksen's return to a big tournament was the highlight of the match.
The Arab nation is in a difficult group that also contains France and Australia.
Algeria beat hosts Qatar 2-1 in a dramatic second semifinal to set up a title clash with neighbours Tunisia.
Jabeur defeated Estonian Anett Kontaveit 7-5, 6-3 in their Indian Wells quarterfinal.
Ahmed Hafnaoui struck gold in men's 400m freestyle while the hosts celebrated a surprise gold for Yui Ohashi in the women's 400m medley.
The 30th seed displayed her trademark court craft to undermine Sabalenka's power as she surpassed her previous best third round showing at Roland Garros in 2017.
Ben Ali, who ruled his North African country from 1987 until 2011, was viewed by some as a bulwark against Islamist extremism.