Docker MCQs with answers Page - 17

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.27K Points
Coach

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

  • (A) docker stop container_name
  • (B) docker kill container_name
  • (C) docker terminate container_name
  • (D) docker halt container_name

A

Admin • 832.27K Points
Coach

Q. What is the default mode in which 'docker-compose' runs?

  • (A) Detached
  • (B) Foreground
  • (C) Interactive
  • (D) Automated

A

Admin • 832.27K Points
Coach

Q. Which of the following commands is used to build a Docker image from a Dockerfile?

  • (A) docker create
  • (B) docker build
  • (C) docker run
  • (D) docker image build

A

Admin • 832.27K Points
Coach

Q. Which of the following commands lists all the Docker networks?

  • (A) docker network ls
  • (B) docker networks list
  • (C) docker net show
  • (D) docker list networks

A

Admin • 832.27K Points
Coach

Q. Which of the following commands is used to remove a Docker volume?

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

A

Admin • 832.27K Points
Coach

Q. Which of the following is the default network driver in Docker?

  • (A) host
  • (B) bridge
  • (C) overlay
  • (D) macvlan

A

Admin • 832.27K Points
Coach

Q. What does the 'docker ps -a' command show?

  • (A) The list of all containers, including stopped ones
  • (B) The list of all images on the host
  • (C) The list of all volumes
  • (D) The list of running containers

A

Admin • 832.27K Points
Coach

Q. Which Docker command is used to build images from a Dockerfile?

  • (A) docker build -t image_name .
  • (B) docker create -t image_name .
  • (C) docker run -t image_name .
  • (D) docker image build -t image_name .

A

Admin • 832.27K Points
Coach

Q. What is the function of a Docker registry?

  • (A) To store and distribute Docker images
  • (B) To monitor the health of Docker containers
  • (C) To manage Docker networks
  • (D) To manage container volumes

A

Admin • 832.27K Points
Coach

Q. What is the default location for Docker configuration files on Linux?

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

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