I do not use ultrasonic cleaner at home, only at work, and I highly prefer glass to plastic: glass is much better conductor of vibrations.
Agreed, but unless that shot glass is made to endure ultrasonic vibrations, it could crack in the tank. Then you have to fish your parts out of a tank with broken glass in it. I said plastic because a shot glass was specifically mentioned and most shot glasses aren't built with laboratory specs in mind. If you have access to a lab or engineering grade glass container, by all means, use it.
Alternately, if you're concerned with potential ignition, just use a diluted mix (50 percent or 100 proof) of the grain alcohol or get some 100 proof vodka and use it straight. Honestly, even grain alcohol isn't likely to ignite in a commercial grade cleaner, particularly the smaller ones that this community is likely to use. Only an industrial grade ultrasonic cleaner generates really intense heat... and even then, it's only enough to really boil water or maybe slightly hotter... nowhere close to hot enough to ignite ethanol. Pure ethanol (that evil Spirytus vodka I mentioned and Everclear effectively fall in this category) ignites at 689 degrees F or 365 degrees C... most residential grade ovens don't get that hot. 150 proof vodka has a higher ignition point than that... unless your cleaner itself catches fire, it won't ignite the alcohol. I personally just pour Spirytus right into my small cleaner... easy to find and pretty cheap. Some of it evaporates in the tank and condenses back down... at the end of the day, I lose about 10% to evaporation during cleaning. Give the parts a quick ethanol rinse after the cleaning to get any potential debris floating around in the alcohol you used in the tank. Works great and evaporates quickly afterward... maybe an hour or two.