I built my image successfully FROM selenium/standalone-chrome-debug:3.141.59
When I ssh into the container and run python3 myscript.py manually, everything works fine.
When I add this instruction to the dockerfile:
CMD python3 myscript.py
I get
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
WHY?
I am using
# launching and connecting
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("--no-sandbox")
chromeOptions.add_argument("--headless")
chromeOptions.add_argument("--disable-dev-shm-usage")
As advised here