- Linux/Amd64
- Linux/Arm64
容器通过环境变量来配置,环境变量名称可以查看 entrypoint👈
具体参数可参考官方文档
docker run -d \
-e ACCOUNT=<机器人qq> \
-e WS_ENABLE=true \
-p 3001:3001 \
-p 6099:6099 \
--name napcat \
--restart=always \
mlikiowa/napcat-docker:latest
# docker compose 正向 WS
version: "3"
services:
napcat:
environment:
- ACCOUNT=<机器人qq>
- WS_ENABLE=true
ports:
- 3001:3001
- 6099:6099
container_name: napcat
network_mode: bridge
restart: always
image: mlikiowa/napcat-docker:latest
点我查看命令👈
docker run -d \
-e ACCOUNT=<机器人qq> \
-e WSR_ENABLE=true \
-e WS_URLS='["ws://192.168.3.8:5140/onebot"]' \
--name napcat \
--restart=always \
mlikiowa/napcat-docker:latest
# docker compose 反向 WS
version: "3"
services:
napcat:
environment:
- ACCOUNT=<机器人qq>
- WSR_ENABLE=true
- WS_URLS=["ws://192.168.3.8:5140/onebot"]
container_name: napcat
network_mode: bridge
ports:
- 6099:6099
restart: always
image: mlikiowa/napcat-docker:latest
点我查看命令👈
docker run -d \
-e ACCOUNT=<机器人qq> \
-e HTTP_ENABLE=true \
-e HTTP_POST_ENABLE=true \
-e HTTP_URLS='["http://192.168.3.8:5140/onebot"]' \
-p 3000:3000 \
-p 6099:6099 \
--name napcat \
--restart=always \
mlikiowa/napcat-docker:latest
# docker compose HTTP POST
version: "3"
services:
napcat:
environment:
- ACCOUNT=<机器人qq>
- HTTP_ENABLE=true
- HTTP_POST_ENABLE=true
- HTTP_URLS=["http://192.168.3.8:5140/onebot"]
ports:
- 3000:3000
- 6099:6099
container_name: napcat
network_mode: bridge
restart: always
image: mlikiowa/napcat-docker:latest
QQ 文档路径:~/.config/QQ
NapCat 配置文件路径: /usr/src/app/napcat/config
注意:如果是重新创建的容器,需要固定 Mac 地址
docker logs napcat
- 若 Docker 镜像拉取失败,可以使用 Docker 镜像加速服务