Skip to content

Conversation

@cn-kali-team
Copy link
Contributor

What type of PR is this?

This PR introduces a new Inspect method in the DockerSandbox struct, which wraps the ContainerInspect API from the Docker client to expose container inspection information. This enables users to retrieve detailed runtime metadata of the sandboxed container, such as network settings, mounted volumes, and process status.

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

新增了 Inspect 方法,属于为 DockerSandbox 添加新功能
有需要管理沙箱可以获取docker沙箱的信息存储到数据库后使用docker客户端管理

(optional) The PR that updates user documentation:

@meguminnnnnnnnn
Copy link
Contributor

这个是命令行工具的 backend,应该不需要 inspect 容器吧? 是有实际的场景需要这个能力吗,是什么场景?

@cn-kali-team
Copy link
Contributor Author

就在创建docker沙箱后,我想获取当前的docker信息存储到数据库,比如当前的沙箱的ID,和镜像名称,启动命令和参数等等,有时工具运行起来,执行了后没输出也没报错,可以在这找到容器ID,用go的docker客户端连上去获取一下日志看看什么情况。也能看到当前在运行有多少沙箱和他们的状态。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants