Some of the most dynamic solar phenomena occur in complex magnetic configurations such as quadrupolar regions. To study eruptivity in quadrupolar regions, we perform 3D magnetohydrodynamic simulations of the partial emergence of two segments of a flux tube from the solar interior into a non-magnetized, stratified atmosphere. The emergence leads to the formation of two initially separated bipoles, which later come in contact, forming a strong polarity inversion line. Above the two bipoles, two magnetic lobes expand and interact through a series of current sheets at the interface between them. Two recurrent confined eruptions are produced. In both cases, the reconnection between sheared, low-lying field lines forms a flux rope. The confined eruptions result from the interaction between the two magnetic lobes at different heights in the solar atmosphere. These interactions create field lines that assist the eruption of the flux ropes, and also create other field lines that inhibit the eruptions. The flux rope of the first, weaker, eruption almost fully reconnects with the overlying field. The flux rope of the second, more energetic, eruption is confined by the overlying strapping field. During the second eruption, the flux rope is enhanced in size, flux, and twist, similar to confined-flare-to-flux-rope observations. Proxies of the emission reveal the two erupting filaments channels. A flare arcade is only formed in the second eruption owing to the longer lasting and more efficient reconnection at the current sheet below the flux rope.