title: 'chromedriver' executable needs to be in PATH using Docker
body: <p>I have a following problem.</p>
  <p>In my <code>scrape.py</code> I set WebDriver using a function nastav_driver():</p>
  <pre><code>from selenium import webdriver
  from selenium.common.exceptions import NoSuchElementException
  from selenium.webdriver.chrome.webdriver import WebDriver
  
  import utils
  
  
  def nastav_driver() -&gt; WebDriver:
      options = webdriver.ChromeOptions()
      options.add_argument(&quot;--start-maximized&quot;)
      driver = webdriver.Chrome(utils.PATH_CHROMIUM, options=options)
      return driver
  </code></pre>
  <p>where <code>utils.PATH_CHROMIUM</code> is <code>/usr/lib/chromium-browser/chromedriver</code>. When I run the script, everything is OK. But When I run a docker image using <code>sudo docker run python:0.0.1 </code> I got this error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/common/service.py&quot;, line 72, in start
      self.process = subprocess.Popen(cmd, env=self.env,
    File &quot;/usr/local/lib/python3.10/subprocess.py&quot;, line 966, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File &quot;/usr/local/lib/python3.10/subprocess.py&quot;, line 1842, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/chromium-browser/chromedriver'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/app/scrape_prehled.py&quot;, line 242, in &lt;module&gt;
      main()
    File &quot;/app/scrape_prehled.py&quot;, line 201, in main
      driver = nastav_driver()
    File &quot;/app/scrape_prehled.py&quot;, line 36, in nastav_driver
      driver = webdriver.Chrome(utils.PATH_CHROMIUM, options=options)
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py&quot;, line 73, in __init__
      self.service.start()
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/common/service.py&quot;, line 81, in start
      raise WebDriverException(
  selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
  </code></pre>
  <p>What is the problem here, please?</p>