Docker Secrets MCQs with answers Page - 4

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. Which of the following best describes a Docker secret?

  • (A) Encrypted environment variable
  • (B) Encrypted file mounted inside a container
  • (C) Image label containing credentials
  • (D) Temporary Docker volume

A

Admin • 828.43K Points
Coach

Q. Can you update the contents of a Docker secret directly?

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

A

Admin • 828.43K Points
Coach

Q. What command lists all Docker secrets in a Swarm?

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

A

Admin • 828.43K Points
Coach

Q. What happens when a secret is deleted using Docker CLI?

  • (A) It remains in use until manually removed from containers
  • (B) It is removed from all services using it
  • (C) It is automatically re-created on next restart
  • (D) It remains encrypted in Docker cache

A

Admin • 828.43K Points
Coach

Q. Which of these best practices is recommended when working with secrets?

  • (A) Pass secrets as environment variables
  • (B) Mount secrets as volumes
  • (C) Access secrets via mounted files only
  • (D) Store secrets in image ENV instructions

A

Admin • 828.43K Points
Coach

Q. How are secrets encrypted in Docker?

  • (A) With TLS encryption at rest
  • (B) With symmetric encryption using AES
  • (C) With public-key encryption
  • (D) Using base64 encoding

A

Admin • 828.43K Points
Coach

Q. Which role has access to secrets on a Docker Swarm manager node?

  • (A) Any Docker user
  • (B) Only root
  • (C) Only the Docker daemon
  • (D) Docker group users

A

Admin • 828.43K Points
Coach

Q. How do you provide multiple secrets to a service in Docker?

  • (A) Use a comma-separated list
  • (B) Add multiple `--secret` flags
  • (C) Use a secrets bundle
  • (D) Use a YAML config file

A

Admin • 828.43K Points
Coach

Q. Can secrets be shared across multiple services in Docker?

  • (A) Yes, without restriction
  • (B) Only if they are redefined
  • (C) Yes, if explicitly attached to each service
  • (D) No, secrets are service-specific

A

Admin • 828.43K Points
Coach

Q. Can secrets be accessed by a non-root user inside the container?

  • (A) Yes, if the user has read permission
  • (B) No, secrets are always root-only
  • (C) Yes, via environment variables
  • (D) No, they must be copied manually
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