0
0
Dockerdevops~5 mins

Creating custom bridge networks in Docker - Quick Revision & Summary

Choose your learning style9 modes available
Recall & Review
beginner
What is a custom bridge network in Docker?
A custom bridge network is a user-defined network that allows Docker containers to communicate with each other on the same host with isolated network settings.
Click to reveal answer
beginner
Which Docker command creates a custom bridge network named 'my_bridge'?
docker network create --driver bridge my_bridge
Click to reveal answer
intermediate
Why use a custom bridge network instead of the default bridge network?
Custom bridge networks provide better isolation, allow container name resolution, and enable easier management of container communication.
Click to reveal answer
beginner
How do containers communicate on a custom bridge network?
Containers on the same custom bridge network can communicate using container names as hostnames, simplifying service discovery.
Click to reveal answer
intermediate
What happens if you try to connect a container to a non-existent custom bridge network?
Docker will return an error saying the network does not exist, and the container will not start or connect until the network is created.
Click to reveal answer
Which command creates a custom bridge network in Docker?
Adocker create network bridge my_network
Bdocker network create --driver bridge my_network
Cdocker network new bridge my_network
Ddocker bridge create my_network
What is the default driver used when creating a custom bridge network?
Anone
Boverlay
Chost
Dbridge
How can containers on a custom bridge network communicate with each other?
AOnly through published ports
BUsing container IP addresses only
CUsing container names as hostnames
DThey cannot communicate
What command lists all Docker networks including custom bridge networks?
Adocker network ls
Bdocker network show
Cdocker network list all
Ddocker networks
What happens if you remove a custom bridge network while containers are connected to it?
AContainers lose network connectivity and may stop
BDocker automatically reconnects containers to default network
CNothing happens
DContainers keep running and stay connected
Explain how to create and use a custom bridge network in Docker.
Think about the command to create the network and how containers talk to each other on it.
You got /4 concepts.
    Describe the benefits of using a custom bridge network over the default Docker bridge network.
    Consider what problems the default network might have that a custom one solves.
    You got /4 concepts.