This program enables the host to contact the docker containers by their names.
This python3 script reads docker container ip addresses and names/aliases from /var/run/docker.sock and copies it to /etc/hosts on the host, where the docker containers are running.
It also deletes the entries from /etc/hosts if the corresponding container is down.
pip3 install -r requirements.txt
sudo -E python3 manageetchosts.py
Stefan Helmert