|
|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
# syntax=docker/dockerfile:1.7
|
|
|
|
|
|
|
|
|
|
FROM python:3.12-slim AS runtime
|
|
|
|
|
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
|
PYTHONUNBUFFERED=1 \
|
|
|
|
|
PIP_NO_CACHE_DIR=1 \
|
|
|
|
|
PIP_NO_CACHE_DIR=0 \
|
|
|
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
|
|
|
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ \
|
|
|
|
|
PIP_TRUSTED_HOST=mirrors.aliyun.com \
|
|
|
|
|
@ -14,7 +16,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
|
|
|
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
|
|
|
|
apt-get update \
|
|
|
|
|
&& apt-get install -y --no-install-recommends \
|
|
|
|
|
curl \
|
|
|
|
|
fontconfig \
|
|
|
|
|
@ -25,10 +29,11 @@ RUN apt-get update \
|
|
|
|
|
libpangocairo-1.0-0 \
|
|
|
|
|
shared-mime-info \
|
|
|
|
|
tzdata \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
&& true
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt ./
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
|
pip install --prefer-binary -r requirements.txt
|
|
|
|
|
|
|
|
|
|
COPY alembic.ini main.py banner.txt ./
|
|
|
|
|
COPY alembic ./alembic
|
|
|
|
|
|