Improve docker image size

This commit is contained in:
Deko
2023-03-11 00:43:41 +01:00
parent 8adaed34e4
commit 063508c972
2 changed files with 8 additions and 4 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
app/tests

View File

@@ -1,13 +1,16 @@
FROM python:3.11.2
FROM python:3.11.2-slim
COPY /poetry.lock /poetry.lock
COPY /pyproject.toml /pyproject.toml
COPY ./app /app
COPY poetry.lock pyproject.toml ./
COPY /app /app
WORKDIR /
# Install requirements
RUN apt-get update
RUN apt-get -y dist-upgrade
RUN apt-get -y install python3-pip curl
# Install poetry and dependencies
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH=/root/.local/bin:$PATH
RUN poetry install