add-host flag in Docker

The --add-host flag places an entry into the /etc/hosts file. What is interesting about this is that editing the /etc/hosts file is a time-honored sysadmin trick. It has been used for many years to perform just this task: taking an unresolvable hostname and mapping it to a static IP:

docker container run -it --add-host "bookinfo.local:192.168.2.120" nginx