Stable mode locking and dissipative soliton formation are predicted in a laser cavity with an effective photonic harmonic potential. As all modes starting from the fundamental are involved, the cavity is substantially more compact than a Fabry-Perot resonator with comparable pulsing period.