Docker overview

Docker is an open source container-based virtualization technology that helps to automate the deployment of an application inside a container. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces and it allows the running of multiple containers independently and isolated from each other on a host machine. The benefit of Docker over virtual machine is that Docker is a light-weight process compared to a virtual machine and it provides resource isolation when sharing the same kernel including drivers of the host machine. Docker is open source technology and supported on different platforms. As Docker is built on top of Linux kernel, it supports Windows and Mac using Boot2Docker application.

Some of the main features of Docker are:

  • Docker Engine: The light-weight container to create, manage and containerize the application.
  • Portability: One of the important features is container-reuse. You can prepare one Tomcat image and use this image as a base image for all other web applications. This image can be deployed in any system like desktop, physical servers, virtual machines, and even in cloud.
  • Docker Hub: Docker also has its own SaaS-based public registry shared with developers across the globe. You can fid different kinds of images like MySQL, Tomcat, Java, Redis, and other technologies. Users can create and upload images to this repository.
  • Faster delivery: Docker containers are very fast compared to virtual machines. This feature helps in reducing the time for development, testing and deployment.
  • API: Docker supports a user friendly API to manage Docker containers.

You might be using virtual machine in an organization infrastructure. Docker is very different from a virtual machine. A virtual machine has its own operating system with device drivers, memory, CPU shares, and son on. On the other hand, a container shares the host operating system and most of these resources with other container on the same host.

Let's look at some differences between Docker and virtual machines:

  • Docker uses Linux containers, which share the same operating system, whereas each virtual machine has its own operating system thus increasing the overhead
  • Docker uses Another Union File System (AUFS) that is a layered file system. It has a read-only part that is shared by all containers and write part that is unique for each container to write its own data
  • Docker is a light weight technology that requires minimum resources of its own as it shares the maximum resources, whereas a full VM system shares minimum resources and gets most of resources of its own
  • Docker startup time is very less as compared to VM
  • Docker is mostly suitable for small applications (Micro Services) that can share the common resources and just isolate itself with some processes, whereas VM is suitable for heavier applications that need full isolation of resources

Now in the next two sections, we will work with Docker installation and then we will learn some of the most used Docker commands.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.44.229