If you run a real kitchen that prepares and houses real foods, battling fruit flies is inevitable. We keep fresh fruits on the counter and have a compost pail near the sink, and the fruit flies love us for it. Last year, I made little traps with apple cider vinegar, but for some reason the ACV just wasn't doing the trick this year, so I had to bring in the big guns.
Into my teensiest size of mason jar, I pour a little bit of white wine (just a bit, don't waste it!) then top it with just a couple drops of dish soap. Give it a swirl with your finger to mix it in slightly and leave it in a fruit-fly-infested area. The sweet wine is the lure, and the soap serves to weigh down the flies' wings and trap them.
I actually set two identical traps, side by side. I made one with the ACV and the other with the wine (Don't you just love a good experiment?). By morning, the ACV trap had two flies in it. Meanwhile, the white-wine-filled one looked like this. . .
Wow! Looks like I'll be having to keep white wine on hand!