Have a coffee grinder that drops the ground coffee into a glass container? Does the ground coffee stick due to static electricity causing it to fly everywhere when you try to dump it into another container?

Grind your beans, then rub the outside of the glass container with a dryer sheet.