We describe an algorithm that allows one to find dense packing configurations of a number of congruent disks in arbitrary domains in two or more dimensions. We have applied it to a large class of two dimensional domains such as rectangles, ellipses, crosses, multiply connected domains and even to the cardioid. For some of the cases that we have studied, no previous result was available. The fundamental idea in our approach is the introduction of “image” disks, which allows one to work with a fixed container, thus lifting the limitations of the packing algorithms of Nurmela and Östergärd [Discrete Comput. Geom. 18(1), 111–120 (1997)], Amore and Morales [Discrete Comput. Geom. 70, 249–267 (2022)], and Amore [Phys. Fluids 35(2), 027130 (2023)]. We believe that the extension of our algorithm to three (or higher) dimensional containers (not considered here) can be done straightforwardly.