A mechanical device inspired by the rapid rotational motion of the pistol shrimp plunger has been developed to experimentally study the contraction/expansion dynamics of a gas bubble inside a confined liquid volume and in the vicinity of solid surfaces. The apparatus consists of a limb with a V-shaped end, which fits into a socket forming a cylindrical compression chamber. Air bubbles of different sizes and in different positions inside the chamber were seeded to study their shape evolution in liquids when subjected to pressure pulses induced by the limb closure. By changing the standoff and curvature parameters, as well as the closing power of the limb it was possible to control the dynamical behavior of the cavity. Four stages describing the dynamic behavior of the bubble were found: 1) A slight expansion-contraction stage accompanied by very weak volumetric oscillations. 2) First compression stage. The formation of gas and liquid micro-jets is observed when the vertical symmetry axis of the bubble is initially located outside of the chamber symmetry axis, on the other hand, when there is a coincidence between these axes, the bubble only contracts exhibiting non-spherical shapes, alternating between oblate and prolate spheroidal structures. 3) An expansion stage where the cavity reaches the walls of the chamber exhibiting irregular shapes on its surface. 4) Second compression stage. This process begins when the limb rebounds and stops sealing the chamber allowing a jet of liquid to enter from the fluid medium outside, inducing a very violent collapse accompanied by the emission of light. The proposed technique represents a novel alternative to study the dynamic evolution of bubbles near and on solid boundaries of various geometries. Other attractive features of the apparatus are its low manufacturing cost, simple design and compact size which makes it easily portable.