Docker Interview - FAQs & Answers
Docker Interview - FAQs & Answers
1. What is Hypervisor?
an
virtual environment.
2. What is virtualization?
m
Virtualization is the process of creating a software-based, virtual version of something
(compute storage, servers, application, etc.). These virtual versions or environments are
eh
created from a single physical hardware system.
3. What is containerization?
Let me explain this is with an example. Usually, in the software development process,
R
code developed on one machine might not work perfectly fine on any other machine
because of the dependencies. This problem was solved by the containerization concept.
l
wrapped together with all its configuration files and dependencies. This bundle is called
a container. Now when you wish to run the application on another system, the container
is deployed which will give a bug-free environment as all the dependencies and libraries
Ab
are wrapped together. Most famous containerization environments are Docker and
Kubernetes.
4. Difference between virtualization and containerization
Once you’ve explained containerization and virtualization, the next expected question
would be differences. The question could either be differences between virtualization
and containerization or differences between virtual machines and containers. Either
way, this is how you respond.
Containers provide an isolated environment for running the application. The entire user
an
space is explicitly dedicated to the application. Any changes made inside the container
is never reflected on the host or even other containers running on the same host.
m
Containers are an abstraction of the application layer. Each container is a different
application.
eh
Whereas in Virtualization, hypervisors provide an entire virtual machine to the
guest(including Kernal). Virtual machines are an abstraction of the hardware layer. Each
VM is a physical machine.
R
5. What is Docker?
l
and all its dependencies together in the form of containers so as to ensure that your
application works seamlessly in any environment, be it development, test or production.
Ab
Docker image is the source of Docker container. In other words, Docker images are
used to create containers. When a user runs a Docker image, an instance of a container
is created. These docker images can be deployed to any Docker environmen
an
8. What is Docker Hub?
Docker images create docker containers. There has to be a registry where these docker
images live. This registry is Docker Hub. Users can pick up images from Docker Hub
m
and use them to create customized images and containers. Currently, the Docker Hub is
the world’s largest public repository of image containers.
eh
9. Explain Docker Architecture?
Docker Architecture consists of a Docker Engine which is a client-server application with
R
three major components:
2. A REST API which specifies interfaces that programs can use to talk to the
du
Docker can build images automatically by reading the instructions from a file called
Dockerfile. A Dockerfile is a text document that contains all the commands a user could
call on the command line to assemble an image. Using docker build, users can create
an
an automated build that executes several command-line instructions in succession
m
and volumes for setting up the Docker application. So, you can use Docker Compose to
create separate containers, host them and get them to communicate with each other.
eh
Each container will expose a port for communicating with other containers.
● Create a container
du