Docker Networking MCQs with answers Page - 4

You will find multiple-choice questions (MCQs) related to #Docker Networking here. Go through these questions to prepare effectively for your upcoming exams and interviews.

To view the correct answer for any question, simply click the "Show Answer" button.

Have a question to share? Click on "Add Question" to contribute!

A

Admin • 828.03K Points
Coach

Q. Which type of Docker network allows container DNS resolution by name?

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

A

Admin • 828.03K Points
Coach

Q. Which file stores network configuration in Docker Compose?

  • (A) networks.yaml
  • (B) dockerfile
  • (C) compose.json
  • (D) docker-compose.yml

A

Admin • 828.03K Points
Coach

Q. Can a container be connected to multiple networks?

  • (A) Yes
  • (B) No
  • (C) Only in Swarm mode
  • (D) Only in Kubernetes

A

Admin • 828.03K Points
Coach

Q. What happens when you remove a Docker network in use?

  • (A) It is forcefully removed
  • (B) Docker stops all containers
  • (C) It gives an error
  • (D) It disconnects all containers

A

Admin • 828.03K Points
Coach

Q. Which of these drivers isolates the container with no network access?

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

A

Admin • 828.03K Points
Coach

Q. Which command disconnects a container from a network?

  • (A) docker network delete
  • (B) docker network disconnect
  • (C) docker container disconnect
  • (D) docker disconnect

A

Admin • 828.03K Points
Coach

Q. What is the purpose of the 'macvlan' driver in Docker?

  • (A) To share IPs with host
  • (B) To disable networking
  • (C) To assign containers MAC addresses and connect to physical network
  • (D) To isolate containers using host DNS

A

Admin • 828.03K Points
Coach

Q. Which Docker network mode allows direct container-to-container communication without port mapping?

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

A

Admin • 828.03K Points
Coach

Q. Which Docker network driver is used by default?

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

A

Admin • 828.03K Points
Coach

Q. Which Docker command is used to create a custom network?

  • (A) docker new network
  • (B) docker network create
  • (C) docker create network
  • (D) docker net new
What's Tag

As you may know, questions are organized under broad categories. Each category can include various types of questions. For example, the "History" category might contain questions about the Revolt of 1857, Shivaji Maharaj, Ancient History, Buddhism, and more.

To further refine this organization, we've introduced tags, which act as sub-categories to group questions more specifically.

Verified users can add tags to any question. If you have any suggestions regarding this system, we'd love to hear from you. Contact Us

Learn More