-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (37 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
50 lines (37 loc) · 1.56 KB
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.11-slim AS base
RUN apt update && \
apt install -y --no-install-recommends wget unzip libicu-dev binutils git dos2unix gcc patchelf ccache make && \
rm -rf /var/lib/apt/lists/*
WORKDIR /tools
ENV POETRY_VER="1.8.3" \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=0 \
POETRY_VIRTUALENVS_CREATE=False \
POETRY_CACHE_DIR=/tmp/poetry_cache
RUN pip install poetry==$POETRY_VER
ENV DEPOT_DOWNLOADER_VER="3.4.0"
RUN wget https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_$DEPOT_DOWNLOADER_VER/DepotDownloader-linux-x64.zip \
&& unzip DepotDownloader-linux-x64.zip \
&& rm DepotDownloader-linux-x64.zip \
&& chmod +x DepotDownloader
ENV ENTITY_HELPER_VER="v2.1.0"
run wget https://github.com/deadlock-wiki/DeadlockEntityHelper/releases/download/$ENTITY_HELPER_VER/DeadlockEntityHelper \
&& chmod +x DeadlockEntityHelper
WORKDIR /repo
COPY pyproject.toml poetry.lock ./
FROM base AS runtime
RUN poetry install --no-root --no-cache --only main
# Build image includes nuitka for creating the binary
FROM base AS build
RUN poetry install --no-root --no-cache --only main --only build
COPY . .
RUN dos2unix /repo/src/steam/steam_db_download_deadlock.sh && \
chmod +x /repo/src/steam/steam_db_download_deadlock.sh
ENV DEADLOCK_DIR="/data" \
WORK_DIR="/work" \
INPUT_DIR="/input" \
OUTPUT_DIR="/output"
RUN mkdir -p /repo/src/tools
RUN cp /tools/DepotDownloader /repo/src/tools/DepotDownloader
RUN cp /tools/DeadlockEntityHelper /repo/src/tools/DeadlockEntityHelper
ENTRYPOINT [ "python3", "src/deadbot.py" ]