The image says it all… Just cover any container of vinegar (apple cider vinegar used here). Cover with plastic wrap and stab it a few times with a small knife of fork.
Humane Trap: The fruit flies can live in a social orgy and while they may not escape, they can still live out some semblance of life in there. I even add fruit for them to land on.
This trap can be made from empty cans and garbage… There is no excuse for having fruit flies in your home. Keep a trap like this going all year long. Atop the cupboards or out of sight.