DEV Community

Cover image for Containers and Virtual Machines.
Nisha Srivastava
Nisha Srivastava

Posted on

Containers and Virtual Machines.

Brief insight on containers and VMs

Operating Systems keep track of memory, RAM, Disk and devices, and if you run multiple programs simultaneously, all these resources of OS will be shared among the programs as per their requirements.

Now let's take an example where 1 of your programs is using port 80 and another program too needs to run on the same port, and if it tries to use the port, it will crash because port 80 is already in use.

It is one such example where containers and VMs come in use.

If you move your programs into containers or VMs each of them will have its own version of shared resources, files and network ports.

Containers provide the mobility, you can move and run your application easily.

Let's take a scenario where you are working on an application on your machine. Now that application will have certain configurations, binaries and other files and if you ship the same application and try to run it on another machine, it won't run if the machine does not fulfills the configuration requirements as per the application's demand of it. But if you have containerized it and then ship, no such issue will arise.

There are some similarities and so many differences between containers and VMs

Let's see that in the next post.

Enough of containers and stuff, let me make one revelation about you, You look best when you smile xD.

Oldest comments (0)