add (non-working so far) dockerfile
This commit is contained in:
parent
dd6e7cf73f
commit
cd7a5431e9
4 changed files with 82 additions and 0 deletions
30
Dockerfile
Normal file
30
Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
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 libpq vips vips-dev
|
||||
|
||||
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} \
|
||||
&& $POETRY_VENV/bin/pip install poethepoet
|
||||
|
||||
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