diff --git a/comics/Dockerfile b/comics/Dockerfile new file mode 100644 index 0000000..3e4fb90 --- /dev/null +++ b/comics/Dockerfile @@ -0,0 +1,73 @@ +FROM python:3.12-slim-bookworm AS build +SHELL ["sh", "-exc"] + +ARG COMICS_VERSION=main + +# Install build dependencies +RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* + +# Install uv +COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv + +ENV UV_COMPILE_BYTECODE=1 \ + UV_LINK_MODE=copy \ + UV_PROJECT_ENVIRONMENT=/app \ + UV_PYTHON=/usr/local/bin/python \ + UV_PYTHON_DOWNLOADS=never + +# Clone comics source +RUN git clone --depth 1 --branch "${COMICS_VERSION}" https://github.com/jodal/comics.git /src + +# Install dependencies +RUN --mount=type=cache,target=/root/.cache <