Last active
August 23, 2023 04:16
-
-
Save alejovicu/fa60d9a04f8711b955ac1a2744028ba6 to your computer and use it in GitHub Desktop.
Docker Selenium Webdriver with Python3 in alpine 3.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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