Docker MCQs (Multiple-Choice Questions)

Docker was developed by Docker, Inc. It is a set of platforms as a service product that uses OS-level virtualization to deliver software in packages called containers. It helps developers to build, share, and run modern applications.

Docker MCQs

Docker MCQs: This section contains multiple-choice questions and answers on the various topics of Docker. Practice these MCQs to test and enhance your skills on Docker.

List of Docker Multiple-choice Questions and Answers

1. Which of the following view displays all of your containers and apps in real-time in Docker?

  1. Container
  2. Hub
  3. Images

Answer: A) Container

Explanation:

The Containers view displays all of your containers and apps in real-time.

Discuss this Question


2. ____ is a cloud registry service that allows you to obtain Docker images created by other communities.

  1. Container
  2. Hub
  3. Images

Answer: B) Hub

Explanation:

Docker Hub is a cloud registry service that allows you to obtain Docker images created by other communities.

Discuss this Question


3. Which of the following command displays all of the pictures that are presently installed on the system?

  1. See images
  2. Docker see images
  3. Docker images
  4. Docker pictures

Answer: C) Docker images

Explanation:

Docker Images command displays all of the pictures that are presently installed on the system.

Discuss this Question


4. A Container ____.

  1. Can be run on local machines, virtual machines, or deployed to the cloud.
  2. Is portable
  3. Is a runnable instance of an image
  4. All of the above

Answer: D) All of the above

Explanation:

Container is a:

  • Can be run on local machines, virtual machines, or deployed to the cloud.
  • Is portable
  • Is a runnable instance of an image

Discuss this Question


5. Which of the following command can run the application in a container?

  1. Docker run
  2. Run
  3. Docker start
  4. Start

Answer: A) Docker run

Explanation:

The docker run command can run the application in a container.

Discuss this Question


6. Which of the following command you will use to list your containers?

  1. Docker list
  2. Docker Ps
  3. List
  4. Docker_container_list

Answer: B) Docker Ps

Explanation:

Docker ps command will be used to list your containers.

Discuss this Question


7. Which of the following statement is correct?

  1. To remove a container, you first need to stop it
  2. You can directly remove a container, without stopping it.

Answer: A) To remove a container, you first need to stop it

Explanation:

Statement (A) is correct, to remove a container, you first need to stop it. Once it has stopped, you can remove it.

Discuss this Question


8. To stop the container, which of the following command is used?

  1. Stop
  2. Docker end
  3. Docker stop
  4. Docker finish

Answer: C) Docker stop

Explanation:

To stop the container, use the docker stop command.

Discuss this Question


9. Once the container has stopped, which of the following command you will use to remove a container?

  1. Docker remove
  2. Docker Destroy
  3. Docker rm
  4. Docker del

Answer: C) Docker rm

Explanation:

When the container has stopped, use the docker rm command to remove it.

Discuss this Question


10. Which of the following is the default registry in docker?

  1. Docker images
  2. Docker hub
  3. Docker container

Answer: B) Docker hub

Explanation:

Docker hub is the default registry.

Discuss this Question


11. ____ allows you to connect specified filesystem paths of the container back to the host computer.

  1. Volumes
  2. Images
  3. Containers

Answer: A) Volumes

Explanation:

Volumes allow you to connect specified filesystem paths of the container back to the host computer.

Discuss this Question


12. How many types of volumes are there in Docker?

  1. 3
  2. 4
  3. 5
  4. 2

Answer: D) 2

Explanation:

There are two types of volumes in docker:

  • Named volumes
  • Bind Mounts

Discuss this Question


13. The ____ is the actual location on the disk where the data is stored.

  1. Disk point
  2. Container memory
  3. Mountpoint

Answer: C) Mountpoint

Explanation:

The mountpoint is the actual location on the disk where the data is stored.

Discuss this Question


14. Which of the following volume type allows you to share a directory from the host's filesystem into the container?

  1. Named volumes
  2. Bind Mounts

Answer: B) Bind Mounts

Explanation:

The bind mount volume type allows you to share a directory from the host's filesystem into the container.

Discuss this Question


15. In which of the following volume type docker chooses the host location?

  1. Named volumes
  2. Bind Mounts

Answer: A) Named volumes

Explanation:

In the Named volume type docker chooses the host location, whereas you decide the host location in the bind mount type of volume.

Discuss this Question


16. Which of the following is a tool that was built to assist define and distribute multi-container applications?

  1. Docker setup
  2. Docker compose
  3. Docker notify

Answer: B) Docker compose

Explanation:

Docker Compose is a tool that was built to assist define and distribute multi-container applications.

Discuss this Question


17. You can examine the command that was used to construct each layer within an image by using which of the following command?

  1. docker image layer
  2. docker image
  3. docker image history
  4. docker image history layer

Answer: C) docker image history

Explanation:

You can examine the command that was used to construct each layer within an image by using the docker image history command.

Discuss this Question


18. Which of the following command is used to display the statistics of a running container?

  1. Docker statistics
  2. Stats
  3. Docker statics
  4. Docker stats

Answer: D) Docker stats

Explanation:

The stats command is used to display the statistics of a running container.

Discuss this Question


19. Which of the following command is used to pause processes in a running container?

  1. Docker hold
  2. Docker halt
  3. Docker wait
  4. Docker pause

Answer: D) Docker pause

Explanation:

Docker pause command is used to pause processes in a running container.

Discuss this Question


20. Which command is used to terminate processes in a running container?

  1. Docker kill
  2. Docker terminate
  3. Docker Suspend
  4. Docker delete

Answer: A) Docker kill

Explanation:

The docker kill command is used to terminate processes in a running container.

Discuss this Question


21. Which command is used to terminate the Docker daemon process?

  1. Service kill
  2. Docker kill
  3. service docker stop
  4. service docker Terminate

