Virtual machines have long been used by Mac owners to run non-native operating systems or several instances of macOS on their workstation. Likewise, Docker containers have often been used in conjunction with virtual machines to enhance security, improve migration, and offer a more user-configurable environment.
Lumier is a project that lets you run easily-configured virtual machines on your Mac using Docker