Docker Secrets MCQs with answers Page - 2

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 • 828.43K Points
Coach

Q. Can Docker secrets be updated in place?

  • (A) Yes, using docker secret update
  • (B) No, secrets must be deleted and recreated
  • (C) Only using Docker Compose
  • (D) Yes, using a Dockerfile

A

Admin • 828.43K Points
Coach

Q. What happens to a secret after the container using it stops?

  • (A) It is removed from the Docker node
  • (B) It is stored permanently on disk
  • (C) It is still available for other services
  • (D) It becomes publicly visible

A

Admin • 828.43K Points
Coach

Q. In which directory can a container find its secrets in Docker Swarm?

  • (A) /data/secrets
  • (B) /run/secrets
  • (C) /tmp/secrets
  • (D) /etc/secrets

A

Admin • 828.43K Points
Coach

Q. Which of these can be stored as a Docker secret?

  • (A) Database connection strings
  • (B) TLS certificates
  • (C) API keys
  • (D) All of the above

A

Admin • 828.43K Points
Coach

Q. Which Docker Swarm role has access to manage secrets?

  • (A) Worker node
  • (B) All nodes
  • (C) Manager node
  • (D) Client-only node

A

Admin • 828.43K Points
Coach

Q. Which of the following is a secure way to handle secrets in Docker?

  • (A) Storing in environment variables
  • (B) Including in Dockerfile
  • (C) Using Docker secrets
  • (D) Logging them to console

A

Admin • 828.43K Points
Coach

Q. What is the lifecycle of a Docker secret in Swarm?

  • (A) Tied to the container
  • (B) Deleted when service stops
  • (C) Exists until explicitly removed
  • (D) Expires in 24 hours

A

Admin • 828.43K Points
Coach

Q. Which file format is used to pass a secret to Docker?

  • (A) .yaml
  • (B) .env
  • (C) Plain text file
  • (D) JSON

A

Admin • 828.43K Points
Coach

Q. Can a single secret be used by multiple services?

  • (A) No
  • (B) Only in the same container
  • (C) Yes
  • (D) Only if they are on the same host

A

Admin • 828.43K Points
Coach

Q. What is required before using secrets in a service?

  • (A) Enable bridge network
  • (B) Enable Swarm mode
  • (C) Install Docker Compose
  • (D) Build a custom Docker image
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