I came across this question, which seeks the optimal method for storing whole beans. In that same vein, I'd like to know the best way to store ground coffee to preserve freshness. Should ambient temperature and humidity be considered?
In general, it's best to not store ground coffee. If quality really matters, then the real answer is to back up. Try to grind only enough coffee for what you're using immediately to brew with. If you're buying preground coffee, then storage and optimal quality become somewhat trivial.
Once the surface area of the coffee is increased (by grinding it), the majority of the coffee is exposed to air, accelerates the decomposition of the coffee, meaning it likely isn't going to stay fresh for long anyway. Think of it like opening a dry, red wine. Since it's been opened, it's going to turn faster than it being left in the bottle because it's been exposed to atmosphere.
So in short, if flavor and freshness really matter, try not to store ground coffee if at all possible.
If you really must store ground coffee, keep it sealed airtight. The exposure to atmosphere is going to be the strongest catalyst in making your coffee less than fresh.
To answer the exact question asked, I use one of these Starbucks cookie jars where the coffee has been purchased in a ground state. It seals well, is easily transportable and looks good as a bonus.
The other answers are correct, you're never going to get to keep that "just ground smell/taste" for very long (i.e. it won't "preserve freshness" for very long because no storage method really will), but this is what works for me with ground coffee for as long as you could reasonably expect.