Docker MCQs with answers Page - 4

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

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

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

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the ARG instruction in a Dockerfile?

  • (A) To define build-time variables
  • (B) To set environment variables
  • (C) To specify the working directory
  • (D) To copy files into the container

A

Admin • 831.35K Points
Coach

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

  • (A) docker rename
  • (B) docker mv
  • (C) docker update
  • (D) docker modify

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the HEALTHCHECK instruction in a Dockerfile?

  • (A) To check the health of the container
  • (B) To define the base image
  • (C) To specify the working directory
  • (D) To copy files into the container

A

Admin • 831.35K Points
Coach

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

  • (A) docker pause
  • (B) docker stop
  • (C) docker halt
  • (D) docker freeze

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the LABEL instruction in a Dockerfile?

  • (A) To add metadata to the image
  • (B) To define the base image
  • (C) To specify the working directory
  • (D) To copy files into the container

A

Admin • 831.35K Points
Coach

Q. Which command is used to unpause a paused Docker container?

  • (A) docker unpause
  • (B) docker resume
  • (C) docker start
  • (D) docker continue

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the ONBUILD instruction in a Dockerfile?

  • (A) To trigger instructions when the image is used as a base for another image
  • (B) To define the base image
  • (C) To specify the working directory
  • (D) To copy files into the container

A

Admin • 831.35K Points
Coach

Q. Which command is used to view the history of a Docker image?

  • (A) docker history
  • (B) docker inspect
  • (C) docker logs
  • (D) docker info

A

Admin • 831.35K Points
Coach

Q. What is the purpose of the STOPSIGNAL instruction in a Dockerfile?

  • (A) To specify the signal to stop the container
  • (B) To define the base image
  • (C) To specify the working directory
  • (D) To copy files into the container

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