
本镜像提供一个基于snoowrap库开发的事件驱动型Reddit社区管理机器人,旨在通过自动化处理Reddit平台的内容审核、用户互动管理等moderation任务,帮助社区管理员提升管理效率,降低人工操作成本。
bashdocker run -d \ --name reddit-mod-bot \ -e REDDIT_CLIENT_ID="your_client_id_here" \ -e REDDIT_CLIENT_SECRET="your_client_secret_here" \ -e REDDIT_USER_AGENT="mod-bot/1.0 by your_username" \ -e REDDIT_USERNAME="your_reddit_username" \ -e REDDIT_PASSWORD="your_reddit_password" \ -v /local/path/to/rules.json:/app/rules.json \ [镜像名称]:latest
yamlversion: '3.8' services: reddit-mod-bot: image: [镜像名称]:latest container_name: reddit-mod-bot restart: unless-stopped environment: - REDDIT_CLIENT_ID=your_client_id_here - REDDIT_CLIENT_SECRET=your_client_secret_here - REDDIT_USER_AGENT=mod-bot/1.0 by your_username - REDDIT_USERNAME=your_reddit_username - REDDIT_PASSWORD=your_reddit_password - RULES_PATH=/app/rules.json volumes: - ./rules.json:/app/rules.json logging: driver: "json-file" options: max-size: "10m" max-file: "3"
| 环境变量 | 描述 | 数据类型 | 是否必需 | 默认值 |
|---|---|---|---|---|
| REDDIT_CLIENT_ID | Reddit API应用的Client ID | 字符串 | 是 | 无 |
| REDDIT_CLIENT_SECRET | Reddit API应用的Client Secret | 字符串 | 是 | 无 |
| REDDIT_USER_AGENT | 用于标识应用的用户代理字符串 | 字符串 | 是 | 无 |
| REDDIT_USERNAME | 具有moderator权限的Reddit账号用户名 | 字符串 | 是 | 无 |
| REDDIT_PASSWORD | Reddit账号密码 | 字符串 | 是 | 无 |
| RULES_PATH | 规则配置文件在容器内的路径 | 字符串 | 否 | /app/rules.json |
| POLL_INTERVAL | 事件轮询间隔(秒) | 整数 | 否 | 30 |
| LOG_LEVEL | 日志级别(debug/info/warn/error) | 字符串 | 否 | info |
规则文件采用JSON格式,支持配置帖子规则和评论规则,示例如下:
json{ "postRules": [ { "name": "prohibitedKeywords", "trigger": "titleOrBodyContains", "keywords": ["spam", "advertisement", "scam"], "action": "remove", "notifyUser": true, "notificationMessage": "您的帖子因包含违规内容已被移除。", "reportReason": "违反社区内容政策" }, { "name": "nsfwContent", "trigger": "isNSFW", "action": "flair", "flairText": "NSFW", "flairCSSClass": "nsfw-tag" } ], "commentRules": [ { "name": "hateSpeech", "trigger": "containsRegex", "pattern": "(racist|homophobic|xenophobic)", "action": "removeAndBan", "banDuration": 30, "banReason": "发表仇恨言论" } ] }
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务