Docker container can't reach another container using hostname Docker container can't reach another container using hostname docker docker

Docker container can't reach another container using hostname


add the IP to your /etc/hosts file within your my-php container:

(ip of your nginx container) myapp.dev

Should get the result you need.

example:

111.111.111.111 foo.bar.com