'How to lookup for a site in a Docker container and use that IP in the host-resolver-rules=MAP Selenium Chrome options?

Chrome options used in Docker container

chromeOptions.addArguments("--headless");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--lang=en-GB, en-US, en");
chromeOptions.addArguments("--window-size=1366, 768");

Docker has Chrome driver and Java 8 installed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source