Docker Compose MCQ Questions & Answers
Docker Compose MCQs : This section focuses on "Compose" of Docker. These Multiple Choice Questions (MCQ) should be practiced to improve the Docker skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. Docker __________ is used to run multiple containers as a single service.
A. Hub
B. Compose
C. Cloud
D. Logging
View Answer
Ans : B
Explanation: Docker Compose is used to run multiple containers as a single service.
2. which of the following is used to check docker-compose version?
A. compose version
B. docker version
C. docker-compose version
D. None of the above
View Answer
Ans : C
Explanation: docker-compose version is used to check docker-compose version.
3. version is used to specify that we want the details of the version of Docker Compose.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, version is used to specify that we want the details of the version of Docker Compose.
4. ________is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host.
A. Docker Hub
B. Docker Swarm
C. Docker Compose
D. None of the above
View Answer
Ans : B
Explanation: Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host.
5. Docker __________ is used to run multiple containers as a single service.
A. Docker Hub
B. Docker Swarm
C. Docker Compose
D. All of the above
View Answer
Ans : A
Explanation: Docker hub is used to run multiple containers as a single service.
6. How to use JSON instead of YAML compose file?
A. docker push myorg/img
B. /var/lib/docker/volumes
C. systemctl start/stop docker
D. docker-compose -f docker-compose.json up
View Answer
Ans : D
Explanation: docker-compose -f docker-compose.json up to use JSON instead of YAML compose file
7. Which of the following is the native clustering for Docker?
A. Docker Hub
B. Docker Swarm
C. Docker Compose
D. Docker Cloud
View Answer
Ans : B
Explanation: Docker Swarm is the native clustering for Docker.
8. Which of the following is a text document that contains all the commands a user could call on the command line to assemble an image?
A. Docker Cloud
B. Dockerfile
C. Docker Kitematic
D. Docker Compose
View Answer
Ans : B
Explanation: Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image
9. The image keyword is used to specify the image from dockerhub for our mysql and nginx containers
A. TRUE
B. FALSE
C. Can be true or false
D. None of the above
View Answer
Ans : A
Explanation: True, The image keyword is used to specify the image from dockerhub for our mysql and nginx containers.
10. The database and web keyword are used to define two separate services.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, The database and web keyword are used to define two separate services.
Discussion