Debug School

rakesh kumar
rakesh kumar

Posted on

Important Terminology for docker containeration and orchestration

Difference between Containerization and orchestration

Important Terminology

Containerization is the process of encapsulating an application and its dependencies into a lightweight, isolated unit known as a container.
Containers provide a consistent and portable environment, ensuring that an application runs the same way across different environments.

Containerization is the process of encapsulating an application and its dependencies into a lightweight, isolated unit known as a container.
Containers provide a consistent and portable environment, ensuring that an application runs the same way across different environments.

Containerization aims to solve the "it works on my machine" problem by packaging an application and its dependencies together, creating a standardized unit for deployment.

Containers offer process and file system isolation. Each container runs as an independent process with its own file system, ensuring that it doesn't interfere with other containers or the host system.

Common containerization technologies include Docker, containerd, and rkt. Docker, in particular, has become the de facto standard for containerization.
Key Benefits:

Portability: Containers can run consistently across different environments.
Efficiency: Containers share the host OS kernel, reducing resource overhead compared to virtual machines.
Rapid Deployment: Containers can be started and stopped quickly, facilitating fast application deployment.

Image description



Orchestration involves automating the deployment, scaling, and management of containerized applications.
Orchestration tools handle the coordination of multiple containers, ensuring they work together seamlessly.

Orchestration addresses the challenges of managing complex, multi-container applications by automating tasks such as scaling, load balancing, and service discovery.

Orchestration tools can automatically scale the number of containers based on demand, ensuring that applications remain performant during varying workloads.
Service Discovery:

Orchestration tools provide mechanisms for service discovery, allowing containers to find and communicate with each other dynamically.

Popular orchestration tools include Docker Swarm, Kubernetes, and Apache Mesos. Kubernetes, in particular, has gained widespread adoption for container orchestration.
Key Benefits:

Scalability: Orchestration enables the efficient scaling of containerized applications.
High Availability: Orchestration tools manage the distribution of containers across multiple nodes to ensure high availability.
Automation: Orchestration automates tasks such as load balancing, health checks, and deployment, reducing manual intervention.

Containerization and orchestration are often used together. Containers provide the packaging format, while orchestration tools manage the deployment and scaling of these containers.

Orchestration tools build on top of containerization technologies. For example, Kubernetes manages Docker containers but is not tied exclusively to Docker; it can orchestrate containers from various runtimes.

Image description

Image description

Important Terminology

What exactly is Docker? What distinguishes it?
Ans. Docker is a versatile open-source application that runs on both Linux and Windows. It’s used to automate the creation and deployment of containers-based applications. It can be described as a light form of virtualization.

Users can use Docker to package their application and all of its dependencies into containers. It allows users to decouple their applications and infrastructure.

Docker’s features

Configuration is simple.

Improved Software Distribution

Isolation of the application

Systems can scale up quickly.

Management of Security

Controlling the versions

Networking that is defined by software

Developer Productivity Has Increased

Efficiencies in Operations

What are Docker containers?

Ans. Docker containers abstract the application layer and package applications with all of their dependencies in a single container. This enables us to quickly and reliably deploy applications. Containers do not necessitate the installation of a separate operating system. Instead, they use the CPU and memory of the underlying system to complete tasks. This means that any containerized application, regardless of the underlying operating system, can run on any platform. Containers can also be thought of as runtime instances of Docker images.

Describe Docker’s main components.
Ans. Docker is made up of three main parts:

The Docker Client is a programme that allows users to interact with Docker. The client includes a command-line interface (CLI) that allows users to give Docker daemons commands to create, run, and stop applications. The client and daemon can both be on the same machine. It can also connect to a daemon running on another computer. A client can communicate with multiple daemons.

Docker Host: It gives you everything you need to run your apps. Docker daemon, containers, networks, storage, and images are all part of it. Docker Registry is a repository for Docker containers.

This is the location where Docker images can be stored and downloaded. A public registry and a private registry are the two types of registries. Docker Hub is where docker images are stored by default.

The docker image is stored on the configured registry when we use the docker push command. The docker image is pulled from the configured registry when we use the docker pull or run commands.

What is a DockerFile?
Ans. A Dockerfile is a text file that contains all of the commands necessary to create a Docker image. Docker builds images automatically by following the instructions in the Dockerfile. Docker build can be used to automate the execution of multiple command-line instructions in a sequential order.

How do you turn a Docker image into a Docker container?

Ans. To make a container from an image, we first have to find the image we want in the Docker repository and then create a container from it. The following command can be used:

1 $ docker run -it -d <image_name>
Enter fullscreen mode Exit fullscreen mode

For Docker Compose, can you use JSON instead of YAML?
Ans. Yes, instead of a YAML file, we can use a JSON file for the Docker Compose file. To use JSON, we must provide the following filename:

1 $ docker-compose -f docker-compose.json up
Enter fullscreen mode Exit fullscreen mode

