#What is meant by image in virtual machine and docker

1 messages · Page 1 of 1 (latest)

native silo
#

Hello guys, sorry to disturb you all; I'm a student who recently had installed a virtual machine (virtual box) on which I have installed ubuntu. In order to install ubuntu, I think I had first installed an "image". What is meant by image pls, I often found this term being used several time when it comes to virtual machine. Similarly, I also encounter this word when we refer to docker.

What is "docker" and how does it relate to an image pls. Everyone told me docker is a kind of container but I don't understand what they meant by "container". Would really appreciate if someone can explain what is docker, what is an image and how are both related in virtual machines.

elfin prawn
# native silo Hello guys, sorry to disturb you all; I'm a student who recently had installed a...

Virtual machines install the operating system inside a special file, often *.vhd but others exist too. You can think of this as a special zip file with all the files needed for your VM to run an OS. I've heard people call this the VM image.

You also need an installation media which contains a simplified set of essential files needed to install the OS. This is often stored in a *.iso file format which you can think of as a special zip file that your VM will "unpack" and run. This can also be called an installation image.

Or if you were to clone your computer's hardrive and make an *.img file that can also be considered an image. And in this case the file extension usually is named accordingly.

In all these cases, you an usually install these files and use them for a similar purpose (write to a disk, use for booting a system, running in docker, etc)

So you can think of it as just a naming convention and image is just an umbrella term.

But that's just how I think of it 🙂

native silo
elfin prawn
# native silo yep I see, what about docker pls

Same with docker. It's called an image as a naming convention for the concept of "snapshotting" a system. These are basically lightweight packages that contain all the files for running. They're basically like miniature operating systems by themselves but with a very limited function compared to virtual machines which allow you to run a full OS.

native silo
#

yep I see, ty !