Docker MCQs with answers Page - 19

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. What is the purpose of the 'docker-compose down' command?

  • (A) To stop and remove containers, networks, and volumes defined in a docker-compose.yml file
  • (B) To build Docker images
  • (C) To push images to Docker Hub
  • (D) To list running containers

A

Admin • 832.27K Points
Coach

Q. Which command is used to list all Docker volumes?

  • (A) docker volume ls
  • (B) docker list volumes
  • (C) docker inspect volumes
  • (D) docker volumes

A

Admin • 832.27K Points
Coach

Q. What is the purpose of the 'docker save' command?

  • (A) To save a Docker image as a tar archive
  • (B) To save a container's state
  • (C) To back up Docker volumes
  • (D) To export Docker logs

A

Admin • 832.27K Points
Coach

Q. Which command is used to load a Docker image from a tar archive?

  • (A) docker load
  • (B) docker import
  • (C) docker restore
  • (D) docker extract

A

Admin • 832.27K Points
Coach

Q. What is the purpose of the 'docker-compose build' command?

  • (A) To start containers defined in a docker-compose.yml file
  • (B) To build Docker images defined in a docker-compose.yml file
  • (C) To push images to Docker Hub
  • (D) To stop running containers

A

Admin • 832.27K Points
Coach

Q. Which command is used to view detailed information about a Docker volume?

  • (A) docker volume inspect
  • (B) docker inspect volume
  • (C) docker volume info
  • (D) docker volume details

A

Admin • 832.27K Points
Coach

Q. What is the purpose of the 'docker-compose logs' command?

  • (A) To view logs of containers defined in a docker-compose.yml file
  • (B) To list all Docker images
  • (C) To inspect Docker networks
  • (D) To monitor Docker Hub activity

A

Admin • 832.27K Points
Coach

Q. What is the purpose of Docker containers?

  • (A) To isolate applications and their dependencies from the host system
  • (B) To manage the Docker host
  • (C) To store Docker images
  • (D) To create virtual machines

A

Admin • 832.27K Points
Coach

Q. Which Docker command is used to remove all stopped containers?

  • (A) docker prune
  • (B) docker rm -f $(docker ps -a -q)
  • (C) docker container rm $(docker ps -a -q)
  • (D) docker remove -a

A

Admin • 832.27K Points
Coach

Q. Which Docker command is used to show running containers?

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

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