-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (25 loc) · 1.01 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
28
29
30
31
32
33
FROM python:3.11.1-slim
LABEL maintainer="solairen@solairen.tech"
ARG workdir=/robot
RUN mkdir ${workdir}
WORKDIR ${workdir}
ARG version=110.0.5481.30
COPY requirements.txt ${workdir}
# Install packages
RUN apt update && apt -y install --no-install-recommends unzip wget gnupg gnupg2 gnupg1 curl\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Install Chrome & Chrome Web Driver
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt -y update
RUN apt -y install google-chrome-stable
RUN wget https://chromedriver.storage.googleapis.com/${version}/chromedriver_linux64.zip
RUN unzip chromedriver_linux64.zip
RUN mv chromedriver /usr/bin/chromedriver
RUN chown root:root /usr/bin/chromedriver
RUN chmod +x /usr/bin/chromedriver
RUN rm -f chromedriver_linux64.zip
# Install python requirements
RUN pip install -r requirements.txt
ENTRYPOINT [ "python" ]