Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert VM image to dockerfile?

For work purpose, I have an ova file which I need to convert it to DockerFile.

Does someone know how to do it?

Thanks in advance

like image 616
AznYouth Avatar asked May 17 '18 14:05

AznYouth


1 Answers

There are a few different ways to do this. They all involve getting at the disk image of the VM. One is to mount the VDI, then create Docker image from that (see other Stackoverflow answers). Another is to boot the VM and copy the complete disk contents, starting at root, to a shared folder. And so on. We have succeeded with multiple approaches. As long as the disk in the VM is compatible with the kernel underlying the running container, creating Docker image that has the complete VM disk has worked.

like image 124
seanhalle Avatar answered Oct 18 '22 17:10

seanhalle