mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-22 22:37:37 +08:00
✨ docker支持
This commit is contained in:
parent
148d671b5d
commit
1f96372196
0
.dockerignore
Normal file
0
.dockerignore
Normal file
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,6 +15,7 @@ _config.yml
|
||||
config.yml
|
||||
config.example.yml
|
||||
compile.bat
|
||||
.cache/
|
||||
liteyuki/resources/templates/latest-debug.html
|
||||
# vuepress
|
||||
.github
|
||||
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM python:3.11-bullseye
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
|
||||
COPY docker/sources.list /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
|
||||
WORKDIR /liteyukibot
|
||||
|
||||
COPY . /liteyukibot
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
RUN apt-get install -y libnss3 libnspr4 libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libatspi2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libasound2
|
||||
|
||||
EXPOSE 20216
|
||||
|
||||
CMD ["python", "main.py"]
|
10
docker/sources.list
Normal file
10
docker/sources.list
Normal file
@ -0,0 +1,10 @@
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
|
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
|
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
|
@ -10,12 +10,25 @@ tag:
|
||||
|
||||
|
||||
## **开始安装**
|
||||
### **常规方法**
|
||||
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
|
||||
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
|
||||
3. 进入轻雪目录 `cd LiteyukiBot`
|
||||
4. 安装依赖 `pip install -r requirements.txt`
|
||||
5. 启动 `python main.py`
|
||||
|
||||
### **使用Docker**
|
||||
1. 安装 [`Docker`](https://docs.docker.com/get-docker/)
|
||||
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
|
||||
3. 进入轻雪目录 `cd LiteyukiBot`
|
||||
4. 构建镜像 `docker build -t liteyukibot .`
|
||||
5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
|
||||
|
||||
[//]: # ()
|
||||
[//]: # (> [!tip])
|
||||
|
||||
[//]: # (> Windows请使用`%cd%`代替`$(pwd)`)
|
||||
|
||||
## **设备要求**
|
||||
- Windows系统版本最低`Windows10+`/`Windows Server 2019+`
|
||||
- Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~)
|
||||
|
@ -10,7 +10,6 @@ nonebot-adapter-onebot~=2.4.3
|
||||
nonebot-plugin-alconna~=0.43.0
|
||||
nonebot_plugin_apscheduler~=0.4.0
|
||||
packaging~=23.1
|
||||
playwright~=1.17.2
|
||||
psutil~=5.9.8
|
||||
py-cpuinfo~=9.0.0
|
||||
pydantic~=2.7.0
|
||||
|
Loading…
Reference in New Issue
Block a user