Skip to content

Commit f12f463

Browse files
committed
feat(docker): 使用卷挂载和环境变量更新 Docker 运行指令
1 parent dc11914 commit f12f463

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,25 @@ zerobot [-h] [-m] [-n nickname] [-t token] [-u url] [-g url] [-p prefix] [-d|w]
8686
}
8787
```
8888

89+
## Docker
90+
91+
Run the container with:
92+
93+
```bash
94+
docker run -d \
95+
--name zerobot-plugin \
96+
-v $(pwd)/data:/home/appuser/data \
97+
-v $(pwd)/config.json:/home/appuser/config.json \
98+
-e TZ=Asia/Shanghai \
99+
--user 1000:1000 \
100+
--restart unless-stopped \
101+
--workdir /home/appuser \
102+
guohuiyuan/zerobot-plugin:latest \
103+
/home/appuser/zerobot-plugin -c /home/appuser/config.json
104+
```
105+
106+
Adjust image name and volume paths as needed for your environment.
107+
89108
## 功能
90109
> 在编译时,以下功能除插件控制外,均可通过注释`main.go`中的相应`import`而物理禁用,减小插件体积。
91110

0 commit comments

Comments
 (0)