Docker Compose MCQs with answers Page - 6

You will find multiple-choice questions (MCQs) related to #Docker Compose here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.03K Points
Coach

Q. Which key allows specifying DNS settings in docker-compose.yml?

  • (A) dns
  • (B) domain
  • (C) resolve
  • (D) hosts

A

Admin • 828.03K Points
Coach

Q. What is the effect of `stdin_open: true` in docker-compose.yml?

  • (A) Opens stdin for the container
  • (B) Disables logging
  • (C) Mounts a volume
  • (D) Limits memory usage

A

Admin • 828.03K Points
Coach

Q. Which key in docker-compose.yml maps host paths to container paths?

  • (A) map
  • (B) volumes
  • (C) bind
  • (D) paths

A

Admin • 828.03K Points
Coach

Q. What is the purpose of `depends_on` in Docker Compose?

  • (A) To link containers for networking
  • (B) To control container startup order
  • (C) To expose ports
  • (D) To mount volumes

A

Admin • 828.03K Points
Coach

Q. Which key in docker-compose.yml can restrict services to run on specific nodes in a swarm?

  • (A) placement
  • (B) node
  • (C) affinity
  • (D) constraints

A

Admin • 828.03K Points
Coach

Q. What is the default network name created by Docker Compose?

  • (A) bridge
  • (B) default
  • (C) compose_default
  • (D) network_default

A

Admin • 828.03K Points
Coach

Q. What does the `hostname` key specify in docker-compose.yml?

  • (A) The container's host name inside the network
  • (B) The container image name
  • (C) The external DNS name
  • (D) The swarm node name
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More