Docker MCQs with answers Page - 14

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

Q. Which of the following is used to store persistent data outside of containers?

  • (A) Volumes
  • (B) Containers
  • (C) Dockerfile
  • (D) Images

A

Admin • 832.01K Points
Coach

Q. Which of the following commands is used to rebuild an image in Docker?

  • (A) docker rebuild
  • (B) docker image build
  • (C) docker build
  • (D) docker rebuild image

A

Admin • 832.01K Points
Coach

Q. Which Docker command is used to get the stats of running containers?

  • (A) docker status
  • (B) docker stats
  • (C) docker info
  • (D) docker system

A

Admin • 832.01K Points
Coach

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

  • (A) bridge
  • (B) macvlan
  • (C) host
  • (D) All of the above

A

Admin • 832.01K Points
Coach

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

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

A

Admin • 832.01K Points
Coach

Q. What is the default location where Docker stores images and containers on Linux?

  • (A) /var/lib/docker
  • (B) /etc/docker
  • (C) /usr/local/docker
  • (D) /docker

A

Admin • 832.01K Points
Coach

Q. Which of the following commands is used to stop a running container?

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

A

Admin • 832.01K Points
Coach

Q. How do you get information about a specific Docker image?

  • (A) docker image inspect image_name
  • (B) docker inspect image_name
  • (C) docker info image_name
  • (D) docker image details image_name

A

Admin • 832.01K Points
Coach

Q. How can you limit the CPU usage of a Docker container?

  • (A) --cpu-shares
  • (B) --cpus
  • (C) --cpu-limit
  • (D) --cpu

A

Admin • 832.01K Points
Coach

Q. What does the 'docker-compose.yml' file define?

  • (A) The specifications and configuration for a multi-container Docker application
  • (B) A single container configuration
  • (C) The Dockerfile for building an image
  • (D) A script for stopping containers

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