This commit is contained in:
sam 2023-09-29 22:31:32 +02:00
commit 1d2c06fc9a
13 changed files with 458 additions and 0 deletions

29
Dockerfile Normal file
View file

@ -0,0 +1,29 @@
FROM docker.io/python:3.11-alpine as python-base
ENV POETRY_VERSION=1.3.2
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
ENV POETRY_CACHE_DIR=/opt/.cache
RUN apk add --no-cache tini
FROM python-base as poetry-base
RUN python3 -m venv $POETRY_VENV \
&& $POETRY_VENV/bin/pip install -U pip setuptools \
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
FROM python-base as app
COPY --from=poetry-base ${POETRY_VENV} ${POETRY_VENV}
ENV PATH="${PATH}:${POETRY_VENV}/bin"
WORKDIR /app
COPY poetry.lock pyproject.toml ./
RUN poetry install --no-interaction --no-cache --without dev
COPY . /app
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["sh", "./entry.sh"]