mirror of
https://github.com/TriM-Organization/Linglun-Converter.git
synced 2025-09-17 18:16:28 +00:00
更新依赖、窗口内支持mcstructure、协议更新、命令行docker构建
This commit is contained in:
41
Dockerfile
Normal file
41
Dockerfile
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
FROM docker.1ms.run/library/python:3.10-slim-bullseye
|
||||
|
||||
ENV TZ Asia/Taipei
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
RUN touch /etc/apt/sources.list
|
||||
|
||||
RUN echo "deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y git && \
|
||||
# 清理 apt 缓存
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 克隆指定的 git 仓库
|
||||
RUN git clone https://gitee.com/TriM-Organization/Linglun-Converter.git
|
||||
|
||||
# 创建 Python 虚拟环境
|
||||
RUN python3 -m venv /app/venv
|
||||
|
||||
|
||||
RUN . /app/venv/bin/activate && \
|
||||
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
|
||||
/app/venv/bin/python3 -m pip install --upgrade pip && \
|
||||
pip install --no-cache-dir --upgrade "Musicreater[full]" TrimLog requests zhDateTime
|
||||
|
||||
# 切换到克隆下来的仓库目录
|
||||
WORKDIR /app/Linglun-Converter
|
||||
|
||||
# 设置容器启动时执行的默认命令,使用虚拟环境中的 python
|
||||
CMD ["/app/venv/bin/python3", "llc_cli.py"]
|
Reference in New Issue
Block a user