Docker Selenium: selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

My minimal test script for Selenium chromedriver inside my Docker container looks like this:

import selenium.webdriver

options = selenium.webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')

driver = selenium.webdriver.Chrome(chrome_options=options)
driver.get('https://www.python.org/')
print(driver.title)
driver.close()

So it looks like you're missing --headless and --no-sandbox arguments.

Did you not forget to add headless mode ?

chrome_options = Options()
chrome_options.add_argument("--headless")