-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 972 Bytes
/
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
28
29
30
31
FROM python:3.10-slim-buster
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN apt update \
&& apt install -y wget \
&& apt install -y unzip
# install chrom browser for selenium use
ARG CHROME_VERSION="101.0.4951.41-1"
RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt install -y /tmp/chrome.deb \
&& rm /tmp/chrome.deb
WORKDIR app/
COPY . .
# download the chrome driver for use with selenium
RUN wget https://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip \
&& rm chromedriver_linux64.zip \
&& chmod 755 chromedriver \
&& mv chromedriver /usr/local/bin/
# volume for env-specific data
VOLUME ["data" ]
# uncomment for debug to keep container running
#ENTRYPOINT ["tail", "-f", "/dev/null"]
ENTRYPOINT [ "python3", "run_search.py" ]