Docker MCQs with answers Page - 64

Here, you will find a collection of MCQ questions on Docker. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K 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 • 833K 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 • 833K 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 • 833K 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 • 833K 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 • 833K 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 • 833K 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 • 833K 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

A

Admin • 833K Points
Coach

Q. Which of the following is NOT true about Docker secrets?

  • (A) They are encrypted in transit
  • (B) They can be updated directly
  • (C) They are mounted as read-only files
  • (D) They require Docker Swarm

A

Admin • 833K Points
Coach

Q. What is the purpose of Docker configs?

  • (A) To store encrypted passwords
  • (B) To manage application source code
  • (C) To store non-sensitive configuration data
  • (D) To log container output