Docker Secrets MCQs with answers Page - 3

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. What is the purpose of Docker secrets?

  • (A) To manage Docker volumes
  • (B) To store sensitive data like passwords securely
  • (C) To encrypt Docker images
  • (D) To log Docker events

A

Admin • 828.43K Points
Coach

Q. Which Docker feature must be enabled to use secrets?

  • (A) Docker Engine
  • (B) Docker Compose
  • (C) Docker Swarm
  • (D) Docker Machine

A

Admin • 828.43K Points
Coach

Q. Where are Docker secrets stored on a node?

  • (A) /etc/docker/secrets
  • (B) In the image metadata
  • (C) In environment variables
  • (D) In RAM and never persisted to disk

A

Admin • 828.43K Points
Coach

Q. How can secrets be accessed inside a container?

  • (A) Through environment variables
  • (B) Via files mounted at /run/secrets/
  • (C) From a secret API endpoint
  • (D) Using the `docker secrets read` command

A

Admin • 828.43K Points
Coach

Q. What happens to Docker secrets when a container stops?

  • (A) They are saved for reuse
  • (B) They are written to disk
  • (C) They are lost immediately
  • (D) They are securely removed from memory

A

Admin • 828.43K Points
Coach

Q. Which command is used to create a new Docker secret?

  • (A) docker secret create
  • (B) docker secret init
  • (C) docker create secret
  • (D) docker secrets new

A

Admin • 828.43K Points
Coach

Q. Which of the following is a valid syntax to create a secret from a file?

  • (A) docker secret create my_secret < file.txt
  • (B) docker secret create file.txt my_secret
  • (C) docker secret add my_secret file.txt
  • (D) docker secret --add my_secret file.txt

A

Admin • 828.43K Points
Coach

Q. In which directory are secrets mounted inside a running container?

  • (A) /secrets
  • (B) /docker/secrets
  • (C) /etc/secrets
  • (D) /run/secrets

A

Admin • 828.43K Points
Coach

Q. Can a secret be used in a standalone Docker container?

  • (A) Yes, always
  • (B) Only on Linux hosts
  • (C) No, secrets are only supported in Docker Swarm mode
  • (D) Only if the container has root access

A

Admin • 828.43K Points
Coach

Q. What is the default file permission for Docker secrets inside containers?

  • (A) 0777
  • (B) 0644
  • (C) 0600
  • (D) 0400
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