-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 883 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (31 loc) · 883 Bytes
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
FROM python:3.10-slim
ARG token
# necessary env vars for poetry to work properly
ENV token=$token \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.3.2
# Install Poetry 1.3.2 via pip
RUN pip install -U pip \
&& apt-get update \
&& apt-get install gcc -y \
&& apt install -y libpq-dev python3-dev \
&& pip install "poetry==1.3.2" \
&& pip install setuptools>=65.5.1
ENV PATH="${PATH}:/root/.poetry/bin"
WORKDIR /progphil-bot
COPY pyproject.toml poetry.lock ./
COPY src ./src
COPY migrations ./migrations
COPY config ./config
COPY README.md ./
# Install Poetry dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev
COPY . .
# Run the bot
CMD ["poetry", "run", "progphil"]