Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Containers within the same network can communicate with each other. Docker creates a bridge network called the bridge.

Command

Purpose

docker network ls

Show all the available networks. Check that the bridge network is running

Start your containers as normal, with docker run. When you start each container, Docker will add it to the bridge network.

(If you prefer, you can be explicit about the network connection by adding --net=bridge to the docker run command.)

docker inspect <container_id> | grep IPAddress

How do you find out the IP address of a Docker container?

Once you have the container IP address, one container can Address another container by its IP address

docker network inspect bridge

How to check if a container is in the bridge network

All the containers listed can communicate with each other

  • No labels