Reverse_proxy docker

Just logging the docker inspect here. Caddy, couchdb and keycloak look to be in the same network.
{ "Name": "bridge", "Id": "92126a5c42005423ea7929bd04bcae5dc3eb100f1a6562cdb5872c4c61ef5cbf", "Created": "2021-04-03T10:03:59.9176206Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "172.17.0.0/16", "Gateway": "172.17.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "49bb3af9c8c6cffce6b60efb539b05030e5e67012c556872fbe6686399dcdb0a": { "Name": "keycloak", "EndpointID": "70e07a4ce79dfdb7a048a3ab2e9821f7fc68fbfa4c6bd108b6ea16be18df44ff", "MacAddress": "02:42:ac:11:00:02", "IPv4Address": "172.17.0.2/16", "IPv6Address": "" }, "d4af3e9181beab529ab63e94be1f7450342d17431ddf0f3d0c5e982b674eeb58": { "Name": "caddy", "EndpointID": "cf2147a9627ef0163b7d891876158f0367f850f4d2eb5d95a1e7b515cf71426a", "MacAddress": "02:42:ac:11:00:04", "IPv4Address": "172.17.0.4/16", "IPv6Address": "" }, "d8866344963215b375417291d61d37b7cebef04f86bb803418036732a495b934": { "Name": "couchdb", "EndpointID": "60a3f4953981ec08819f66aba537710b5c04f55e6c5133257fc4d23d1f220eb8", "MacAddress": "02:42:ac:11:00:03", "IPv4Address": "172.17.0.3/16", "IPv6Address": "" } }, "Options": { "com.docker.network.bridge.default_bridge": "true", "com.docker.network.bridge.enable_icc": "true", "com.docker.network.bridge.enable_ip_masquerade": "true", "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", "com.docker.network.bridge.name": "docker0", "com.docker.network.driver.mtu": "1500" }, "Labels": {} }

Then tried networking from inside the Caddy container.
/srv # nc -zv couchdb 5984 nc: bad address 'couchdb' /srv # nc -zv 172.17.0.3 5984 172.17.0.3 (172.17.0.3:5984) open /srv # nc -zv keycloak 5984 nc: bad address 'keycloak' /srv # nc -zv 172.17.0.2 8080 172.17.0.2 (172.17.0.2:8080) open
So it comes down to resolution of the service names as everything else works.
/srv # ping couchdb ping: bad address 'couchdb' /srv # ping 172.17.0.3 PING 172.17.0.3 (172.17.0.3): 56 data bytes 64 bytes from 172.17.0.3: seq=0 ttl=64 time=0.084 ms /srv # ping google.com PING google.com (216.58.214.14): 56 data bytes 64 bytes from 216.58.214.14: seq=0 ttl=112 time=2.387 ms

Will ultimately try rinse and redo with docker compose although i want to understand if the lookup can not be fixed. Sorry to burden the caddy forum with this docker issue… comments received already much appreciated!