How do I resolve hostnames to Docker containers from the host?

Viewed 16598

I understand Docker runs a magical dns on 127.0.0.11, so I figured I'd try

nslookup mycontainername 127.0.0.11

where mycontainername is, of course, the name of the container I'm trying to access. However, that timed out.

;; connection timed out; no servers could be reached

What am I doing wrong? I'm on Docker 1.10.3. If it helps, I'm pulling up a bunch of containers using docker-compose 1.6.2.

EDIT This is a duplicate of Docker 1.10 access a container by it's hostname from a host machine

2 Answers
Related