-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (37 loc) · 1.11 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
FROM python:3.10
RUN printf "\n####\nStart: $(date)\n####\n"
RUN useradd -ms /bin/bash scraper
WORKDIR /home/scraper
RUN apt update
RUN apt install gcc python3-pip python3 python3-setuptools sysstat -y
COPY requirements.txt ./
RUN python3 -m pip install --upgrade setuptools pip --no-warn-script-location --no-input
RUN python3 -m pip install -r requirements.txt --no-warn-script-location --no-input
COPY .env ./
COPY setup.py ./
RUN python3 setup.py
RUN python3 -m playwright install-deps
USER scraper
RUN python3 -m playwright install
RUN python3 -m coreferee install en
COPY ./API/ ./API/
COPY ./Core/ ./Core/
COPY ./EndScripts/ ./EndScripts/
COPY ./Extensions/ ./Extensions/
COPY ./External/ ./External/
COPY ./Plugins/ ./Plugins/
#COPY ./Settings/ ./Settings/
COPY ./Tests/ ./Tests/
#COPY ./Utils/ ./Utils/
COPY ./gui.py ./
COPY ./decompile.sh ./
COPY ./compile.py ./
RUN mkdir -p Settings/Sessions
USER root
RUN chown -R scraper ./
USER scraper
RUN export PATH=$PATH:/home/scraper/.local/bin
RUN export $(cat .env | grep "^[^#]" | xargs)
RUN ./decompile.sh
RUN python3 compile.py
ENTRYPOINT ["tail", "-f", "/dev/null"]