Docker MCQs with answers Page - 18

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 of the following Docker commands is used to view the history of an image?

  • (A) docker history image_name
  • (B) docker image history image_name
  • (C) docker inspect image_name
  • (D) docker logs image_name

A

Admin • 832.27K Points
Coach

Q. Which of the following is NOT a valid Docker command?

  • (A) docker list
  • (B) docker ps
  • (C) docker images
  • (D) docker rmi

A

Admin • 832.27K Points
Coach

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

  • (A) Displays logs of a specific container
  • (B) Shows the logs of all services defined in a Docker Compose file
  • (C) Starts a service in a detached mode
  • (D) Stops a service in a Docker Compose application

A

Admin • 832.27K Points
Coach

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

  • (A) To add metadata to a Docker image
  • (B) To create a new container
  • (C) To rename a Docker image
  • (D) To assign a version or tag to a Docker image

A

Admin • 832.27K Points
Coach

Q. Which command is used to push a Docker image to Docker Hub?

  • (A) docker upload
  • (B) docker push
  • (C) docker publish
  • (D) docker send

A

Admin • 832.27K Points
Coach

Q. What is the purpose of the 'docker system prune' command?

  • (A) To remove all Docker images
  • (B) To clean up unused Docker objects (images, containers, networks, etc.)
  • (C) To stop all running containers
  • (D) To delete all Docker volumes

A

Admin • 832.27K Points
Coach

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

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

A

Admin • 832.27K Points
Coach

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

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

A

Admin • 832.27K Points
Coach

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

  • (A) To view resource usage statistics of running containers
  • (B) To list all Docker images
  • (C) To inspect Docker volumes
  • (D) To monitor Docker Hub activity

A

Admin • 832.27K Points
Coach

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

  • (A) docker network rm
  • (B) docker rm network
  • (C) docker delete network
  • (D) docker network delete

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