aboutsummaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-09-18 00:23:37 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-09-18 00:23:37 +0400
commit6436908bb91205b8818909aae091ad704970de85 (patch)
treea579531b81e0c5d0af4ddc87d6d0bd39212e246a /dev
parentUse BOT_TOKEN in example project (diff)
Use Poetry Base In Docker Image
Use chrislovering/python-poetry-base as the base image for the Dockerfile. It manages everthing required to install and configure poetry. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'dev')
-rw-r--r--dev/Dockerfile22
1 files changed, 2 insertions, 20 deletions
diff --git a/dev/Dockerfile b/dev/Dockerfile
index ccc653be..0b35724a 100644
--- a/dev/Dockerfile
+++ b/dev/Dockerfile
@@ -1,26 +1,8 @@
-FROM --platform=linux/amd64 python:3.10-slim
+FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:3.10-slim
-# Set pip to have no saved cache
-ENV PIP_NO_CACHE_DIR=1 \
- PIP_DISABLE_PIP_VERSION_CHECK=on \
- POETRY_VERSION=1.2.0 \
- POETRY_HOME="/opt/poetry" \
- POETRY_VIRTUALENVS_IN_PROJECT=true \
- POETRY_NO_INTERACTION=1 \
- APP_DIR="/app"
-
-ENV PATH="$POETRY_HOME/bin:/$APP_DIR/.venv/bin:$PATH"
-
-# Install poetry
-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
# Install project dependencies
-WORKDIR $APP_DIR
+WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root