Cheese in a container!? My goodness, girl, what kind of cheese are you buying? What kind of containers does the cheese come in?
Sometimes I see sliced cheese or brick cheese in a supermarket or a place like Trader Joe's that's in a plastic wrapping. Is that what you mean?
In any case, cheese can stay around a while after opening when properly wrapped and kept refrigerated. The wrapping - especially plastic wrap(!) - should be changed often. For many cheeses it is suggested not to buy more than you will consume in a week or two. Not so much because the cheese will go bad, but because it will lose texture and flavor, although it's still safe to eat.
Here's one point of view on storing cheese. Mind you, this is for real cheese - not that Kraft Parmesan in the green container.
Storing Cheese: The Splendid Table
Storage temp should be between 35- and 45-degrees
I've never really known a cheese to go bad (except maybe sliced supermarket cheese, but I can't remember when I last purchased some) but cheese doesn't stay around here very long. I only buyt what I'll eat in the next few days or week. If cheese gets a little moldy, just cut of the moldy part and enjoy what's left.
If you've got a bunch of cheese in small pieces or odds and ends sizes, don't toss them - make a Fromage Fort. If you'd like some recipes/techniques, let me know.