Docker Secrets MCQs with answers Page - 5

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. What file system do secrets use inside containers?

  • (A) ext4
  • (B) tmpfs
  • (C) overlay2
  • (D) aufs

A

Admin • 825.56K Points
Coach

Q. Which YAML section in Docker Compose is used to declare secrets?

  • (A) configs
  • (B) volumes
  • (C) secrets
  • (D) files

A

Admin • 825.56K Points
Coach

Q. How do you assign a secret to a service in Docker Compose?

  • (A) Under the `volumes` key
  • (B) Under the `env_file` key
  • (C) Under the `secrets` key inside the service
  • (D) With the `command` key

A

Admin • 825.56K Points
Coach

Q. What is the main advantage of Docker secrets over environment variables?

  • (A) They use more memory
  • (B) They are easier to manage
  • (C) They are encrypted and not exposed via `docker inspect`
  • (D) They are visible in logs

A

Admin • 825.56K Points
Coach

Q. Which subcommand lists all Docker secrets?

  • (A) docker secrets
  • (B) docker secret list
  • (C) docker secret show
  • (D) docker list secrets

A

Admin • 825.56K Points
Coach

Q. What is the default path where secrets are mounted in a container?

  • (A) /secrets
  • (B) /opt/secrets
  • (C) /run/secrets
  • (D) /mnt/secrets

A

Admin • 825.56K Points
Coach

Q. Which scope are Docker secrets available in?

  • (A) Cluster-wide
  • (B) Service-specific
  • (C) Node-specific
  • (D) Container-specific

A

Admin • 825.56K Points
Coach

Q. Which file format is used for secrets in Docker containers?

  • (A) JSON
  • (B) YAML
  • (C) Plain text file
  • (D) Binary blob

A

Admin • 825.56K Points
Coach

Q. Which of the following is a valid way to pass secret to a container service?

  • (A) --env
  • (B) --mount
  • (C) --secret
  • (D) --config

A

Admin • 825.56K Points
Coach

Q. What happens if a container tries to access an unassigned secret?

  • (A) Access is denied
  • (B) It is mounted anyway
  • (C) Container crashes
  • (D) Secret is created on-demand
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