Thermodynamics in a Bag