Skip to content

Instantly share code, notes, and snippets.

@alejovicu
Last active August 23, 2023 04:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alejovicu/fa60d9a04f8711b955ac1a2744028ba6 to your computer and use it in GitHub Desktop.
Save alejovicu/fa60d9a04f8711b955ac1a2744028ba6 to your computer and use it in GitHub Desktop.
Docker Selenium Webdriver with Python3 in alpine 3.8
# Objective: Running selenium python scripts in alpine without grid
FROM python:3.7.2-alpine3.8
RUN pip install selenium
RUN apk add chromium
RUN apk add chromium-chromedriver
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/
# create an entrypoint.sh whith this command: python "${@}"
COPY entrypoint.sh /
ENTRYPOINT ["sh", "/entrypoint.sh"]
# run the image passing the .py file as parameter and that's it :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment