diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/Dockerfile b/Dockerfile index 9cf9c7b27..205b66209 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,13 @@ -FROM --platform=linux/amd64 python:3.10-slim +FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:3.10-slim # Define Git SHA build argument for sentry ARG git_sha="development" - -ENV POETRY_VERSION=1.2.0 \ - POETRY_HOME="/opt/poetry" \ - POETRY_NO_INTERACTION=1 \ - APP_DIR="/bot" \ - GIT_SHA=$git_sha - -ENV PATH="$POETRY_HOME/bin:$PATH" - -RUN apt-get update \ - && apt-get -y upgrade \ - && apt-get install --no-install-recommends -y curl \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN curl -sSL https://install.python-poetry.org | python +ENV GIT_SHA=$git_sha # Install project dependencies -WORKDIR $APP_DIR +WORKDIR /bot COPY pyproject.toml poetry.lock ./ -RUN poetry install --no-dev +RUN poetry install --without dev # Copy the source code in last to optimize rebuilding the image COPY . . |