Containers & Network Requests
some-api.com/
Requests from container to WWW
Requires a container
network
GET /some-api.com/
SQL Database Use host.docker.internal
<Your App> as address
Requests from container to
other container
Requests from container to host machine
Your Host Machine
Creating Container Networks
docker run --network my_network …
Network
Container 1 Container 2 Container 3
Within a Docker network, all containers can communicate with
each other and IPs are automatically resolved
Understanding Docker Network IP Resolving
Docker will NOT replace your
source code.
Requires a container It simply detects outgoing
network + use container requests and resolves the IP
name as address for such requests
GET /some-api.com/
SQL Database
Use host.docker.internal
<Your App>
as address
Requests from container to
other container
Requests from container to host machine
Your Host Machine