Getting started with Docker!

What is Docker?

What is a container?

Why we need Docker and Docker containers?

What is the difference between Docker containers and virtual machines?

Virtual Machine vs Docker

The above diagram show how application run on a Docker and Virtual machine. The virtual machine(VM) on the left and the Docker containers on the right.

In the case of Docker, we have the underlying hardware infrastructure and then the OS, and then the Docker installed on the OS. Docker then manages the containers that run with libraries and dependencies alone.

In the case of VM, we have the hypervisor on the hardware then the virtual machine on them. (A hypervisor is computer software, firmware, or hardware that creates and runs virtual machines.) As we can see in the diagram each VM has its own OS inside it then the dependencies and the application.

VMs

  • need higher disk space
  • slow boot-up
  • complete isolation

Docker containers

  • need low disk space
  • fast boot up
  • less isolation(since more resources shared between the containers)

Computer Science and Engineering Undergraduate at University of Moratuwa, Sri Lanka