Audvik Labs

Docker And Its Functions

Introduction

Docker is an open source software platform to create, deploy and manage virtualized application containers on a common operating system (OS), with an ecosystem of allied tools.

How Docker works

Docker packages, provisions and runs containers. Container technology is available through the operating system: A container packages the application service or function with all of the libraries, configuration files, dependencies and other necessary parts and parameters to operate. Each container shares the services of one underlying operating system. Docker images contain all the dependencies needed to execute code inside a container, so containers that move between Docker environments with the same OS work with no changes.

Docker uses resource isolation in the OS kernel to run multiple containers on the same OS. This is different than virtual machines (VMs), which encapsulate an entire OS with executable code on top of an abstracted layer of physical hardware resources.

Docker was created to work on the Linux platform, but has extended to offer greater support for non-Linux operating systems, including Microsoft Windows and Apple OS X. Versions of Docker for Amazon Web Services (AWS) and Microsoft Azure are available.

Docker ecosystem is composed of the following four components

1.Docker Daemon (dockerd)

2.Docker Client

3.Docker Images

4.Docker Registries

5.Docker Containers

What is a Docker Daemon?

Docker has a client-server architecture. Docker Daemon (dockerd) or server is responsible for all the actions related to containers.

The daemon receives the commands from the Docker client through CLI or REST API. Docker client can be on the same host as a daemon or present on any other host.

What is a Docker Image?

Images are the basic building blocks of Docker. It contains the OS libraries, dependencies, and tools to run an application.

Images can be prebuilt with application dependencies for creating containers. For example, if you want to run an Nginx web server as a Ubuntu container, you need to create a Docker image with the Nginx binary and all the OS libraries required to run Nginx.

What is a Dockerfile?

Docker has a concept of Dockerfile that is used for building the image. A Dockerfile a text file that contains one command (instructions) per line.

What is a Docker Registry?

It is a repository (storage) for Docker images.

A registry can be public or private. For example, Docker Inc provides a hosted registry service called Docker Hub. It allows you to upload and download images from a central location.

What is a Docker Container?

Docker Containers are created from existing images. It is a writable layer of the image. You can package your applications in a container, commit it, and make it a golden image to build more containers from it.

Containers can be started, stopped, committed, and terminated. If you terminate a container without committing it, all the container changes will be lost.

What Is Docker Used For?

Docker is used for:

  • Running multiple workloads on fewer resources.
  • Isolating and segregating applications.
  • Standardizing environments to ensure consistency across development and release cycles.
  • Streamlining the development lifecycle and supporting CI/CD workflows.
  • Developing highly portable workloads that can run on multi-cloud platforms.

Additionally, it is used as:

  • A cost-effective alternative to virtual machines.
  • A version control system for an application.

Docker advantages and disadvantages

Docker emerged as a de facto standard platform to quickly compose, create, deploy, scale and oversee containers across Docker hosts. Docker allows a high degree of portability so that users can register and share containers over various hosts in private and public environments. Docker benefits include efficient application development, lower resource use and faster deployment compared to VMs.

There are also potential challenges with Docker. The sheer number of containers possible in an enterprise can be difficult to manage efficiently. As use of containers evolves from granular virtual hosting to orchestration of application components and resources, the distribution and interconnection of componentized applications — which can involve hundreds of ephemeral containers — is a major hurdle.

In recent years, Docker was supplanted by Kubernetes for container orchestration.


Conclusion

In a nutshell, here’s what Docker can do for you: It can get more applications running on the same hardware than other technologies; it makes it easy for developers to quickly create ready-to-run containered applications; and it makes managing and deploying applications much easier.

Leave a comment

Your email address will not be published. Required fields are marked *