We report experimental and numerical investigations on the dynamics of the cavitation of bubbles on a solid surface and the interaction between them with the help of controlled cavitation nuclei: hemispherical bubbles are nucleated from hydrophobic microcavities that act as gas traps when the substrate is immersed in water. The expansion of these nuclei is triggered by an impulsive lowering of the liquid pressure. The patterning of the substrate allows us to control the number of bubbles and the distance between them. Each hemispherical bubble experiences the effect of its mirror image. Correspondingly, an isolated hemispherical bubble together with its mirror image behaves like a free spherical bubble, i.e., its dynamics is well described by the Rayleigh-Plesset equation. We employ the setup to study the dynamics of two and more bubbles in a row at controlled and fixed distances from each other. For weak interaction, namely when the maximum size of the bubbles is smaller than the bubble distance, the dynamics of the system is well captured by an extended Rayleigh-Plesset equation, where mutual pressure coupling through sound emission is included. Bubble pairs last longer than an isolated bubble as neighboring bubbles modify the surrounding pressure and screen each other. For strong interaction, obtained by increasing the tensile stress or decreasing the bubble distance, the bubbles eventually flatten and form a liquid film between each other which can rupture, leading to coalescence. The film thinning is inertia dominated. A potential flow boundary integral simulation captures the overall shape evolution of the bubbles, including the formation of jets horizontal to the wall. These horizontal jets are caused by symmetry breaking due to the neighboring bubbles.