{"id":20390262,"url":"https://github.com/nonebot/cli-plugin-docker","last_synced_at":"2026-02-10T20:01:42.216Z","repository":{"id":65351756,"uuid":"586781867","full_name":"nonebot/cli-plugin-docker","owner":"nonebot","description":"docker support for nb-cli","archived":false,"fork":false,"pushed_at":"2025-12-03T09:09:14.000Z","size":192,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T11:28:48.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"nonebot","custom":["https://afdian.com/@nonebot"]}},"created_at":"2023-01-09T08:08:28.000Z","updated_at":"2025-12-03T09:09:15.000Z","dependencies_parsed_at":"2024-01-10T23:02:21.669Z","dependency_job_id":"4dc8cf91-70b9-421f-ac08-54cf00da750f","html_url":"https://github.com/nonebot/cli-plugin-docker","commit_stats":{"total_commits":53,"total_committers":3,"mean_commits":"17.666666666666668","dds":"0.30188679245283023","last_synced_commit":"ddf1c665b616fee6a5be78da440471bc48a42e57"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"yanyongyu/python-poetry-template","purl":"pkg:github/nonebot/cli-plugin-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fcli-plugin-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fcli-plugin-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fcli-plugin-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fcli-plugin-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/cli-plugin-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fcli-plugin-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29314703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:23:55.036Z","updated_at":"2026-02-10T20:01:42.209Z","avatar_url":"https://github.com/nonebot.png","language":"Python","funding_links":["https://opencollective.com/nonebot","https://afdian.com/@nonebot"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD041 --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cli.nonebot.dev/\"\u003e\u003cimg src=\"https://cli.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NB CLI Plugin Docker\n\n_✨ NoneBot2 命令行工具 Docker 插件 ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/nonebot/nb-cli-plugin-docker/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/nonebot/cli-plugin-docker\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nb-cli-plugin-docker\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nb-cli-plugin-docker\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.10+-blue\" alt=\"python\"\u003e\n  \u003ca href=\"https://results.pre-commit.ci/latest/github/nonebot/nb-cli-plugin-docker/master\"\u003e\n    \u003cimg src=\"https://results.pre-commit.ci/badge/github/nonebot/cli-plugin-docker/master.svg\" alt=\"pre-commit\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=5OFifDh\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E7%BE%A4-768887710-orange?style=flat-square\" alt=\"QQ Chat Group\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://qun.qq.com/qqweb/qunpro/share?_wv=3\u0026_wwv=128\u0026appChannel=share\u0026inviteCode=7b4a3\u0026appChannel=share\u0026businessType=9\u0026from=246610\u0026biz=ka\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-NoneBot-5492ff?style=flat-square\" alt=\"QQ Channel\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://t.me/botuniverse\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/telegram-botuniverse-blue?style=flat-square\" alt=\"Telegram Channel\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/VKtE6Gdc4h\"\u003e\n    \u003cimg src=\"https://discordapp.com/api/guilds/847819937858584596/widget.png?style=shield\" alt=\"Discord Server\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 准备\n\n在使用本插件前请确保 Docker CLI 以及 Docker Compose Plugin 已经安装，且可以从命令行直接使用。\n\n详细安装方法请参考 [Docker 文档](https://docs.docker.com/engine/install/)\n\nDocker 官方 Linux 快速安装一键脚本：\n\n```bash\ncurl -fsSL https://get.docker.com | sudo sh\n```\n\n## 安装插件\n\n### uv tool / uvx（推荐）\n\n首先需要[安装 uv](https://docs.astral.sh/uv/#installation)。\n\n直接使用：\n\n```bash\nuvx --from nb-cli --with nb-cli-plugin-docker nb docker\n# 或\nuv tool run --from nb-cli --with nb-cli-plugin-docker nb docker\n```\n\n安装：\n\n```bash\nuv tool install --with nb-cli-plugin-docker nb-cli\n\n# 更新环境变量（如果需要）\nuv tool update-shell\n```\n\n### 通用方式\n\n```bash\nnb self install nb-cli-plugin-docker\n```\n\n## 使用插件\n\n```bash\nnb docker\n# 其他别名\n# nb deploy\n# nb compose\n```\n\n### generate\n\n生成 `Dockerfile` 和 `docker-compose.yml`。\n\n#### 什么时候需要（重新）生成？\n\n- 在项目中首次使用本插件时；\n- 更换了机器人项目的管理器时。\n\n#### 传递项目依赖\n\n对于使用了 `uv`, `pdm` 或 `poetry` 的机器人项目，本插件会自动检查相应的依赖固定信息（即 `*.lock` 文件）判断并调用相应工具自动向容器内传递依赖。\n\n对于其他管理方式的机器人项目，则需要手动导出一份 `requirements.txt` 来传递项目依赖到容器内，例如：\n\n```bash\nsource .venv/bin/activate\npip freeze \u003e requirements.txt\n```\n\n### build\n\n构建机器人镜像。\n\n### up / down\n\n部署/取消部署机器人实例。\n\n### logs\n\n查看机器人日志。\n\n### ps\n\n查看机器人运行状态。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fcli-plugin-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fcli-plugin-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fcli-plugin-docker/lists"}