Docker MCQs with answers Page - 3

Dear candidates you will find MCQ questions of Docker here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

V

Vijay Sangwan • 28.62K Points
Instructor II

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

  • (A) docker pull
  • (B) docker fetch
  • (C) docker download
  • (D) docker get

R

Ram Sharma • 193.86K Points
Coach

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

  • (A) To create a persistent data volume
  • (B) To mount a host directory into the container
  • (C) To define a network volume
  • (D) To specify a shared volume between containers

V

Vijay Sangwan • 28.62K Points
Instructor II

Q. Which command is used to list all Docker images on the local machine?

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

A

Admin • 36.96K Points
Coach

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

  • (A) To set the working directory for subsequent instructions
  • (B) To define the user for running commands
  • (C) To specify the base image
  • (D) To copy files into the container

G

Gopal Sharma • 38.32K Points
Coach

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

  • (A) docker rmi
  • (B) docker remove
  • (C) docker delete
  • (D) docker erase

G

Gopal Sharma • 38.32K Points
Coach

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

  • (A) To copy files from the host to the container
  • (B) To copy files between containers
  • (C) To copy files from the container to the host
  • (D) To create a backup of the container

G

Gopal Sharma • 38.32K Points
Coach

Q. Which command is used to start a stopped Docker container?

  • (A) docker start
  • (B) docker run
  • (C) docker create
  • (D) docker launch

P

Praveen Singh • 36.81K Points
Coach

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

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

R

Ranjeet • 34.60K Points
Instructor I

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

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

V

Vikash Gupta • 33.56K Points
Instructor I

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

  • (A) To define the user for running commands
  • (B) To set environment variables
  • (C) To specify the working directory
  • (D) To copy files into the container

Loding content...

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.