Here is a goal: How to best protect food from cockroaches?

Which way makes more sense to accomplish this goal?
Keeping the food in a well closed off container would be good.