Free and forced oscillations of a squeezed gas bubble are investigated. The bubble is placed in a finite volume of an
incompressible fluid with a free outer interface. Two parallel solid plates with inhomogeneous surfaces confine the liquid and the bubble. An external oscillating pressure field acts on the system. The method is proposed for taking into account the effect of surface inhomogeneity. The dependence of the frequency of natural oscillations and the damping decrement on the wetting parameter are plotted. It is shown that the inhomogeneity significantly changes the frequency values. Well-marked resonant effects are demonstrated. The inhomogeneity leads to the excitation of azimuthal modes, while the external action excites only volumetric oscillations.