-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
50 lines (39 loc) · 1.22 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.12.7-bullseye
# 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
# 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 \
&& rm -rf /var/lib/apt/lists/*
# Prepare installation of poetry
ENV POETRY_HOME="/opt/poetry" \
POETRY_VERSION=1.5.1
ENV PATH="$POETRY_HOME/bin:$PATH"
# Install poetry (Python package manager)
RUN curl -sSL https://install.python-poetry.org | python3 -
# Create and switch into app directory
RUN mkdir /app
WORKDIR /app
# Install Python libraries
COPY poetry.lock \
pyproject.toml \
config.default.toml \
alembic.ini \
README.md \
/app/
COPY /src/ /app/src/
RUN poetry install
RUN poetry run playwright install chromium
RUN poetry run playwright install-deps
# Lootscraper: Run
CMD [ "poetry", "run", "lootscraper" ]
# Config
VOLUME /data