-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
32 lines (26 loc) · 1.07 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
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.11.1-slim-bullseye
LABEL maintainer="https://github.com/snaacky/chiya"
# Keeps Python from generating .pyc files in the container
# Turns off buffering for easier container logging
# Force UTF8 encoding for funky character handling
# Needed so imports function properly
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=utf-8
ENV PYTHONPATH=/app
# Install MySQL and Poetry
RUN apt update -y
RUN apt install --no-install-recommends -y build-essential libmariadb-dev-compat libmariadb-dev python3-mysqldb git curl
RUN curl -sSL https://install.python-poetry.org | python -
# 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/chiya/bot.py"]