The workers were constructing a toilet at a school next to the temple in Faridpur’s Madhukhali Upazila
The fire service said no casualties were reported from the incident which took place early on Thursday morning at the 'Banshbarhi Slum' in the capital's Mohammadpur area.
Flames erupted at the slum around 3:30am, said Fire Service Control Room official Palash Modak.
It took 13 fire-fighting units almost two and a half hours to put out the fire, he told bdnews24.com.
The cause of the fire is yet to be known. Locals said more than 100 shanties were completely gutted in the fire.
Another fire was been reported in Dhaka early on Thursday.
The 'Hotel New Star' at Farmgate caught fire around 6:30am, said fire service official Modak. "Flames erupted from the garbage piled up at the hotel's staircase. It was put out immediately."