Technically, you should be able to share a domain socket via a shared volume too (between an "app" and "web" container) - as with postgres:
https://github.com/sameersbn/docker-postgresql/issues/30#iss...
Curious about benchmarks and tests of TCP vs Unix domain sockets between docker containers.