N3RD/JN/dr_py/doc/大佬友链.md
2024-01-08 22:50:47 +08:00

59 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### tg群的大佬自己写dockerfile和自动发布的镜像
1. [dockerfile仓库](https://github.com/esme518/docker-drpy)
2. [自动发布的三架构镜像](https://hub.docker.com/r/esme518/docker-drpy/tags)
3. 暴力更新命令(仅仅保留设置和同步的本地直播源,自己添加源的慎用):
```shell
mv base/rules.db base/直播.txt /tmp
ls -A1 | xargs rm -rf
git clone -q https://gitcode.net/qq_32394351/dr_py.git .
mv -f /tmp/rules.db /tmp/直播.txt base/
```
4. 容器启动环境变量:
| 变量 | 默认参数 | 参数说明 |
| ------ | ------ | ------ |
| REPO_URL | https://gitcode.net/qq_32394351/dr_py.git | 可以改为自己fork后的仓库地址 |
| AUTOUPDATE | | 容器重启自动更新参考上面的暴力更新。默认关闭设为1为开启 |
| INET_USERNAME | user | 9001端口进程管理的用户名 |
| INET_PASSWORD | 123 | 9001端口进程管理的密码 |
5. 容器启动命令(不自动更新):
~/pywork/dr_py可以改为自己想保存的路径
```shell
docker run -d \
--name drpy \
--restart=always \
-p 5705:5705 \
-p 9001:9001 \
-e INET_USERNAME=user \
-e INET_PASSWORD=123 \
-v ~/pywork/dr_py:/root/sd/pywork/dr_py \
esme518/docker-drpy
```
6. 容器启动命令(开启自动更新)
```shell
docker run -d \
--name drpy \
--restart=always \
-p 5705:5705 \
-p 9001:9001 \
-e INET_USERNAME=user \
-e INET_PASSWORD=123 \
-e AUTOUPDATE=1 \
-v ~/pywork/dr_py:/root/sd/pywork/dr_py \
esme518/docker-drpy
```
7. x86环境测试armv7容器的启动命令测试用不要用在日常环境:
```shell
docker run --platform linux/arm/v7 -p 5705:5705 -p 9001:9001 --restart=always --name drpy-armv7-test -d esme518/docker-drpy
```
8.迁移数据库文件
```shell
docker cp ./rules.db 4ff:/root/sd/pywork/dr_py/base/rules.db
```
9.进入容器
```shell
docker exec -it drpy /bin/sh
```