The thin walled glass container is filled with liquid and fit with a cork with a little air trapped between the liquid and the cork. Let the cork make the container air tight with no possibility of the air that is trapped escaping.
When the cork is pushed down it compresses the gas and increases pressure. The pressure of a gas is inversely proportional to the volume it is placed in. The liquid can be safely assumed to be incompressible, this allows the increased pressure to be transmitted through the liquid to the wall of the container. As the wall of the glass container is thin it is not capable of withstanding high pressures and this causes it to break.