Docker MCQs with answers Page - 66

Here, you will find a collection of MCQ questions on Docker. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K 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 • 802.91K 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 • 802.91K 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 • 802.91K 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 • 802.91K 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 • 802.91K 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 • 802.91K 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 • 802.91K 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

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