-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
78 lines (57 loc) · 2.44 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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:22.04
RUN apt-get update && apt-get clean
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# Install window manager and basic utilities
RUN apt-get install -y \
x11vnc \
xvfb \
fluxbox \
wmctrl \
gnupg \
wget \
git
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >>/etc/apt/sources.list.d/google-chrome.list && \
apt-get update && apt-get -y install google-chrome-stable
ARG USER=robocat
RUN useradd $USER && mkdir -p /home/$USER && chown -R $USER:$USER /home/$USER
RUN mkdir -p /home/$USER/.config && chown -R $USER:$USER /home/$USER/.config
ARG CORRETTO_VERSION=1.8.0
# Install OpenJDK
RUN wget -q -O - https://apt.corretto.aws/corretto.key | apt-key add - && \
echo "deb https://apt.corretto.aws stable main" >>/etc/apt/sources.list.d/corretto.list && \
apt-get update && apt-get -y install java-$CORRETTO_VERSION-amazon-corretto-jdk
RUN apt-get install -y \
zip \
php=2:8.1+92ubuntu1 \
curl \
xdotool \
tinyproxy \
tesseract-ocr=4.1.1-2.1build1 && \
ldconfig
RUN chown -R $USER:$USER /home/$USER
USER $USER
WORKDIR /home/$USER
ARG TAGUI_VERSION=v6.110.0
# Install tagui
RUN wget https://github.com/aisingapore/TagUI/releases/download/$TAGUI_VERSION/TagUI_Linux.zip && \
unzip TagUI_Linux.zip && rm TagUI_Linux.zip
# Update SikuliX to version 2.0.5
RUN rm /home/$USER/tagui/src/sikulix/sikulix.jar && \
wget https://launchpad.net/sikuli/sikulix/2.0.5/+download/sikulixide-2.0.5-lux.jar -O /home/$USER/tagui/src/sikulix/sikulix.jar
USER root
RUN sed -i -e 's/chrome_switches="--remote-debugging-port=9222/chrome_switches="--remote-debugging-port=9222 --no-first-run --disable-dev-shm-usage --no-sandbox --disable-setuid-sandbox --proxy-server=http:\/\/localhost:8000/' /home/$USER/tagui/src/tagui
RUN ln -sf /home/$USER/tagui/src/tagui /usr/local/bin/tagui && \
ln -sf /home/$USER/tagui/src/end_processes /usr/local/bin/kill_tagui && \
ln -sf /run.sh /usr/local/bin/run && \
ln -sf $(which python3) /usr/local/bin/python
ENV DISPLAY=:1
# Fixes "DSO support routines" error
ENV OPENSSL_CONF=/dev/null
COPY resources/malek-dridi-0F7GRXNOG7g-unsplash.jpg /usr/share/images/fluxbox/background.png
COPY config/tinyproxy.conf.tmpl /home/$USER/.config/tinyproxy.conf.tmpl
COPY scripts/run.sh scripts/bootstrap.sh /
USER $USER
CMD /bootstrap.sh