Docker Configs MCQs with answers Page - 2

You will find multiple-choice questions (MCQs) related to #Docker Configs 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 • 825.56K Points
Coach

Q. Which option is required when using configs in `docker service create`?

  • (A) --env
  • (B) --mount
  • (C) --config
  • (D) --volume

A

Admin • 825.56K Points
Coach

Q. Docker configs are best suited for which of the following?

  • (A) Storing database passwords
  • (B) Logging configuration files
  • (C) Mounting persistent data volumes
  • (D) Container runtime settings

A

Admin • 825.56K Points
Coach

Q. How is a config removed in Docker?

  • (A) docker config remove <name>
  • (B) docker config delete <name>
  • (C) docker config rm <name>
  • (D) docker delete config <name>

A

Admin • 825.56K Points
Coach

Q. What happens if a config is removed while still in use?

  • (A) The config is removed and the container crashes
  • (B) Docker gives an error and doesn't remove it
  • (C) Docker renames the config
  • (D) The config becomes read-only

A

Admin • 825.56K Points
Coach

Q. How do you attach a config in a Compose file?

  • (A) Using the `volumes:` section
  • (B) Under `configs:` and `configs:` in services
  • (C) With the `secrets:` field
  • (D) It’s not supported in Compose

A

Admin • 825.56K Points
Coach

Q. What kind of access do containers have to Docker configs?

  • (A) Read and write
  • (B) Write only
  • (C) Read only
  • (D) No access

A

Admin • 825.56K Points
Coach

Q. Which one of these is NOT a benefit of Docker configs?

  • (A) Versioning of configurations
  • (B) Decoupling configuration from images
  • (C) Centralized management in Swarm
  • (D) Automatic encryption at rest

A

Admin • 825.56K Points
Coach

Q. Are Docker configs shared across all Swarm nodes?

  • (A) Yes, and they are automatically available
  • (B) No, only to manager nodes
  • (C) Only if manually synced
  • (D) Only shared with nodes that run the service

A

Admin • 825.56K Points
Coach

Q. Which of the following file types would NOT be a good candidate for a Docker config?

  • (A) .conf
  • (B) .json
  • (C) .pem (with secrets)
  • (D) .env
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