Docker Network Introduction
整理一下常见的 Docker Network 操作 Default Bridge Network After a fresh Docker installation, you can find a default bridge network up and running. docker network ls Docker uses a software-based bridge network that allows containers connected to the same bridge network to communicate while isolating them from other containers not running in the same bridge network. docker run -dit --name busybox1 busybox docker run -dit --name busybox2 busybox docker inspect busybox1 | jq -r ' [0].NetworkSettings.IPAddress' docker inspect busybox2 | jq -r '.[0].NetworkSettings.IPAddress' # OK docker exec -it busybox2 ping 172.17.0.3 # Error docker exec -it busybox2 ping busybox1 Conclusion All containers will automatically connect to this default bridge network. Default bridge network allows container communication using IP addresses. ...