When I pull an image and start a container, ex:
docker run --name test --hostname test -ti centos
Then, from the docker host machine, I can ping to docker container IP:
But not by container hostname
ping: unknown host test
How can you do so that the host knows the name of a container?
Without add manually this entry inside /etc/hosts of the docker host machine.