Prev Next

API / Docker Interview questions

Could not find what you were looking for? send us the question and we would be happy to answer your question.

1. What is a Docker?

Docker 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 environment, be it development, test or production.

Docker containers, wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries, etc. It wraps basically anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

2. What is a Container?

Container is a way to package applications with all the necessary dependencies and configuration. Containers are portable artifacts, easily shared and moved around. It makes development and deployment more efficient.

3. Where do containers live?
  • Container repository.
  • private repositories.
  • public repository for Docker.
4. What is a Docker container?

Docker containers include the application and all of its dependencies. It shares the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud. Docker containers are basically runtime instances of Docker images.

5. What are Docker Images?

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 environment.

6. Difference: Docker vs VM.

7. What is Tag?

8. Mention few advantages of using Docker.
  • Application agility,
  • Developer productivity,
  • Easy modeling,
  • Placement and affinity,
  • Caching a cluster of containers,
  • Operational efficiencies such as flexible resource sharing,
  • Scalability,
  • Better security, less access needed to work with the code running inside containers, and fewer software dependencies
9. What are the components of Docker?

The three main Docker components are:

Docker Client performs Docker build pull and run operations to open up communication with the Docker Host. The Docker command then employs Docker API to call any queries to run.

Docker Host contains Docker daemon, containers, and associated images. The Docker daemon establishes a connection with the Registry. The stored images are the type of metadata dedicated to containerized applications.

Registry is where Docker images are stored. There are two of them, a public registry and a private. Docker Hub and Docker Cloud are two public registries available for use by anyone.

10. What is meant by Virtualization?

Virtualization is the process of employing software (such as Hypervisor) to create a virtual version of a resource such as a server, data storage, or application. Virtualization lets you divide a system into a series of separate sections, each one acting as a distinct individual system. The virtual environment is called a virtual machine.

11. Difference between virtualization and containerization.

Virtualization is an abstraction of a physical machine, while containerization is the abstraction of an application.

12. Explain the lifecycle of a Docker Container.

Some of the lifecycle processes include,

  • Create container,
  • Run container,
  • Pause container,
  • Unpause container,
  • Start container,
  • Stop container,
  • Restart container,
  • Kill container,
  • Destroy container.
13. Mention a few Docker commands.

build, Builds a Docker image file.

commit, creates a new image from container changes.

create, creates a new container.

dockerd, launches Docker daemon.

kill, kills a container.

Vault interview questions

Comments & Discussions