0
0
Dockerdevops~10 mins

Network drivers (bridge, host, overlay, none) in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to create a Docker container using the default network driver.

Docker
docker run --rm -it --network [1] alpine sh
Drag options to blanks, or click blank then click option'
Abridge
Bnone
Coverlay
Dhost
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'host' which uses the host's network directly.
2fill in blank
medium

Complete the command to run a container that shares the host's network stack.

Docker
docker run --rm -it --network [1] nginx
Drag options to blanks, or click blank then click option'
Aoverlay
Bnone
Chost
Dbridge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bridge' which isolates container network from host.
3fill in blank
hard

Fix the error in the command to create a multi-host Docker network.

Docker
docker network create -d [1] mynet
Drag options to blanks, or click blank then click option'
Ahost
Boverlay
Cbridge
Dnone
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bridge' which works only on a single host.
4fill in blank
hard

Fill both blanks to create a container with no network access.

Docker
docker run --rm -it --network [1] alpine sh -c "ping [2]"
Drag options to blanks, or click blank then click option'
Anone
B127.0.0.1
Cgoogle.com
Dbridge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bridge' network which allows external access.
5fill in blank
hard

Fill all three blanks to create an overlay network and run a container attached to it.

Docker
docker network create -d [1] my_overlay_net && docker run --rm -it --network [2] alpine sh -c "ip addr show [3]"
Drag options to blanks, or click blank then click option'
Aoverlay
Bmy_overlay_net
Ceth0
Dbridge
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bridge' driver for multi-host network.