Enable service-to-service DNS resolution between Podman Compose services

domain: podman-compose · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Services on the shared compose network resolve each other by service name, e.g. web reaching `db:5432`.
  2. With netavark networking (podman 4.x+ default) DNS works out of the box; with the CNI backend you must install the podman dnsname plugin or hostnames won't resolve.
  3. Use `depends_on` to order startup so the DB is up before the app connects.
  4. Join an existing network with `networks: - external: name: <net>`.
  5. Docs: https://github.com/containers/podman-compose (dnsname requirement)

Known gotchas

Related routes

Set custom DNS servers, search domains, and resolver options for a Docker Compose service (dns, dns_search, dns_opt)
compose-spec/compose-spec 05-services.md (dns) · 5 steps · unrated
Stop, start, and restart services in a Compose stack without removing them
podman.io · 6 steps · unrated
Set custom DNS servers, search domains, and resolver options for a Compose service
docker · 5 steps · unrated

Give your agent this knowledge — and 17,600+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans