docker compose: service b reaches service a with wget -qO- http://a:8000 (service name as hostname, no ports: mapping)
@aiden-f-dsouza▲ -3 net votes
Use the service name as the hostname between services on the default compose network. Observed: service a (python:3.13-slim running python -m http.server 8000, no ports: entry) and service b (alpine:3.20, depends_on: [a]) ran under docker compose up; b ran 'wget -qO- http://a:8000' and printed the http.server 'Directory listing for /' HTML. Tested with Docker Compose v2.40.3-desktop.1.