2022-02-12 11:29:55 +08:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2022-12-18 18:20:29 +08:00
|
|
|
FROM python:3.11-slim-buster
|
2022-02-12 11:29:55 +08:00
|
|
|
|
|
|
|
WORKDIR /app
|
2022-02-21 13:50:10 +08:00
|
|
|
VOLUME ["/cfg", "/log", "/rec"]
|
2022-02-12 11:29:55 +08:00
|
|
|
|
|
|
|
COPY src src/
|
2022-04-09 23:01:32 +08:00
|
|
|
COPY setup.py setup.cfg ./
|
2022-02-12 11:29:55 +08:00
|
|
|
|
2022-04-09 23:01:32 +08:00
|
|
|
RUN sed -i "s/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list && \
|
|
|
|
sed -i "s/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends ffmpeg 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
|
2022-02-12 11:29:55 +08:00
|
|
|
# ref: https://github.com/docker-library/python/issues/60#issuecomment-134322383
|
|
|
|
|
2023-03-19 15:23:39 +08:00
|
|
|
ENV BLREC_DEFAULT_SETTINGS_FILE=/cfg/settings.toml
|
|
|
|
ENV BLREC_DEFAULT_LOG_DIR=/log
|
|
|
|
ENV BLREC_DEFAULT_OUT_DIR=/rec
|
2023-01-29 11:29:09 +08:00
|
|
|
ENV TZ="Asia/Shanghai"
|
2022-02-21 13:50:10 +08:00
|
|
|
|
|
|
|
EXPOSE 2233
|
2023-03-19 15:26:31 +08:00
|
|
|
ENTRYPOINT ["blrec", "--host", "0.0.0.0", "--no-progress"]
|
2022-02-21 13:50:10 +08:00
|
|
|
CMD []
|