Lesson 17 / 28

Container-to-Host Communication

Reach services on your host from a container, and remember that localhost inside a container means the container.

host.docker.internal

From inside a container, localhost refers to the container itself, not your host machine. Use the special DNS name host.docker.internal to reach services running on your host.