-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
50 lines (40 loc) · 1.42 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
FROM python:3.10
# Tini (init): Add
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
# Linux: Skip interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# xvfb: Set display port as an environment variable
ENV DISPLAY=:99
# Chrome: Add google repo with keys
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
# Linux: Get list of latest available packages and install needed libraries.
# Then Remove unnecessary temporary files. All in one command so that no layers are built in between.
RUN apt-get update && apt-get install -y \
xvfb \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
# Lootscraper: Make folder
RUN mkdir /app
WORKDIR /app
# Lootscraper: Install Python libraries
COPY requirements.txt /app
RUN pip install --upgrade pip \
&& pip install -r requirements.txt
# Debug: Show installed packages
RUN pip freeze > installed_packages.txt
# Lootscraper: Add
COPY lootscraper.py \
config.default.ini \
alembic.ini \
/app/
COPY app /app/app/
COPY alembic /app/alembic/
COPY js /app/js/
# Lootscraper: Run
CMD [ "python", "lootscraper.py", "--docker" ]
# Config
VOLUME /data