Docker Secrets MCQs with answers Page - 6

You will find multiple-choice questions (MCQs) related to #Docker Secrets 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. Can you update a Docker secret directly?

  • (A) Yes, with docker secret update
  • (B) No, you must delete and recreate it
  • (C) Yes, using docker secret patch
  • (D) Yes, by editing the mounted file

A

Admin • 825.56K Points
Coach

Q. What is a major security benefit of Docker secrets?

  • (A) They are encrypted and never exposed as env vars
  • (B) They are visible in container logs
  • (C) They are cached on disk for speed
  • (D) They are encoded in base64

A

Admin • 825.56K Points
Coach

Q. Can Docker secrets be used outside of Swarm mode?

  • (A) Yes, always
  • (B) No
  • (C) Only with Kubernetes
  • (D) Only with Docker Desktop

A

Admin • 825.56K Points
Coach

Q. How are secrets transmitted between manager and worker nodes?

  • (A) Plain text
  • (B) Base64 encoded
  • (C) Encrypted over TLS
  • (D) Using UDP broadcast

A

Admin • 825.56K Points
Coach

Q. Can a secret be mounted to multiple containers in a service?

  • (A) Yes
  • (B) No
  • (C) Only with Compose v2
  • (D) Only on worker nodes

A

Admin • 825.56K Points
Coach

Q. Which Compose file version supports Docker secrets?

  • (A) 2
  • (B) 2.1
  • (C) 3.1 and above
  • (D) All versions

A

Admin • 825.56K Points
Coach

Q. What is required to use secrets in a Compose file?

  • (A) Define secrets in the file and mark external: true
  • (B) Set secret=true in environment
  • (C) Define them as environment variables
  • (D) Create secret in the container first

A

Admin • 825.56K Points
Coach

Q. What is a potential risk of using environment variables instead of secrets?

  • (A) They are stored encrypted
  • (B) They are not available inside containers
  • (C) They can be seen in process lists or logs
  • (D) They are too complex to implement

A

Admin • 825.56K Points
Coach

Q. How do you inspect a Docker secret’s metadata?

  • (A) docker inspect secret <name>
  • (B) docker secret inspect <name>
  • (C) docker secret show <name>
  • (D) docker view secret <name>

A

Admin • 825.56K Points
Coach

Q. Can secrets be shared across services?

  • (A) Yes, if explicitly assigned
  • (B) No
  • (C) Only with external config
  • (D) Only with shared volumes
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