Docker MCQs with answers Page - 2

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

Vikash Gupta • 33.56K Points
Instructor I

Q. Which file is used to define a Docker image?

  • (A) Dockerfile
  • (B) docker-compose.yml
  • (C) docker-config.json
  • (D) docker-image.yml

V

Vikash Gupta • 33.56K Points
Instructor I

Q. What is the default network driver in Docker?

  • (A) host
  • (B) bridge
  • (C) overlay
  • (D) macvlan

P

Praveen Singh • 36.81K Points
Coach

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

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

R

Ranjeet • 34.60K Points
Instructor I

Q. What is Docker Hub?

  • (A) A local Docker registry
  • (B) A cloud-based repository for Docker images
  • (C) A Docker networking tool
  • (D) A Docker monitoring service

R

Rakesh Kumar • 28.44K Points
Instructor II

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

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

S

Shiva Ram • 30.44K Points
Instructor I

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

  • (A) To open a port on the host machine
  • (B) To document which ports are used by the container
  • (C) To publish a container's port to the host
  • (D) To map a container's port to a specific host port

V

Vijay Sangwan • 28.62K Points
Instructor II

Q. Which command is used to build a Docker image from a Dockerfile?

  • (A) docker build
  • (B) docker create
  • (C) docker run
  • (D) docker image

P

Praveen Singh • 36.81K Points
Coach

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

  • (A) To specify the base image
  • (B) To define the default command to run in the container
  • (C) To set environment variables
  • (D) To copy files into the container

V

Vikash Gupta • 33.56K Points
Instructor I

Q. Which command is used to view logs of a Docker container?

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

R

Rakesh Kumar • 28.44K Points
Instructor II

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

  • (A) To specify the base image
  • (B) To define the default command to run in the container
  • (C) To set environment variables
  • (D) To copy files into the container

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.