Files
cnzgray 05408137cf 添加Docker构建脚本 (#322)
* 添加Docker构建脚本

* chore: Update Docker build workflow to fetch all history for all tags and branches
2024-09-26 01:20:16 +08:00

27 lines
489 B
Docker

FROM python:3.12-slim AS builder
WORKDIR /app
ENV PATH=/root/.local/bin:$PATH
RUN pip install pipx && \
pipx ensurepath && \
pipx install poetry
RUN apt update && apt install -y git
COPY . .
RUN poetry self add poetry-dynamic-versioning && \
poetry config virtualenvs.in-project true && \
poetry install && \
rm -rf /app/.git
FROM python:3.12-slim as runner
WORKDIR /app
COPY --from=builder /app/ /app/
ENTRYPOINT ["/app/.venv/bin/javsp"]
CMD ["-i", "/video"]