Docker MCQs with answers Page - 65

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. Which Docker mode is required to use Docker configs?

  • (A) Standalone mode
  • (B) Compose mode
  • (C) Swarm mode
  • (D) Bridge mode

A

Admin • 833K Points
Coach

Q. How do you create a Docker config?

  • (A) docker config create <name> <file>
  • (B) docker config add <name> <value>
  • (C) docker create config <name> <file>
  • (D) docker-compose config create <name> <file>

A

Admin • 833K Points
Coach

Q. Can Docker configs be updated after being attached to a service?

  • (A) Yes, they update automatically
  • (B) No, they are immutable
  • (C) Yes, using docker config update
  • (D) Yes, if the container is restarted

A

Admin • 833K Points
Coach

Q. Which command lists all Docker configs?

  • (A) docker config ls
  • (B) docker config list
  • (C) docker list configs
  • (D) docker configs show

A

Admin • 833K Points
Coach

Q. What is the difference between Docker secrets and Docker configs?

  • (A) Configs are for sensitive data, secrets are not
  • (B) Secrets are versioned, configs are not
  • (C) Secrets are encrypted, configs are not
  • (D) There is no difference

A

Admin • 833K Points
Coach

Q. Which of the following is true about configs and services?

  • (A) Configs must be manually copied into containers
  • (B) Configs are accessible via environment variables
  • (C) Configs can be mounted as files in the container
  • (D) Configs can only be used with Docker volumes

A

Admin • 833K Points
Coach

Q. What happens if a service is updated with a new config?

  • (A) The config is merged with the old one
  • (B) The old config is modified
  • (C) The old config is deleted
  • (D) A new config must be created and the service updated

A

Admin • 833K Points
Coach

Q. Which of the following file types is commonly stored in Docker configs?

  • (A) .zip
  • (B) .tar.gz
  • (C) .conf
  • (D) .pem

A

Admin • 833K Points
Coach

Q. What does the command `docker config inspect <config_name>` do?

  • (A) Edits the config
  • (B) Deletes the config
  • (C) Displays the config metadata and content
  • (D) Downloads the config

A

Admin • 833K Points
Coach

Q. Which option is required when using configs in `docker service create`?

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

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