-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
27 lines (22 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Alternative: debian:11 (don't use alpine)
FROM python:3.8
# Update package list and install dependencies
RUN apt-get update && apt-get install -y \
# For downloading and installing Selenium driver
unzip \
wget \
libssl-dev
WORKDIR /app
ADD . /app
# - Selenium webdriver
# Install google chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
&& apt-get -y update \
&& apt-get install -y google-chrome-stable
# Install chromedriver and set it to PATH
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
ENV CHROMEDRIVER_PATH="/usr/local/bin/chromedriver"
RUN pip3 install --user -U pip \
&& pip3 install --no-warn-script-location --user --trusted-host pypi.python.org -r requirements.txt