Docker MCQs with answers Page - 23

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 kill' command?

  • (A) To forcefully stop running containers
  • (B) To gracefully stop running containers
  • (C) To delete containers
  • (D) To restart containers

A

Admin • 832.27K Points
Coach

Q. Which Docker command is used to pause a running container?

  • (A) docker stop container_name
  • (B) docker kill container_name
  • (C) docker pause container_name
  • (D) docker suspend container_name

A

Admin • 832.27K Points
Coach

Q. What is the purpose of Docker's 'ENTRYPOINT' instruction in a Dockerfile?

  • (A) To define the default command to run when a container starts
  • (B) To specify the image to use for the container
  • (C) To set environment variables for the container
  • (D) To define the working directory for the container

A

Admin • 832.27K Points
Coach

Q. Which of the following Docker commands is used to remove all unused data (containers, networks, images)?

  • (A) docker remove unused
  • (B) docker prune
  • (C) docker system prune
  • (D) docker clean

A

Admin • 832.27K Points
Coach

Q. Which of the following is true about Docker tags?

  • (A) Tags are used to identify a specific version of an image
  • (B) Tags are used to identify running containers
  • (C) Tags are used for container volume management
  • (D) Tags are not used in Docker

A

Admin • 832.27K Points
Coach

Q. Which command can be used to check the version of Docker installed?

  • (A) docker version
  • (B) docker --version
  • (C) docker info
  • (D) docker check version

A

Admin • 832.27K Points
Coach

Q. Which of the following is a valid Docker command to start a new container?

  • (A) docker create container_name
  • (B) docker start container_name
  • (C) docker run container_name
  • (D) docker deploy container_name

A

Admin • 832.27K Points
Coach

Q. Which file is used by Docker Compose to configure and manage multi-container applications?

  • (A) docker-compose.yml
  • (B) Dockerfile
  • (C) docker-run.yml
  • (D) compose-file.yml

A

Admin • 832.27K Points
Coach

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

  • (A) It displays detailed information about the Docker daemon and system
  • (B) It shows logs of a container
  • (C) It lists all Docker containers
  • (D) It provides information about Docker images

A

Admin • 832.27K Points
Coach

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

  • (A) docker rename container_name new_name
  • (B) docker container rename container_name new_name
  • (C) docker container change-name container_name new_name
  • (D) docker modify container_name new_name

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