Answer: C) service docker stop

Explanation:

service docker stop command is used to terminate the Docker daemon process.

Discuss this Question


22. Daemon level of logging has how many levels?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: C) 4

Explanation:

Daemon level of logging has 4 levels:

  • Debug
  • info
  • Error
  • Fatal

Discuss this Question


23. How many components are there in Docker?

  1. 3
  2. 4
  3. 5
  4. 6

Answer: A) 3

Explanation:

Docker has three components:

  • Docker client
  • Docker Host
  • Docker Registry

Discuss this Question


24. Which of the following component stores the docker images?

  1. Docker client
  2. Docker Host
  3. Docker Registry

Answer: C) Docker Registry

Explanation:

Docker registry component stores the docker images.

Discuss this Question


25. Among named volumes and bind mounts which is easier to back up or migrate?

  1. Named volumes (volume)
  2. Bind mounts

Answer: A) Named volumes (volume)

Explanation:

Volumes are easier to back up or migrate than bind mounts.

Discuss this Question


26. To save up space and eliminate any unnecessary volumes which of the command is used?

  1. docker volume delete
  2. docker volume remove_all
  3. docker volume rm
  4. docker volume prune

Answer: D) docker volume prune

Explanation:

docker volume prune command is used to save up space and eliminate any unnecessary volumes.

Discuss this Question


27. Which of the following networks are typically used when your apps operate in separate containers and need to interact with one another?

  1. Bridge
  2. Host
  3. Overlay
  4. ipvlan

Answer: A) Bridge

Explanation:

Bridge networks are typically used when your apps operate in separate containers and need to interact with one another.

Discuss this Question


28. Which of the following is the default network driver?

  1. Bridge
  2. Host
  3. Overlay
  4. ipvlan

Answer: A) Bridge

Explanation:

Bridge is the default network driver.

Discuss this Question


29. Which of the following networks are ideal when containers operating on various Docker hosts need to connect, or when numerous apps use swarm services to collaborate?

  1. Bridge
  2. Host
  3. Overlay
  4. ipvlan

Answer: C) Overlay

Explanation:

Overlay networks are ideal when containers operating on various Docker hosts need to connect, or when numerous apps use swarm services to collaborate.

Discuss this Question


30. Which of the following network driver gives users total control over both IPv4 and IPv6 addresses?

  1. Bridge
  2. Host
  3. Overlay
  4. Ipvlan

Answer: D) Ipvlan

Explanation:

The IPvlan driver gives users total control over both IPv4 and IPv6 addressing.

Discuss this Question


31. Which of the following concatenates a collection of strings into a single string and inserts a divider between each list item?

  1. Append
  2. Join
  3. Merge
  4. Concat

Answer: B) Join

Explanation:

Join concatenates a collection of strings into a single string and inserts a divider between each list item.

Discuss this Question


32. Each value is printed on a new line using ____.

  1. Print_new
  2. Print
  3. Prinline
  4. println

Answer: D) println

Explanation:

Each value is printed on a new line using println.

Discuss this Question


33. A ____ is a string-based key-value pair?

  1. Map
  2. Set
  3. Label
  4. List

Answer: C) Label

Explanation:

A label is a string-based key-value pair.

Discuss this Question


34. Label keys should begin and end with a ____ letter.

  1. lower-case
  2. upper-case
  3. any case

Answer: A) lower-case

Explanation:

Label keys should begin and end with a lowercase letter.

Discuss this Question


35. Docker provides how many modes for delivering messages from the container to the log driver?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: A) 2

Explanation:

Docker provides two modes for delivering messages from the container to the log driver:

  • (default) direct, blocking delivery
  • non-blocking delivery

Discuss this Question


36. To list all the networks linked with Docker on the host, the ____ command is used.

  1. docker network list
  2. docker network ls
  3. docker ls
  4. network ls

Answer: B) docker network ls

Explanation:

To list all the networks linked with Docker on the host, the docker network ls command is used.

Discuss this Question


37. The ____ command is used to obtain all client and server version information.

  1. Version
  2. Info
  3. docker version

Answer: C) docker version

Explanation:

The docker version command is used to obtain all client and server version information.

Discuss this Question


38. Containerization is an abstract version of an application.

  1. True
  2. False

Answer: A) True

Explanation:

Containerization is an abstract version of an application.

Discuss this Question


39. A ____ is a piece of software that enables virtualization.

  1. Emulator
  2. Hypervisor
  3. Invertor

Answer: B) Hypervisor

Explanation:

A hypervisor is a piece of software that enables virtualization.

Discuss this Question


40. ____ is an abstract version of a real computer.

  1. Virtualization
  2. containerization

Answer: A) Virtualization

Explanation:

virtualization is an abstract version of a real computer.

Discuss this Question


41. How many types of hypervisors are there?

  1. 5
  2. 4
  3. 3
  4. 2

Answer: D) 2

Explanation:

There are two types of hypervisors:

  • Native hypervisor
  • Hosted hypervisor

Discuss this Question


42. Docker is a platform for ____.

  1. Developing an application
  2. Shipping an application
  3. Running an application
  4. All of the above

Answer: D) All of the above

Explanation:

Docker is a platform for :

  • Developing an application
  • Shipping an application
  • Running an application

Discuss this Question


43. Which of the following architecture does Docker uses?

  1. Client-server
  2. Master-slave
  3. Layered

Answer: A) Client-server

Explanation:

Docker uses a client-server architecture.

Discuss this Question


44. Docker is written in which of the following programming language?

  1. Ruby
  2. Go
  3. Kotlin
  4. Swift

Answer: B) Go

Explanation:

Docker is written in the Go programming language.

Discuss this Question





Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.