I'm trying to use docker import to get VM in a container, but the required format is "image.tgz", is it possible to export a VM image from VirtualBox to ".tgz" format?
Asked
Active
Viewed 504 times
0
-
you can export to tar format and then further converty it to .tgz? Isn't it ok? – Rao Nov 14 '16 at 11:27
-
I don't think this is going to work. Docker internally does not use VirtualBox, and therefore won't be able to load a VirtualBox image. You're probably using VirtualBox due to using Docker-Machine... – nwinkler Nov 14 '16 at 11:46
-
What is your use case? – Rao Nov 14 '16 at 12:02
-
I think you are confusing VMs and containers. The virtualbox disk image contains the full OS (including kernel). You can't "import" this into Docker. Even if you could tar and compress the disk image it would be an invalid file. – James Moser Nov 14 '16 at 20:14
-
thx guys, in my case I have CentOS in a virtual machine that I created using virtualBox, It has its own configuration. I need to have this machine under docker container and I want to keep the same configuration. for example using this command : sudo tar -c . | docker import - exampleimagedir – EFREV123 Nov 15 '16 at 16:09