Skip to content
Ramesh Kumar edited this page Dec 27, 2020 · 3 revisions
  • It is a containerization platform which packages your application and all its dependencies together in the form of containers so as to ensure that your application works seamlessly in any evironment be it Development or Test or Production
  • Each application is indepdent of other applications if they are created in different containers

Benefits of Docker over Virtual Machine

Docker Vs VM

Explanation about Size in Docker Vs VM

  • In VM, we have problem of memory wasted as we allocate memory while creating the VM, but it is possible that we are using all the allocated memory
  • In Docker, CPU allocates the memory to the docker that will be used.
  • Image

Explanation about Start-up in Docker Vs VM

  • In VM, startup takes more time because first Host OS needs to start, then Hypervisor and in the last Guest OS
  • However, in case of docker, first HOST OS needs to start and then it serves to container. As container is running on Host OS kernal

Startup Issue Docker vs VM

Explanation about Integration in Docker Vs VM

  • Integration in VM is possible, But:
    • Costly due to infrastrucutre requirements
    • Not easily scalable (as for every VM, we need to setup github, jenkins, etc.)

Integration in VMs

  • In case of Docker, integration is faster, cheap and easily scalable

Integration Docker

How Docker Works?

  • Docker engine is main component of the docker.
  • Works like a client and server system, where server is known as Docker Daemon process and command line interface Client. Rest API, Socket API and TCP are used for communication between client and server system
  • Containers consists of Images. First we build the image and then run using the CLI client in linux
  • Linux and Windows have different architecture of docker

Docker Engine

Docker In Linux And Windows

Importance Information regarding Containers

  • Containers are designed for running specific tasks and processes, not for hosting operating systems.
  • You create a container to serve a single unit task. Once it completes the given task, it stops.
  • Therefore, the container life-cycle depends on the ongoing process inside of it. Once the process stops, the container stops as well.
  • A Dockerfile defines this process.
  • Dockerfile is a script made up of instructions on how to build a Docker image.
  • In this script, there are two types of instructions that can define the process running in the container:
    • ENTRYPOINT
    • CMD