Update dockerfile to use poetry.
This commit is contained in:
+5
-7
@@ -1,21 +1,19 @@
|
|||||||
FROM python:3.8.10-slim
|
FROM python:3.12.3-slim
|
||||||
|
|
||||||
# install dependencies for mysqlclient
|
# install dependencies for mysqlclient
|
||||||
# RUN apt-get update && apt-get -y upgrade && apt-get -y install python3-dev default-libmysqlclient-dev build-essential
|
# RUN apt-get update && apt-get -y upgrade && apt-get -y install python3-dev default-libmysqlclient-dev build-essential
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
|
||||||
|
|
||||||
WORKDIR /home
|
WORKDIR /home
|
||||||
|
|
||||||
COPY classes classes/
|
COPY classes classes/
|
||||||
COPY cogs cogs/
|
COPY cogs cogs/
|
||||||
COPY utilities utilities/
|
COPY utilities utilities/
|
||||||
COPY highscores.py highscores.py
|
COPY main.py main.py
|
||||||
COPY requirements.txt requirements.txt
|
COPY pyproject.toml pyproject.toml
|
||||||
|
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install --upgrade pip && pip install poetry && poetry export -f requirements.txt --output requirements.txt && pip install -r requirements.txt
|
||||||
|
|
||||||
# remove build deps that aren't needed to run
|
# remove build deps that aren't needed to run
|
||||||
# RUN apt-get -y remove python3-dev build-essential && apt-get -y autoremove
|
# RUN apt-get -y remove python3-dev build-essential && apt-get -y autoremove
|
||||||
|
|
||||||
CMD ["python3", "./highscores.py"]
|
CMD ["python3", "./main.py"]
|
||||||
Reference in New Issue
Block a user