init
This commit is contained in:
commit
ed0bd8f986
16 changed files with 1291 additions and 0 deletions
29
Dockerfile
Normal file
29
Dockerfile
Normal 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 libmagic
|
||||
|
||||
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"]
|
Loading…
Add table
Add a link
Reference in a new issue