Get List of Docker Networks

Get List of Docker Networks

Docker networking is basically used to establish communication between Docker containers and the outside of Docker with external networks via host machine. This tutorial demonstrates how to get Docker networks.

Get list of networks

To get a list of networks, use docker network command with ls argument:

docker network ls

Output example:

NETWORK ID     NAME      DRIVER    SCOPE
60fc65c29900   bridge    bridge    local
9d6f878bc650   host      host      local
7ed1d9d32d66   none      null      local

In our case, presented networks are created during standard installation of Docker. Newly created networks will show up in the output of command as well.

Get list of networks with full length IDs

By default, network IDs are truncated. The --no-trunc option can be used to show not truncated IDs:

docker network ls --no-trunc

Output example:

NETWORK ID                                                         NAME      DRIVER    SCOPE
60fc65c2990090980893eed3626f0c7be525ad43cd7c973a427cf1ba3e58e8fe   bridge    bridge    local
9d6f878bc650ec894ec2da3d19bd31ea7acda95633bfce80a6f2935b6aa75d16   host      host      local
7ed1d9d32d66e2aba821ab78befcef41a9f99be7b90fc18e3873755e41698dfc   none      null      local

Leave a Comment

Cancel reply

Your email address will not be published.