如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
CleanStart Prometheus-Mysqld-Exporter镜像提供生产就绪、安全加固的数据库监控工具,基于最小化的CleanStart OS构建,适用于企业环境,具备高级安全特性和可靠的指标收集能力。
📌 基础框架:来自CleanStart的生产级容器。
镜像路径:cleanstart/prometheus-mysqld-exporter
镜像仓库:CleanStart Registry
从仓库下载容器镜像:
bashdocker pull cleanstart/prometheus-mysqld-exporter:latest
bashdocker pull cleanstart/prometheus-mysqld-exporter:latest-dev
注意:cleanstart/prometheus-mysqld-exporter:latest版本不支持上游mysqld_exporter使用的标准DATA_SOURCE_NAME环境变量,而是需要将.my.cnf配置文件挂载到容器中,并通过--config.my-cnf=<路径>参数传递。解决方法:创建包含[client]部分(用户、密码、主机、端口)的Kubernetes ConfigMap,将其作为卷挂载,并在容器参数中添加--config.my-cnf=/etc/mysql/.my.cnf。
bashcat > /tmp/.my.cnf << 'EOF' [client] user=exporter password=exporterpassword host=mysql-host port=3306 EOF
使用基础配置运行容器:
bashdocker run -it --name prometheus-mysqld-exporter \ -v /tmp/.my.cnf:/etc/mysql/.my.cnf:ro \ cleanstart/prometheus-mysqld-exporter:latest \ --config.my-cnf=/etc/mysql/.my.cnf
使用生产级安全设置部署:
bashdocker run -d --name prometheus-mysqld-exporter-prod \ --security-opt=no-new-privileges \ --user 1000:1000 \ --restart unless-stopped \ -p 9104:9104 \ -v /tmp/.my.cnf:/etc/mysql/.my.cnf:ro \ cleanstart/prometheus-mysqld-exporter:latest \ --config.my-cnf=/etc/mysql/.my.cnf
挂载本地目录以持久化数据:
bashdocker run -v /app:/app \ -v /tmp/.my.cnf:/etc/mysql/.my.cnf:ro \ cleanstart/prometheus-mysqld-exporter:latest \ --config.my-cnf=/etc/mysql/.my.cnf
使用自定义端口映射运行:
bashdocker run -p 9104:9104 \ -v /tmp/.my.cnf:/etc/mysql/.my.cnf:ro \ cleanstart/prometheus-mysqld-exporter:latest \ --config.my-cnf=/etc/mysql/.my.cnf
启用特定的MySQL指标收集器:
bashdocker run -d --name prometheus-mysqld-exporter-full \ -p 9104:9104 \ -v /tmp/.my.cnf:/etc/mysql/.my.cnf:ro \ cleanstart/prometheus-mysqld-exporter:latest \ --config.my-cnf=/etc/mysql/.my.cnf \ --collect.global_status \ --collect.global_variables \ --collect.info_schema.innodb_metrics \ --collect.info_schema.tables \ --collect.perf_schema.eventsstatements
Kubernetes部署推荐的安全上下文:
yamlsecurityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: true runAsUser: 1000 runAsGroup: 1000
重要链接和参考资源:
漏洞免责声明
CleanStart提供的Docker镜像包含由独立贡献者维护的第三方开源库和包。尽管CleanStart维护这些镜像并应用行业标准的安全实践,但无法保证其控制范围之外的上游组件的安全性或完整性。
用户确认并同意,开源软件可能包含未被发现的漏洞,或通过更新引入新风险。CleanStart不对源自第三方库的安全问题负责,包括但不限于零日漏洞、供应链***或贡献者引入的风险。
安全是共同责任:CleanStart会在可能的情况下提供更新的镜像和指导,而用户负责评估部署并实施适当的控制措施。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。



来自真实用户的反馈,见证轩辕镜像的优质服务