I've an application that uses custom hosts. For example user1.app user2.app user3.app.
In a traditional dev environment running on my computer I add all those entries to /etc/hosts file pointing to 127.0.0.1
For automatic testing purpose I need that a single docker container is referenced with multiple host using docker-compose.
On docker-compose each service receive a hostname as the service name and I can ping to other containers using the service name, but how I can give a container multiple hostnames?
The --add-host or extra_host doesn't seems to be the solution because I don't know the docker ip address that will be used for that service.