Trying to run selenium python on a Docker Apline Linux and getting the "Message: 'chromedriver' executable needs to be in PATH" error because it thinks the file doesn't exist. But tried everything I can fine in other answers, but it still won't launch.
Here's what I tried so far:
- Added it to folder to PATH and PYTHONPATH.
- Tried specifying path to chromedriver when I get the driver
- Tried specifying path to chromium when I get the driver
- Made sure chromium-browser launches with similar flags
- chmod +x on chromedriver
- chmod 777 on chromedriver
Update: Adding these packages in Docker file.
RUN apk --update --no-cache add\
  alpine-sdk\
  autoconf\
  automake\
  bash\
  binutils-gold\
  build-base\
  curl\
  dumb-init\
  g++\
  gcc\
  gcompat\
  git\
  gnupg\
  gzip\
  jpeg\
  jpeg-dev\
  libc6-compat\
  libffi\
  libffi-dev\
  libpng\
  libpng-dev\
  libstdc++\
  libtool\
  linux-headers\
  make\
  mysql\
  mysql-client\
  mysql-dev\
  mesa-gles\
  nasm\
  nodejs\
  nss\
  openjdk8-jre\
  openssh-client\
  paxctl\
  python3\
  python3-dev\
  sudo\
  tar\
  unzip\
  wget\
  chromium
And the shell script I'm getting Chromedriver with
#!/bin/bash
LATEST_CHROMEDRIVER=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
curl -L https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip >> chromedriver.zip
mv -f chromedriver.zip /usr/local/bin/chromedriver.zip
unzip /usr/local/bin/chromedriver.zip -d /usr/local/bin
chmod a+x /usr/local/bin/chromedriver
sudo ln -s /usr/local/bin/chromedriver /usr/bin/chromedriver
rm /usr/local/bin/chromedriver.zip

 
    