What I'm imagining is something like this: I spin up a VM or container with the OS and packages that I need, lets say an ansible script runs and provisions the vagrant or docker container exactly the way I want it. After that I use some tool, I'm thinking of tools like Systemback or Clonezilla, to make an iso image off of that vagrant or Docker. Then I would like to be able to take that iso image and install it directly onto a bare metal machine and it's ready to go.
Basically an image and restore but the imaging happens in a VM or container.
Is this possible? Is there anything I should know about the inner workings of Docker or Vagrant that wouldn't allow an image to be created and/or restored to a physical machine?
I just found this article that has step-by-step instructions for what I'm trying to do. So apparently it is possible using a combination of VMware and Clonezilla.
https://www.howtoforge.com/converting-a-vmware-image-to-a-physical-machine
Thanks for the comment-less downvotes though.