One contribution of 13 to a theme issue 'Patterning through instabilities in complex media: theory and applications' . We report the results of an experimental and numerical investigation into the buckling of thin elastic rings confined within containers of circular or regular polygonal cross section. The rings float on the surface of water held in the container and controlled removal of the fluid increases the confinement of the ring. The increased compressive forces can cause the ring to buckle into a variety of shapes. For the circular container, finite perturbations are required to induce buckling, whereas in polygonal containers the buckling occurs through a linear instability that is closely related to the canonical Euler column buckling. A model based on Kirchhoff-Love beam theory is developed and solved numerically, showing good agreement with the experiments and revealing that in polygons increasing the number of sides means that buckling occurs at reduced levels of confinement.This article is part of the themed issue 'Patterning through instabilities in complex media: theory and applications'.