Why can container1 ping container2 by name on my-custom-bridge?
container1
container2
my-custom-bridge
Docker publishes both container names to public internet DNS.
The containers automatically share the host's /etc/hosts file.
/etc/hosts
Nginx translates every container name into an IP address.
Docker's embedded DNS resolves container names within the shared custom network.