Home »
MCQs
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?
- Container
- Hub
- 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.
- Container
- Hub
- 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?
- See images
- Docker see images
- Docker images
- 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 ____.
- Can be run on local machines, virtual machines, or deployed to the cloud.
- Is portable
- Is a runnable instance of an image
- 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?
- Docker run
- Run
- Docker start
- 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?
- Docker list
- Docker Ps
- List
- 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?
- To remove a container, you first need to stop it
- 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?
- Stop
- Docker end
- Docker stop
- 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?
- Docker remove
- Docker Destroy
- Docker rm
- 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?
- Docker images
- Docker hub
- 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.
- Volumes
- Images
- 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?
- 3
- 4
- 5
- 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.
- Disk point
- Container memory
- 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?
- Named volumes
- 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?
- Named volumes
- 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?
- Docker setup
- Docker compose
- 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?
- docker image layer
- docker image
- docker image history
- 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?
- Docker statistics
- Stats
- Docker statics
- 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?
- Docker hold
- Docker halt
- Docker wait
- 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?
- Docker kill
- Docker terminate
- Docker Suspend
- 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?
- Service kill
- Docker kill
- service docker stop
- 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?
- 2
- 3
- 4
- 5
Answer: C) 4
Explanation:
Daemon level of logging has 4 levels:
Discuss this Question
23. How many components are there in Docker?
- 3
- 4
- 5
- 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?
- Docker client
- Docker Host
- 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?
- Named volumes (volume)
- 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?
- docker volume delete
- docker volume remove_all
- docker volume rm
- 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?
- Bridge
- Host
- Overlay
- 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?
- Bridge
- Host
- Overlay
- 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?
- Bridge
- Host
- Overlay
- 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?
- Bridge
- Host
- Overlay
- 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?
- Append
- Join
- Merge
- 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 ____.
- Print_new
- Print
- Prinline
- 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?
- Map
- Set
- Label
- 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.
- lower-case
- upper-case
- 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?
- 2
- 3
- 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.
- docker network list
- docker network ls
- docker ls
- 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.
- Version
- Info
- 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.
- True
- 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.
- Emulator
- Hypervisor
- 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.
- Virtualization
- 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?
- 5
- 4
- 3
- 2
Answer: D) 2
Explanation:
There are two types of hypervisors:
- Native hypervisor
- Hosted hypervisor
Discuss this Question
42. Docker is a platform for ____.
- Developing an application
- Shipping an application
- Running an application
- 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?
- Client-server
- Master-slave
- 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?
- Ruby
- Go
- Kotlin
- Swift
Answer: B) Go
Explanation:
Docker is written in the Go programming language.
Discuss this Question