-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.chrome
64 lines (53 loc) · 1.41 KB
/
Dockerfile.chrome
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ubuntu:16.04
ENV URL="https://github.com/ayoubeddafali/sind"
ENV LOGIN="LOGIN"
ENV PASSWORD="PASSWORD"
ENV SCREENSHOTS_DIR="/home/agent/screenshots/"
ENV DOWNLOADS_DIR="/home/agent/downloads/"
ENV ENVIRONMENT="prod"
ENV DEBUG=False
ENV DISPLAY=:99
# Install Chrome
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
hicolor-icon-theme \
libcanberra-gtk* \
libgl1-mesa-dri \
libgl1-mesa-glx \
libpango1.0-0 \
libpulse0 \
libv4l-0 \
fonts-symbola \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
&& apt-get update && apt-get install -y google-chrome-stable
RUN apt-get install -y --no-install-recommends \
vim \
ca-certificates \
curl \
python-setuptools \
python \
python-pip \
autoconf \
automake \
build-essential \
libtool \
python-tk python-dev \
scrot xvfb xserver-xephyr \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip \
&& pip install wheel \
&& pip install python-xlib \
&& pip install selenium \
&& pip install pyautogui \
&& pip install pyscreenshot
WORKDIR /home/agent
COPY . .
RUN pip install -r requirements.txt
RUN mkdir -p ${SCREENSHOTS_DIR} && chmod +x start.sh
ENTRYPOINT [ "/home/agent/start.sh" ]
CMD ["python", "main.py"]