Docker MCQs with answers Page - 9

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. What is a Docker registry?

  • (A) A tool for managing containers
  • (B) A server that stores and distributes Docker images
  • (C) A platform for deploying Docker containers
  • (D) A command to run Docker images

A

Admin • 831.35K Points
Coach

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

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

A

Admin • 831.35K Points
Coach

Q. What does the 'docker run' command do?

  • (A) Starts a new container from an image
  • (B) Builds a Docker image
  • (C) Lists all running containers
  • (D) Removes a container

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the Docker 'volume' feature?

  • (A) To allocate CPU resources to containers
  • (B) To persist data in containers across restarts
  • (C) To manage network configurations
  • (D) To configure container memory

A

Admin • 831.35K Points
Coach

Q. Which command is used to see the logs of a running Docker container?

  • (A) docker logs
  • (B) docker show logs
  • (C) docker ps
  • (D) docker stats

A

Admin • 831.35K Points
Coach

Q. Which of the following commands is used to list Docker images?

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

A

Admin • 831.35K Points
Coach

Q. What is the purpose of a Dockerfile?

  • (A) To configure the host machine for Docker
  • (B) To define the steps required to build a Docker image
  • (C) To deploy Docker containers
  • (D) To set environment variables in containers

A

Admin • 831.35K Points
Coach

Q. How do you start a container in the background (detached mode)?

  • (A) docker run -d
  • (B) docker start -d
  • (C) docker container run -d
  • (D) docker exec -d

A

Admin • 831.35K Points
Coach

Q. Which command is used to view running containers in Docker?

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

A

Admin • 831.35K Points
Coach

Q. How can you stop a running Docker container?

  • (A) docker stop
  • (B) docker halt
  • (C) docker end
  • (D) docker terminate

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