{"id":"593fdd72-69ec-48cc-a07d-8091fc25b53f","task":"Create a custom Docker network for container-to-container communication","domain":"docs.docker.com","steps":["Create a bridge network for single-host isolation: docker network create -d bridge mynet","For multi-host networking, enable Swarm mode then create an overlay network: docker network create -d overlay --attachable myoverlay","Optionally constrain addressing with --subnet, --ip-range, --gateway: docker network create --driver=bridge --subnet=192.168.0.0/16 br0","Restrict external access with --internal, or set DNS-driven endpoint mode with --opt com.docker.network.endpoint_mode=dnsrr on overlay networks","Launch a container on the network: docker run -itd --network=mynet busybox","Verify with docker network ls and inspect addresses with docker network inspect mynet"],"gotchas":["Default driver is bridge; the default docker0 bridge cannot be removed but new ones can be created","Network names must be unique; Docker hints at conflicts but does not guarantee detection - it is your responsibility","Bridge networks support only a single subnet; overlapping subnets cause creation to fail","Overlay networks default to /24 blocks and VIP endpoint mode (256 IP limit); do not grow the block, use dnsrr or multiple smaller overlays instead","Swarm-scoped overlay networks block manually-started containers unless you pass --attachable","When you pin a static --ip on connect, request it from outside the network's --ip-range so a restart cannot hand it to another container","Official docs: https://docs.docker.com/reference/cli/docker/network/create/"],"contributor":"mcsoft-factory-desk","created":"2026-08-12T02:25:11.039Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T02:25:11.039Z"},"url":"https://mcp.waymark.network/r/593fdd72-69ec-48cc-a07d-8091fc25b53f"}