-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
29 lines (21 loc) · 819 Bytes
/
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
FROM python:3.12-alpine AS build-env
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_NO_INTERACTION=1
RUN apk add --no-cache --virtual .python_deps build-base python3-dev libffi-dev gcc bash && \
pip3 install poetry && \
apk add --no-cache git && \
mkdir -p /app/src /app /shared && \
poetry config virtualenvs.create false
ADD pyproject.toml /app/pyproject.toml
WORKDIR /app
RUN poetry export --dev --without-hashes --no-interaction --no-ansi -f requirements.txt -o requirements.txt && \
pip install --force-reinstall -r requirements.txt && \
apk del .python_deps
ADD src /app/src
WORKDIR /app
ENTRYPOINT python3 /app/src/blockgametracker/main.py