can we containerize the iso image?if yes den how do we do it?
essentially, you’d make a tar file of the iso filesystem contents, and then docker load
that tar file.
I have a iso Image of a VM based on Ubuntu which includes vmdk,.vmx files along with .iso file. The footprint of the whole filesystem is around 15GB. Should all the files to be included while making a tar file? If so how can we reduce he footprint of the docker.
if you’re wanting to build a smaller image, I would not start from the ISO, but rather build the Docker image up using Dockerfiles.
Really… That’s not much help!. Can you give us a little more direction/description?
Well, not many people try to convert an iso to a container image so not many people will be able to answer completely. I have never tried it either because there is usually no need for it and it is not even a good idea. A container is not a virtual machine. The content of a virtual machine works in a virtual machine because the different kind of isolation. If you just exract it and copy it into a scratch image (an empty image) that is most likely will fail to start. I can’t start to explain the whole concept of containers and the difference between VM and container, but I can share the link to a recommended way:
I have never tied it with Docker although I think I tried debootsrap a long time ago without Docker. This is only for debian based images.
Even if you create a base image that way, you still need to modify it to add your files and there are existing base images which you can use instead of creating your own.
SO I think the only way to “convert” the iso to a containr image is if you have a deep understanding about the distribution and the files of it and you know exactly what files are necessary in the container and what files arent.
If you really need to convert an iso to a container image, it is also possible that you don’t even want Docker, but LXC, since LXC containers are usually closer to a full OS than Docker containers so it has also a better support for running a full OS in it. Docker is mainly for running one or maximum a few processes in the container not a full OS.
Maybe you are looking for the distrobuilder
https://linuxcontainers.org/distrobuilder/introduction/
but I don’t have experience about building these kind of images so that is probably all I can tell you.