Docker Networking

When running a container, the -p option maps a port on the host to a port on the
container being run. If no port mappings are specified the container is still accessible, but only from
the host running the Docker daemon. Docker handles a collection of networks; the default one is
named ‘bridge’, and will allow containers running on the same machine to communicate. You can
inspect this network by running the following command:
docker network inspect bridge
This will print out the details of the bridge network, and within that the IPs of containers running on
it. You can read more about Docker networking here: https://docs.docker.com/network/.

Comments