Docker MCQs with answers Page - 12

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 • 831.35K Points
Coach

Q. Which of the following is the default storage driver for Docker?

  • (A) aufs
  • (B) overlay2
  • (C) devicemapper
  • (D) btrfs

A

Admin • 831.35K Points
Coach

Q. How do you list all Docker images available on your local machine?

  • (A) docker images
  • (B) docker list images
  • (C) docker image list
  • (D) docker show images

A

Admin • 831.35K Points
Coach

Q. Which command removes a Docker volume?

  • (A) docker volume rm
  • (B) docker volume delete
  • (C) docker volume remove
  • (D) docker rm volume

A

Admin • 831.35K Points
Coach

Q. Which of the following is a valid Docker network driver?

  • (A) bridge
  • (B) host
  • (C) overlay
  • (D) all of the above

A

Admin • 831.35K Points
Coach

Q. What does the '--rm' flag do when running a Docker container?

  • (A) Removes the container when it stops
  • (B) Runs the container in detached mode
  • (C) Rebuilds the image every time
  • (D) Maps the container port to a host port

A

Admin • 831.35K Points
Coach

Q. Which of the following commands is used to start an existing Docker container?

  • (A) docker start
  • (B) docker restart
  • (C) docker run
  • (D) docker exec

A

Admin • 831.35K Points
Coach

Q. What does the 'docker ps' command display?

  • (A) The list of all Docker containers
  • (B) The list of running Docker containers
  • (C) The list of all Docker images
  • (D) The list of Docker volumes

A

Admin • 831.35K Points
Coach

Q. Which command is used to remove a Docker image?

  • (A) docker rmi
  • (B) docker rm
  • (C) docker delete
  • (D) docker remove

A

Admin • 831.35K Points
Coach

Q. Which of the following is a valid Docker command to list running containers?

  • (A) docker list
  • (B) docker ps
  • (C) docker status
  • (D) docker containers

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the '--name' flag in 'docker run'?

  • (A) To assign a specific name to a container
  • (B) To specify the image name
  • (C) To specify the network
  • (D) To map ports between host and container

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