Docker sq
Docker Fundamentals - Getting Started

User Defined Networks

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

User Defined Networks

Use the command docker network ls to list all available networks on your system. You should see the bridge network in the list. This is the default network and the one used by docker if you don't specify a network.

You can create a network using the command docker network create [NAME-OF-NETWORK-HERE].

To create a container and attach it to the network use the command docker container run --rm -it --name [NAME-OF-CONTAINER-HERE] --network [NAME-OF-NETWORK-HERE] alpine sh.

Any container on the same network can talk to any other container on the network by using the ping [NAME-OF-CONTAINER-HERE] command.

You need to be a Pro subscriber to see this content

 

I finished! On to the next chapter