I am using docker-compose and docker. everything works great. but the only way to access a service from the host machine is by http://localhost:port. i would like to be able to access by using the container name like: http://elastic:9020.
It works well inside the docker. if one container needs to access another i can use the http://elastic:9020 but not from the Host. Of Course that i am exposing the ports and using port mapping and it works using localhost as i said. Docker
UPDATE: I was looking for a native solution without the needs of installing DNS Server or updating the .host file.