0
0
Dockerdevops~10 mins

Why custom networks matter in Docker - Test Your Understanding

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

Complete the command to create a custom Docker network named 'mynetwork'.

Docker
docker network [1] mynetwork
Drag options to blanks, or click blank then click option'
Acreate
Bstart
Crun
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' instead of 'create' will try to start a container, not create a network.
2fill in blank
medium

Complete the command to run a container named 'webapp' attached to the custom network 'mynetwork'.

Docker
docker run --name webapp --network [1] nginx
Drag options to blanks, or click blank then click option'
Anone
Bbridge
Chost
Dmynetwork
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bridge' connects to the default network, not the custom one.
3fill in blank
hard

Fix the error in the command to inspect the custom network 'mynetwork'.

Docker
docker network [1] mynetwork
Drag options to blanks, or click blank then click option'
Aremove
Binspect
Clist
Dconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' shows all networks, not details of one.
4fill in blank
hard

Fill both blanks to create a custom bridge network with a specific subnet.

Docker
docker network create --driver [1] --subnet [2]/24 customnet
Drag options to blanks, or click blank then click option'
Abridge
Bhost
C192.168.100.0
D10.0.0.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'host' driver does not support subnet configuration.
5fill in blank
hard

Fill both blanks to connect a running container 'db' to the custom network 'customnet' with alias 'database'.

Docker
docker network [1] --alias [2] customnet db
Drag options to blanks, or click blank then click option'
Aconnect
Bcontainer
Cdatabase
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' tries to start a new container instead of connecting an existing one.