What is a Docker image, and how does it work?
Ans. A Docker image is a read-only template that contains a set of instructions for building Docker containers. It’s an executable package (a collection of files or layers) that contains everything you’ll need to set up a fully functional container environment, including application code, dependencies, software packages, and more. A Docker image can be created in one of two ways:


Enter fullscreen mode Exit fullscreen mode

Which command should you use to archive a Docker image?

Ans. The docker save command can be used to save a docker image as an archive.


docker save -o <exported_name>.tar <container-name>
Enter fullscreen mode Exit fullscreen mode

Which command is used to import a Docker image that has already been exported into another Docker host?
Ans. Using the docker load command, we can import a pre-exported Docker image into another Docker host.


docker load -i <export_image_name>.tar
Enter fullscreen mode Exit fullscreen mode

What is Docker Swarm, and how does it work?
Ans. Docker Swarm is a container orchestration tool that lets us manage multiple containers on multiple hosts. We can use Swarm to combine multiple Docker hosts into a single host for easier management and monitoring.

How do you modify a base image if you want to use it as a starting point?
Ans. Using the Docker command, we can pull an image from Docker Hub onto our local system:


$ docker pull <image_name>
Enter fullscreen mode Exit fullscreen mode

What’s the best way to start, stop, and kill containers?
Ans. Use the following command to start a Docker container:

$ docker start <container_id>
Enter fullscreen mode Exit fullscreen mode

To stop a Docker container, use the following command:

1 $ docker stop <container_id>
Enter fullscreen mode Exit fullscreen mode

To kill a Docker container, use the following command:

1 $ docker kill <container_id>
Enter fullscreen mode Exit fullscreen mode

Distinguish between the Docker components.
Ans. Docker Client, Host, and Registry are the three architectural components.

Docker Client: This component communicates with the Docker Host by executing build and run operations.
Docker Host: The Docker Daemon, Docker images, and Docker containers are all stored in this component. A connection to the Docker Registry is established by the daemon.
Docker Registry: This component is responsible for storing Docker images. It can be a public or private registry, such as Docker Hub or Docker Cloud.
When it comes to virtualization and containerization, what’s the difference?
Ans. Virtualization- We can run and host multiple operating systems on a single physical server thanks to virtualization. Hypervisors provide a virtual machine to the guest operating system in virtualization. Each VM on the host can act as a physical machine because the VMs abstract the hardware layer.

Containerization- Containerization gives us a secure environment in which to run our applications. On a single server or virtual machine, we can run multiple applications using the same operating system. Each container represents a different application because containers are an abstraction of the application layer.

What is a hypervisor and what does it do?

Ans. A hypervisor, also known as a virtual machine monitor, is software that aids in the creation and management of virtual machines. It allows us to support multiple guest virtual machines on a single host computer. This is accomplished by partitioning the host’s system resources and allocating them to the installed guest environments. On a single host operating system, multiple operating systems can be installed. Hypervisors are divided into two types:

Native: Native hypervisors, also known as bare-metal hypervisors, run directly on the host system. It gives us direct access to the host system’s hardware and eliminates the need for a base server operating system.

Hosted: Hypervisors that are hosted use the underlying host operating system.

How do you make a Dockerfile ?
Ans. We’ll need to build a Dockerfile in order to create an image that meets our requirements. We can use the docker build command to build a Dockerfile:

1 $ docker build <path to dockerfile>
Enter fullscreen mode Exit fullscreen mode

To add a new image to the Docker Registry, what command do you use?
Ans. The docker push command can be used to push a new image to the Docker Registry:

1 $ docker push myorg/img
Enter fullscreen mode Exit fullscreen mode

What is Docker Engine?
Ans. Docker Engine is a free and open-source containerization technology that we can use to create and containerize our apps. The following components are required to run Docker Engine:

REST API for Docker Engine
Docker CLI is a command-line interface for Docker (CLI)
Docker Daemon is a daemon that runs on Docker.
How do you get to a container that’s already running?
Ans. We can use the following command to get access to a running container:

1 $ docker exec -it <container_id> bash
Enter fullscreen mode Exit fullscreen mode

How do you get a list of all the containers that are currently running?
Ans. We can use the following command to get a list of all running containers:

1 $ docker ps
Enter fullscreen mode Exit fullscreen mode

Describe the Docker container’s lifecycle.

Ans. The stages of Docker containers are as follows:

Create a container
Run the container
Pause the container (optional)
Un-pause the container (optional)
Start the container
Stop the container
Restart the container
Kill the container
Destroy the container
What are Docker object labels?
Ans. Labels for Docker objects are key-value pairs stored as strings. They allow us to tag Docker objects like containers, networks, local daemons, images, Swarm nodes, and services with metadata.

What is the purpose of the docker create command?
Ans. The docker create command prepares an image for running a specified command by creating a writable container layer over it.


Top comments (0)