blrec/Dockerfile.mirrors
acgnhik 34b10a8a2d release: 1.4.0
close #15
fix #16
close #18
close #19
fix #20
2022-02-12 11:29:55 +08:00

22 lines
747 B
Docker

# syntax=docker/dockerfile:1
FROM python:3.10-slim-buster
WORKDIR /app
VOLUME /rec
COPY src src/
COPY setup.py setup.cfg .
RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list \
&& sed -i "s/security.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends build-essential python3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install -i https://mirrors.aliyun.com/pypi/simple --no-cache-dir -e . \
&& apt-get purge -y --auto-remove build-essential python3-dev
# ref: https://github.com/docker-library/python/issues/60#issuecomment-134322383
ENTRYPOINT ["blrec", "-o", "/rec", "--host", "0.0.0.0"]
CMD ["-c", "/rec/settings.toml"]