Menu
Coddy logo textTech

Networks

Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 31 of 40.

Docker uses networks to control how containers talk to each other and to the outside world. List the existing networks with docker network ls:

docker network ls

Every Docker setup starts with three built-in networks: bridge (the default), host, and none. You can create your own network for a group of containers to share:

docker network create mynet

The three built-in networks are protected: Docker will refuse to remove them, because the system depends on them.

challenge icon

Challenge

Beginner

Create a network named backend, then list all networks to confirm both your network and the built-in bridge network are present.

Cheat sheet

Docker networks control how containers communicate with each other and the outside world.

List existing networks:

docker network ls

Create a custom network:

docker network create mynet

Every Docker setup includes three built-in networks: bridge (default), host, and none. These cannot be removed.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction to Docker