
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://circleci.com/gh/renatomefi/docker-testinfra.svg?style=svg](https://circleci.com/gh/renatomefi/docker-testinfra) https://badgen.net/badge//Github?icon=github](https://github.com/renatomefi/docker-testinfra) https://img.shields.io/docker/pulls/renatomefi/docker-testinfra.svg](https://hub.docker.com/r/renatomefi/docker-testinfra/) https://img.shields.io/microbadger/image-size/renatomefi/docker-testinfra/2.svg](https://hub.docker.com/r/renatomefi/docker-testinfra/)
该镜像帮助你运行https://testinfra.readthedocs.io/en/latest/%EF%BC%8C%E6%94%AF%E6%8C%81Docker%E5%92%8CSSH%E6%8F%92%E4%BB%B6%EF%BC%8C%E7%AE%80%E5%8C%96%E5%9F%BA%E7%A1%80%E8%AE%BE%E6%96%BD%E6%B5%8B%E8%AF%95%E6%B5%81%E7%A8%8B%E3%80%82
http://dockeri.co/image/renatomefi/docker-testinfra](https://hub.docker.com/r/renatomefi/docker-testinfra)
假设你的测试文件位于./tests目录下:
console$ docker run --rm -t \ -v "$(pwd)/tests:/tests" \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ renatomefi/docker-testinfra:2 \ --verbose --hosts='docker://CONTAINER_NAME_OR_ID'
最后一行是py.test和testinfra的参数,更多细节请参考https://testinfra.readthedocs.io/en/latest/invocation.html%E3%80%82%E8%AF%A5%E9%95%9C%E5%83%8F%E4%BB%85%E6%8F%90%E4%BE%9B%60py.test%60%E5%85%A5%E5%8F%A3%E7%82%B9%EF%BC%8C%E5%B9%B6%E5%8C%85%E5%90%AB%E6%8A%91%E5%88%B6%E7%BC%93%E5%AD%98%E7%9A%84%E5%8F%82%E6%95%B0%E3%80%82
你可以使用不同粒度的版本标签:
renatomefi/docker-testinfra:2(主版本)renatomefi/docker-testinfra:2.0(次版本)renatomefi/docker-testinfra:2.0.0(具体版本)renatomefi/docker-testinfra:1(旧主版本)当新次版本发布时,主版本标签会自动指向最新次版本,确保你能获取对应主版本的最新更新。
python3后缀选择Python 3(如1.19-python3)。关于testinfra的Docker后端使用,请参考https://testinfra.readthedocs.io/en/latest/backends.html#docker%E3%80%82
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务