-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (24 loc) · 935 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
30
31
32
33
# For more information, refer to https://aka.ms/vscode-docker-python
FROM python:3.11.2
LABEL maintainer="https://github.com/lunarmint/cpr-bot"
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Force UTF8 encoding for funky character handling
ENV PYTHONIOENCODING=utf-8
# Needed so imports function properly
ENV PYTHONPATH=/app
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add Poetry path to PATH
ENV PATH="${PATH}:/root/.local/bin"
# Install project dependencies with Poetry
COPY pyproject.toml .
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --no-ansi --only main --all-extras
# Place where the app lives in the container
WORKDIR /app
COPY . /app
# During debugging, this entry point will be overridden.
CMD ["python", "/app/modules/bot.py"]