Docker Interview Questions and Answers
Question - 21 : - What command should you run to see all running container in Docker?
Answer - 21 : -
$ docker ps
Question - 22 : - Write the command to stop the docker container
Answer - 22 : -
$ sudo docker stop container name
Question - 23 : - What is the command to run the image as a container?
Answer - 23 : -
$ sudo docker run -i -t alpine /bin/bash
Question - 24 : - Explain Docker object labels
Answer - 24 : -
Docker object labels is a method for applying metadata to docker objects including, images, containers, volumes, network, swam nodes, and services.
Question - 25 : - What is Hypervisor?
Answer - 25 : -
The hypervisor allows you to create a virtual environment in which the guest virtual machines operate. It controls the guest systems and checks if the resources are allocated to the guests as necessary.
Question - 26 : - What is Virtualization?
Answer - 26 : -
Virtualization is a method of logically dividing mainframes to allow multiple applications to run simultaneously.
However, this scenario changed when companies and open source communities were able to offer a method of handling privileged instructions. It allows multiple OS to run simultaneously on a single x86 based system.
Question - 27 : - What is Docker hub?
Answer - 27 : -
Docker hub is a cloud-based registry that which helps you to link to code repositories. It allows you to build, test, store your image in Docker cloud. You can also deploy the image to your host with the help of Docker hub.
Question - 28 : - What the states of Docker container?
Answer - 28 : -
Important states of Docker container are:
- Running
- Paused
- Restarting
- Exited
Question - 29 : - How can you monitor the docker in production environments?
Answer - 29 : -
Docker states and Docker Events are used to monitoring docker in the production environment.
Question - 30 : - Explain Docker Swarm?
Answer - 30 : -
Docker Swarm is native gathering for docker which helps you to a group of Docker hosts into a single and virtual docker host. It offers the standard docker application program interface.