2023-10-15 02:58:53 +00:00
|
|
|
FROM python:3.10 AS builder
|
2024-07-01 11:14:55 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2024-07-24 21:38:36 +00:00
|
|
|
RUN pip install -U pdm
|
|
|
|
ENV PDM_CHECK_UPDATE=false
|
2023-10-15 02:58:53 +00:00
|
|
|
WORKDIR /app
|
2024-07-24 21:38:36 +00:00
|
|
|
COPY pyproject.toml README.md .
|
|
|
|
COPY xiaomusic/ ./xiaomusic/
|
|
|
|
COPY plugins/ ./plugins/
|
|
|
|
COPY xiaomusic.py .
|
|
|
|
RUN pdm install --prod --no-editable
|
2024-06-23 11:05:13 +00:00
|
|
|
COPY install_dependencies.sh .
|
|
|
|
RUN bash install_dependencies.sh
|
2023-10-15 02:58:53 +00:00
|
|
|
|
|
|
|
FROM python:3.10-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/.venv /app/.venv
|
2024-06-23 11:05:13 +00:00
|
|
|
COPY --from=builder /app/ffmpeg /app/ffmpeg
|
2023-10-15 02:58:53 +00:00
|
|
|
COPY xiaomusic/ ./xiaomusic/
|
2024-07-05 13:45:28 +00:00
|
|
|
COPY plugins/ ./plugins/
|
2023-10-15 02:58:53 +00:00
|
|
|
COPY xiaomusic.py .
|
|
|
|
ENV XIAOMUSIC_HOSTNAME=192.168.2.5
|
|
|
|
ENV XIAOMUSIC_PORT=8090
|
2024-07-16 16:25:01 +00:00
|
|
|
VOLUME /app/conf
|
|
|
|
VOLUME /app/music
|
2023-10-15 02:58:53 +00:00
|
|
|
EXPOSE 8090
|
|
|
|
ENV PATH=/app/.venv/bin:$PATH
|
|
|
|
ENTRYPOINT [".venv/bin/python3","xiaomusic.py"]
|