πŸ“Š Docker
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>
πŸ’¬ Discuss
βœ… Correct Answer: (C) docker config rm <name>

Explanation: To remove a config, use the `docker config rm` command.

πŸ“Š Docker
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) Docker gives an error and doesn't remove it

Explanation: Docker prevents removal of configs that are still in use by active services.

πŸ“Š Docker
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) Under `configs:` and `configs:` in services

Explanation: Docker configs are attached in Compose under a top-level `configs:` block and referenced in each service.

πŸ“Š Docker
Q. What kind of access do containers have to Docker configs?
  • (A) Read and write
  • (B) Write only
  • (C) Read only
  • (D) No access
πŸ’¬ Discuss
βœ… Correct Answer: (C) Read only

Explanation: Configs are mounted as read-only files inside containers to prevent tampering.

πŸ“Š Docker
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Automatic encryption at rest

Explanation: Unlike secrets, configs are not encrypted automatically at rest.

πŸ“Š Docker
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Only shared with nodes that run the service

Explanation: Configs are securely shared only with nodes running services that require them.

πŸ“Š Docker
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) .pem (with secrets)

Explanation: .pem files often contain sensitive data and should be stored using Docker secrets, not configs.