Docker Community Forums

Share and learn in the Docker community.

/etc/hosts entry linked to another container IP


(Kelemen) #1

i have 2 container, 1 for nginx and 1 for php-fpm. On host machine i have web application files. I have created some vhosts on nginx container (eg.,, …).

When i try to call curl (from my web application) to any vhost i got error (unresolved host). I need add new lines to /etc/hosts on my php container linked to nginx container IP.


It is possible to configure something like this in docker-compose file?