Skip to Content

79 操作 · 215 模式 · 规范 v0.18.1

下载 OpenAPI YAML ↗

Nanocl Daemon (v0.18.1)

nanocl contributors: [email protected] License: MIT OR Apache-2.0

Nanocl Daemon 是 HTTP REST API。
此 API 由 Nanocl Client 使用,所以 Nanocl Client 能执行的所有操作,也都能通过 API 完成。

大多数客户端命令直接对应 API 端点,例如 nanocl ps 对应 GET /processes。
一个明显例外是运行 Cargo,它由多次 API 调用组成。

OpenAPI 规范

本 API 使用 Utoipa 以 OpenAPI 格式编写文档。
规范仅在开发环境运行时自动生成。
发布版本时,将生成的文件传到文档仓库。

跨源资源共享

本 API 按照 W3C 规范实现跨源资源共享(CORS)。
允许浏览器进行跨域通信。
所有响应使用通配的来源许可,因此完全公开,任何人以及任何网站上的代码都能访问。

Cargoes

使用可选过滤条件列出 Cargo。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "test" } } } }

通用过滤器。

namespace
string

可选命名空间过滤器;省略或为空时返回全部命名空间。

响应

响应示例

Content type
application/json
[
  • {
    }
]

根据规格创建新 Cargo。

query Parameters
namespace
string

创建 Cargo 的命名空间,默认为 'global'。

Request Body schema: application/json
required
required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序在应用容器之前执行的初始化容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

object

Cargo 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

使用可选过滤条件统计 Cargo 数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "my-cargo" } } } }

通用过滤器。

namespace
string

可选命名空间过滤器;省略或为空时返回全部命名空间。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

将 Cargo 恢复到指定历史记录。

path Parameters
cargo_key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

history_key
required
string

Cargo 历史记录键。

响应

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

用新规格更新 Cargo,并创建历史记录。

path Parameters
key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

Request Body schema: application/json
required
required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序在应用容器之前执行的初始化容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

object

Cargo 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

按规范键删除 Cargo。

path Parameters
key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

query Parameters
force
required
boolean

为 true 时强制删除,即使 Cargo 已启动。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

按规范键更新 Cargo,并添加历史记录。

path Parameters
key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

Request Body schema: application/json
required
数组元素类型 objects or null (ContainerSpec)

替换的应用容器声明。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Dns
数组元素类型 strings or null

Cargo 网络所有者的替换 DNS 服务器。

Hostname
string or null

Cargo 网络所有者的新 Docker 主机名。

数组元素类型 objects or null (ContainerSpec)

替换的有序初始化容器声明。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

object

Cargo 的新用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
string or null

Cargo 的新名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer or null >= 1

新副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings or null

替换的 Cargo 层共享 Secret。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

列出 Cargo 历史记录。

path Parameters
key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

响应

响应示例

Content type
application/json
[
  • {
    }
]

按规范键获取 Cargo 详细信息。

path Parameters
key
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

响应

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Status": {
    },
  • "Spec": {
    },
  • "Instances": [
    ]
}

Events

事件管理端点。

使用可选过滤条件列出事件。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "kind": { "eq": "normal" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

使用可选过滤条件统计事件数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "namespace_name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

监听所有对等节点的新事件,可选停止流的条件。

Request Body schema: application/json
Array
required
数组元素类型 strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or objects (NativeEventAction)
ActorKey
string or null
null or EventActorKind (string)
Kind
required
数组元素类型 strings (EventKind)
允许的元素 枚举值: "error" "normal" "warning"
RelatedKey
string or null
null or EventActorKind (string)

响应

请求示例

Content type
application/json
[
  • {
    }
]

获取事件详细信息。

path Parameters
key
required
string

事件键。

响应

响应示例

Content type
application/json
{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ExpiresAt": "2019-08-24T14:15:22Z",
  • "ReportingNode": "string",
  • "ReportingController": "string",
  • "Kind": "error",
  • "Action": "string",
  • "Reason": "string",
  • "Note": "string",
  • "Actor": { },
  • "Related": { },
  • "Metadata": {
    }
}

Jobs

任务管理端点。

使用可选过滤条件列出任务。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "job-example" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建新任务。

Request Body schema: application/json
required
required
数组元素类型 objects (Config)

要运行的容器列表。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or HealthConfig (object)
null or HostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

NetworkDisabled
boolean or null

禁用容器网络。

null or NetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

null or ImagePullPolicy (string)
One of
null
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

任务名称。

Schedule
string or null

五字段 cron 表达式或支持的快捷形式;参见 [crate::cron::validate_schedule]。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Secrets": [
    ],
  • "Metadata": {
    },
  • "Schedule": "string",
  • "Ttl": 0,
  • "ImagePullSecret": "string",
  • "ImagePullPolicy": { },
  • "Containers": [
    ]
}

响应示例

Content type
application/json
{
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

统计任务数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "key": { "eq": "job-example" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

按名称删除任务。

path Parameters
name
required
string

任务名称。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

获取任务详细信息。

path Parameters
name
required
string

任务名称。

响应

响应示例

Content type
application/json
{
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "InstanceTotal": 0,
  • "InstanceSuccess": 0,
  • "InstanceRunning": 0,
  • "InstanceFailed": 0,
  • "Spec": {
    },
  • "Instances": [
    ]
}

Metrics

指标管理端点。

使用可选过滤条件列出指标。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "kind": { "eq": "CPU" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建新指标。

Request Body schema: application/json
required
Data
required
any

指标数据。

Kind
required
string

指标类型。

Note
string or null

指标的可选备注。

响应

请求示例

Content type
application/json
{
  • "Kind": "string",
  • "Data": null,
  • "Note": "string"
}

响应示例

Content type
application/json
{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ExpiresAt": "2019-08-24T14:15:22Z",
  • "NodeName": "string",
  • "Kind": "string",
  • "Data": null,
  • "Note": "string"
}

使用可选过滤条件统计指标数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "kind": { "eq": "ncproxy.io/http" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

获取指标详细信息。

path Parameters
key
required
string

指标键。

响应

响应示例

Content type
application/json
{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ExpiresAt": "2019-08-24T14:15:22Z",
  • "NodeName": "string",
  • "Kind": "string",
  • "Data": null,
  • "Note": "string"
}

Namespaces

命名空间管理端点。

使用可选过滤条件列出命名空间。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "test" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建新命名空间。

Request Body schema: application/json
required
Metadata
any

用户定义的元数据。

Name
required
string

命名空间名称。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": null
}

响应示例

Content type
application/json
{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Metadata": null
}

统计命名空间数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

删除命名空间。

path Parameters
name
required
string

要删除的命名空间名称。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

获取命名空间详细信息。

path Parameters
name
required
string

要检查的命名空间名称。

响应

响应示例

Content type
application/json
[
  • {
    }
]

Networks

节点级 Docker 网络检查端点。

列出持久化的节点级 Docker 网络快照。

query Parameters
filter
string
示例: filter={ "where": { "node_name": { "eq": "node-a" } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

按确定性键检查已持久化的 Docker 网络。

path Parameters
key
required
string

网络键,格式为 node_name.network_name。

响应

响应示例

Content type
application/json
{
  • "Key": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "NodeName": "string",
  • "Data": {
    },
  • "Metadata": null
}

Nodes

节点管理端点。

列出节点。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "test" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

在节点上启动 Cargo 实例,用于节点间通信。

Request Body schema: application/json
required
CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (CargoReplicaTask)

分配给此节点的具体持久化副本,按序号排序。

Array
Key
required
string <uuid>

稳定且持久化的 Cargo 副本标识。

Ordinal
required
integer <int32>

副本在 Cargo 内稳定的序号。

响应

请求示例

Content type
application/json
{
  • "CargoKey": "string",
  • "Replicas": [
    ]
}

统计节点数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "test" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

Processes

进程管理端点。

通过 RFC6455 WebSocket 启动并连接 Docker exec 实例。

客户端二进制帧为原始 stdin。文本控制消息为 stdin_eof、resize 和 detach。服务器二进制帧以 0x01(stdout)、0x02(stderr)或 0x03(console)开头;文本控制消息报告 exit、detached 或 error。

path Parameters
id
required
string

Docker exec 实例 ID。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

启动 Docker exec 实例,不连接数据流。

path Parameters
id
required
string

Docker exec 实例 ID。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

按键名称获取进程统计信息。

path Parameters
name
required
string
示例: deploy-example

进程名称。

query Parameters
one_shot
boolean

仅返回一次统计信息。

stream
boolean

返回统计信息流。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

使用可选过滤条件列出进程。

query Parameters
filter
string
示例: filter={ "where": { "name": { "eq": "test" } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

统计进程数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

获取指定类型和规范资源键的进程日志。

path Parameters
key
required
string
示例: global.deploy-example

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程类型。

query Parameters
follow
boolean

是否返回数据流的布尔值。

since
integer <int64>

仅返回指定时间戳之后的日志。

tail
string

仅返回最后 n 条日志(整数)或全部日志('all')。

timestamps
boolean

为每行日志添加时间戳。

until
integer <int64>

仅返回指定时间戳之前的日志。

响应

重启指定类型和规范资源键的全部进程。

path Parameters
key
required
string
示例: global.deploy-example

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程类型。

响应

启动指定类型和规范资源键的全部进程。

path Parameters
key
required
string
示例: global.deploy-example

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程类型。

响应

获取指定类型和规范资源键的全部进程统计信息。

path Parameters
key
required
string
示例: global.deploy-example

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程类型。

query Parameters
one_shot
boolean

仅返回一次统计信息。

stream
boolean

返回统计信息流。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

停止指定类型和规范资源键的全部进程。

path Parameters
key
required
string
示例: global.deploy-example

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程类型。

响应

等待全部进程达到指定状态。

path Parameters
key
required
string

规范资源键,格式为 {namespace}.{name}(任务使用不带命名空间的键)。

kind
required
string
示例: cargo

进程实例类型,如 cargo、job、vm。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

通过 WebSocket 连接进程。

path Parameters
name
required
string

容器名称或 ID。

响应

为具体进程名称或 ID 创建 exec 实例。

path Parameters
name
required
string

容器名称或 ID。

Request Body schema: application/json
required
AttachStderr
boolean or null

连接标准错误。

AttachStdin
boolean or null

连接标准输入。

AttachStdout
boolean or null

连接标准输出。

Cmd
数组元素类型 strings or null

要执行的命令及参数。

DetachKeys
string or null

兼容 Docker 的分离按键序列。

Env
数组元素类型 strings or null

环境变量,格式为 NAME=value。

Privileged
boolean or null

以扩展权限运行命令。

Tty
boolean or null

分配伪终端。

User
string or null

命令使用的用户和可选用户组。

WorkingDir
string or null

进程内部工作目录。

响应

请求示例

Content type
application/json
{
  • "AttachStdin": true,
  • "AttachStdout": true,
  • "AttachStderr": true,
  • "Tty": true,
  • "DetachKeys": "string",
  • "Env": [
    ],
  • "Cmd": [
    ],
  • "Privileged": true,
  • "User": "string",
  • "WorkingDir": "string"
}

响应示例

Content type
application/json
{
  • "Id": "string"
}

按名称获取进程详细信息。

path Parameters
name
required
string

进程名称。

响应

响应示例

Content type
application/json
{
  • "Key": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "Kind": "vm",
  • "NodeName": "string",
  • "KindKey": "string",
  • "IpAddress": "string",
  • "Data": {
    }
}

按名称或 ID 向单个进程发送信号。

path Parameters
name
required
string
示例: system.nstore.c

容器名称或 ID。

Request Body schema: application/json
required
signal
required
string

发送给进程的信号,默认 SIGKILL。

响应

请求示例

Content type
application/json
{
  • "signal": "string"
}

按名称或 ID 获取单个进程实例的日志。

path Parameters
name
required
string
示例: deploy-example

进程名称。

query Parameters
follow
boolean

是否返回数据流的布尔值。

since
integer <int64>

仅返回指定时间戳之后的日志。

tail
string

仅返回最后 n 条日志(整数)或全部日志('all')。

timestamps
boolean

为每行日志添加时间戳。

until
integer <int64>

仅返回指定时间戳之前的日志。

响应

按名称或 ID 启动单个进程。

path Parameters
pk
required
string
示例: 1234567890

进程主键。

响应

ResourceKinds

列出资源类型。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "test" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建资源类型。

Request Body schema: application/json
required
required
object (ResourceKindSpec)

资源类型规格。

object

此类型和版本资源的 JSONSchema。

Url
string or null

创建、更新或删除此类型和版本的资源时调用的服务。

object

资源类型的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

资源类型名称。

Version
required
string

资源类型版本。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Version": "string",
  • "Metadata": {
    },
  • "Data": {
    }
}

响应示例

Content type
application/json
{
  • "Name": "string",
  • "Version": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Metadata": null,
  • "Data": {
    }
}

统计资源类型数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

删除资源类型。

path Parameters
domain
required
string

资源类型的域名。

name
required
string

资源类型名称。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

获取资源类型详细信息。

path Parameters
domain
required
string

资源类型的域名。

name
required
string

资源类型名称。

响应

响应示例

Content type
application/json
{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Versions": [
    ]
}

获取资源类型版本详细信息。

path Parameters
domain
required
string

资源类型的域名。

name
required
string

资源类型名称。

version
required
string

资源类型版本。

响应

响应示例

Content type
application/json
{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "KindKey": "string",
  • "Version": "string",
  • "Metadata": {
    },
  • "Data": {
    }
}

Resources

资源管理端点。

使用可选过滤条件列出资源。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "kind": { "eq": "ncproxy.io/rule" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建新资源。

Request Body schema: application/json
required
required
object

资源数据,JSON 对象。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Kind
required
string

资源类型。

object

资源的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

资源名称。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Kind": "string",
  • "Data": {
    },
  • "Metadata": {
    }
}

响应示例

Content type
application/json
{
  • "Kind": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Spec": {
    }
}

统计资源数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

创建新资源规格并添加历史记录。

path Parameters
name
required
string

资源名称。

Request Body schema: application/json
required
required
object

以 JSON 对象表示的资源规格。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

object

以 JSON 对象表示的资源元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

响应

请求示例

Content type
application/json
{
  • "Data": {
    },
  • "Metadata": {
    }
}

响应示例

Content type
application/json
{
  • "Kind": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Spec": {
    }
}

按名称删除资源。

path Parameters
name
required
string

要删除的资源名称。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

列出资源历史记录。

path Parameters
name
required
string

要列出历史记录的资源名称。

响应

响应示例

Content type
application/json
[
  • {
    }
]

将资源恢复到指定历史版本。

path Parameters
id
required
string

要恢复到的资源历史记录 ID。

name
required
string

要恢复的资源名称。

响应

响应示例

Content type
application/json
{
  • "Kind": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Spec": {
    }
}

获取资源详细信息。

path Parameters
name
required
string

要检查的资源名称。

响应

响应示例

Content type
application/json
{
  • "Kind": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Spec": {
    }
}

Secrets

Secret 管理端点。

使用可选过滤条件列出 Secret。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "kind": { "eq": "Env" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建新 Secret。

Request Body schema: application/json
required
required
object

Secret 数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Immutable
boolean

无法更新 Secret。

Kind
required
string

Secret 类型。

object

资源的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Secret 名称。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

响应示例

Content type
application/json
{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

统计 Secret 数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

删除 Secret。

path Parameters
key
required
string

Secret 键。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

更新 Secret。

path Parameters
key
required
string

Secret 键。

Request Body schema: application/json
required
required
object

以 JSON 对象表示的 Secret 数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

object

Secret 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

响应

请求示例

Content type
application/json
{
  • "Metadata": {
    },
  • "Data": {
    }
}

响应示例

Content type
application/json
{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

获取 Secret 详细信息。

path Parameters
key
required
string

Secret 键。

响应

响应示例

Content type
application/json
{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

System

通用系统端点。

Ping 服务器,检查是否正常运行。

响应

获取主机或节点系统信息。

响应

响应示例

Content type
application/json
{
  • "ID": "string",
  • "Containers": 0,
  • "ContainersRunning": 0,
  • "ContainersPaused": 0,
  • "ContainersStopped": 0,
  • "Images": 0,
  • "Driver": "string",
  • "DriverStatus": [
    ],
  • "DockerRootDir": "string",
  • "Plugins": { },
  • "MemoryLimit": true,
  • "SwapLimit": true,
  • "KernelMemoryTCP": true,
  • "CpuCfsPeriod": true,
  • "CpuCfsQuota": true,
  • "CPUShares": true,
  • "CPUSet": true,
  • "PidsLimit": true,
  • "OomKillDisable": true,
  • "IPv4Forwarding": true,
  • "BridgeNfIptables": true,
  • "BridgeNfIp6tables": true,
  • "Debug": true,
  • "NFd": 0,
  • "NGoroutines": 0,
  • "SystemTime": "string",
  • "LoggingDriver": "string",
  • "CgroupDriver": { },
  • "CgroupVersion": { },
  • "NEventsListener": 0,
  • "KernelVersion": "string",
  • "OperatingSystem": "string",
  • "OSVersion": "string",
  • "OSType": "string",
  • "Architecture": "string",
  • "NCPU": 0,
  • "MemTotal": 0,
  • "IndexServerAddress": "string",
  • "RegistryConfig": { },
  • "GenericResources": { },
  • "HttpProxy": "string",
  • "HttpsProxy": "string",
  • "NoProxy": "string",
  • "Name": "string",
  • "Labels": [
    ],
  • "ExperimentalBuild": true,
  • "ServerVersion": "string",
  • "Runtimes": {
    },
  • "DefaultRuntime": "string",
  • "Swarm": { },
  • "LiveRestoreEnabled": true,
  • "Isolation": { },
  • "InitBinary": "string",
  • "ContainerdCommit": { },
  • "RuncCommit": { },
  • "InitCommit": { },
  • "SecurityOptions": [
    ],
  • "ProductLicense": "string",
  • "DefaultAddressPools": [
    ],
  • "Warnings": [
    ],
  • "CDISpecDirs": [
    ],
  • "HostGateway": "string",
  • "Network": {
    },
  • "Config": {
    }
}

获取版本信息。

响应

响应示例

Content type
application/json
{
  • "Arch": "string",
  • "Channel": "string",
  • "Version": "string",
  • "CommitId": "string"
}

Vms

虚拟机管理端点。

使用可选过滤条件列出虚拟机。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "my-vm" } } } }

通用过滤器。

namespace
string

可选命名空间过滤器;省略或为空时返回全部命名空间。

响应

响应示例

Content type
application/json
[
  • {
    }
]

创建虚拟机。

query Parameters
namespace
string

虚拟机命名空间。

Request Body schema: application/json
required
null or VmHostConfig (object)
One of
null
Hostname
string or null

VM 主机名(默认:根据名称生成)。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

VM 的 MAC 地址(默认自动生成)。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(默认:cloud)。

SshKey
string or null

用户默认 SSH 公钥(推荐)。

User
string or null

VM 默认用户(默认:cloud)。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": {
    },
  • "Hostname": "string",
  • "User": "string",
  • "Password": "string",
  • "SshKey": "string",
  • "InitContainer": { },
  • "Image": "string",
  • "MacAddress": "string",
  • "Labels": {
    },
  • "HostConfig": { }
}

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

统计 VM 镜像数量。

query Parameters
filter
string
示例: filter={ "filter": { "where": { "name": { "eq": "global" } } } }

通用过滤器。

namespace
string

可选命名空间过滤器;省略或为空时返回全部命名空间。

响应

响应示例

Content type
application/json
{
  • "Count": 0
}

按规范键删除虚拟机。

path Parameters
key
required
string

规范 VM 键,格式为 {namespace}.{name}。

响应

响应示例

Content type
application/json
{
  • "msg": "string"
}

更新虚拟机配置,即合并当前配置和新配置,并添加历史记录。

path Parameters
key
required
string

规范 VM 键,格式为 {namespace}.{name}。

Request Body schema: application/json
required
null or VmHostConfig (object)
One of
null
Hostname
string or null

VM 主机名。

null or Config (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
string or null

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

响应

请求示例

Content type
application/json
{
  • "Name": "string",
  • "Metadata": {
    },
  • "Hostname": "string",
  • "User": "string",
  • "Password": "string",
  • "SshKey": "string",
  • "InitContainer": { },
  • "Labels": {
    },
  • "HostConfig": { }
}

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

列出虚拟机历史记录。

path Parameters
key
required
string

规范 VM 键,格式为 {namespace}.{name}。

响应

响应示例

Content type
application/json
[
  • {
    }
]

获取虚拟机详细信息。

path Parameters
key
required
string

规范 VM 键,格式为 {namespace}.{name}。

响应

响应示例

Content type
application/json
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Status": {
    },
  • "Spec": {
    },
  • "Instances": [
    ]
}

模式

Address

Addr
string or null

IP 地址。

PrefixLen
integer or null <int64>

IP 地址掩码长度。

{
  • "Addr": "string",
  • "PrefixLen": 0
}

Any

One of
string

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Example
{
  • "property1": "string",
  • "property2": "string"
}

ApiError

msg
required
string
{
  • "msg": "string"
}

BinaryInfo

Arch
required
string

Arch 是当前二进制文件的架构。

Channel
required
string

Channel 是当前二进制文件的发布通道。

CommitId
required
string

CommitID 是当前二进制文件的提交 ID。

Version
required
string

Version 是当前二进制文件版本。

{
  • "Arch": "string",
  • "Channel": "string",
  • "Version": "string",
  • "CommitId": "string"
}

BlkioStats

数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
数组元素类型 objects or null (BlkioStatsEntry)
Array
major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
{
  • "io_service_bytes_recursive": [
    ],
  • "io_serviced_recursive": [
    ],
  • "io_queue_recursive": [
    ],
  • "io_service_time_recursive": [
    ],
  • "io_wait_time_recursive": [
    ],
  • "io_merged_recursive": [
    ],
  • "io_time_recursive": [
    ],
  • "sectors_recursive": [
    ]
}

BlkioStatsEntry

major
required
integer <int64> >= 0
minor
required
integer <int64> >= 0
op
required
string
value
required
integer <int64> >= 0
{
  • "major": 0,
  • "minor": 0,
  • "op": "string",
  • "value": 0
}

CPUStats

required
object (CPUUsage)

容器 CPU 使用统计。

percpu_usage
数组元素类型 integers or null <int64> [ items <int64 > >= 0 ]
total_usage
required
integer <int64> >= 0
usage_in_kernelmode
required
integer <int64> >= 0
usage_in_usermode
required
integer <int64> >= 0
online_cpus
integer or null <int64> >= 0
system_cpu_usage
integer or null <int64> >= 0
required
object (ThrottlingData)

CPU 节流统计。

periods
required
integer <int64> >= 0
throttled_periods
required
integer <int64> >= 0
throttled_time
required
integer <int64> >= 0
{
  • "cpu_usage": {
    },
  • "system_cpu_usage": 0,
  • "online_cpus": 0,
  • "throttling_data": {
    }
}

CPUUsage

percpu_usage
数组元素类型 integers or null <int64> [ items <int64 > >= 0 ]
total_usage
required
integer <int64> >= 0
usage_in_kernelmode
required
integer <int64> >= 0
usage_in_usermode
required
integer <int64> >= 0
{
  • "percpu_usage": [
    ],
  • "usage_in_usermode": 0,
  • "total_usage": 0,
  • "usage_in_kernelmode": 0
}

Cargo

CreatedAt
required
string <date-time>

Cargo 创建时间。

NamespaceName
required
string

命名空间名称。

required
object (CargoSpecRevision)

Cargo 规格。

CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

CreatedAt
required
string <date-time>

Cargo 规格创建时间。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序执行的初始化容器。

Key
required
string <uuid>

Cargo 规格唯一标识。

object

Cargo 的用户定义元数据。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
null or CargoPlacementSpec (object)
null or HashMap (object)
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

Version
required
string

规格版本。

required
object (ObjPsStatus)

Cargo 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

CargoInspect

CreatedAt
required
string <date-time>

Cargo 创建时间。

InstanceRunning
required
integer >= 0

运行实例数。

required
数组元素类型 objects (Process)

实例列表。

Array
CreatedAt
required
string <date-time>

创建时间。

required
object (ContainerInspectResponse)

进程数据,类型为 ContainerInspect。

IpAddress
string or null

从最近观察到的进程状态解析的有效 IP 地址。

Key
required
string

进程键。

Kind
required
string (ProcessKind)
枚举值: "vm" "job" "cargo"

进程类型(Job、Vm、Cargo)。

KindKey
required
string

Cargo 和 VM 的规范资源键;任务使用名称。

Name
required
string

进程名称。

NodeName
required
string

容器运行所在节点的名称。

UpdatedAt
required
string <date-time>

实例最近更新时间。

InstanceTotal
required
integer >= 0

实例数量。

NamespaceName
required
string

命名空间名称。

required
object (CargoSpecRevision)

Cargo 规格。

CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

CreatedAt
required
string <date-time>

Cargo 规格创建时间。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序执行的初始化容器。

Key
required
string <uuid>

Cargo 规格唯一标识。

object

Cargo 的用户定义元数据。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
null or CargoPlacementSpec (object)
null or HashMap (object)
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

Version
required
string

规格版本。

required
object (ObjPsStatus)

Cargo 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Status": {
    },
  • "Spec": {
    },
  • "Instances": [
    ]
}

CargoNetworkMode

string (CargoNetworkMode)

Cargo 使用的 Docker 网络模式。

除了内置模式,Docker 接受任何非空网络名称。Nanocl 保留 container:<id>,因为用户不能直接加入由容器拥有的网络命名空间。

"string"

CargoPlacementSelectorSpec

Cargoes
数组元素类型 strings or null

根据节点上运行的 Cargo 选择。

数组元素类型 objects or null (NodeConstraint)

可选高级约束(键、运算符、值)。

Array
Key
required
string

约束键(如 "region"、"label"、"group" 等)。

Operator
required
string (ConstraintOp)
枚举值: "Eq" "Ne"

约束运算符(Eq/Ne)。

Value
required
string

约束值。

Groups
数组元素类型 strings or null

按组选择。

Labels
数组元素类型 strings or null

按标签选择。

Regions
数组元素类型 strings or null

按区域选择。

Vms
数组元素类型 strings or null

根据节点上运行的 VM 选择。

{
  • "Labels": [
    ],
  • "Regions": [
    ],
  • "Groups": [
    ],
  • "Cargoes": [
    ],
  • "Vms": [
    ],
  • "Constraints": [
    ]
}

CargoPlacementSpec

null or CargoPlacementSelectorSpec (object)
One of
null
Regions
数组元素类型 strings or null

部署 Cargo 的区域。

null or CargoPlacementSelectorSpec (object)
One of
null
null or (CargoPlacementStrategy (CargoPlacementStrategy (string) or CargoPlacementStrategy (string) or CargoPlacementStrategy (string) or CargoPlacementStrategy (object)))
One of
null
{
  • "Strategy": { },
  • "Regions": [
    ],
  • "Require": { },
  • "Prefer": { }
}

CargoPlacementStrategy

One of
string
值: "Distinct"

用于定义如何将 Cargo 放置到节点的策略枚举。

{
  • "UserDefined": "string"
}

CargoReplicaTask

Key
required
string <uuid>

稳定且持久化的 Cargo 副本标识。

Ordinal
required
integer <int32>

副本在 Cargo 内稳定的序号。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "Ordinal": 0
}

CargoResourceRequirementSpec

CpuCores
integer or null >= 0

所需 CPU 核数。

CpuUtilizationCap
number or null <float>

目标节点允许的最大平均 CPU 使用率(0.0 到 1.0)。

CpuWeight
number or null <float>

平衡放置策略中的可选 CPU 权重(0.0 到 1.0)。

MemoryBytes
integer or null >= 0

所需内存,单位字节。

MemoryUtilizationCap
number or null <float>

目标节点允许的最大平均内存使用率(0.0 到 1.0)。

MemoryWeight
number or null <float>

平衡放置策略中的可选内存权重(0.0 到 1.0)。

StorageBytes
integer or null >= 0

所需存储空间,单位字节。

{
  • "CpuCores": 0,
  • "CpuUtilizationCap": 0,
  • "MemoryBytes": 0,
  • "MemoryUtilizationCap": 0,
  • "CpuWeight": 0,
  • "MemoryWeight": 0,
  • "StorageBytes": 0
}

CargoSpec

required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序在应用容器之前执行的初始化容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

object

Cargo 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

{
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

CargoSpecPatch

数组元素类型 objects or null (ContainerSpec)

替换的应用容器声明。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Dns
数组元素类型 strings or null

Cargo 网络所有者的替换 DNS 服务器。

Hostname
string or null

Cargo 网络所有者的新 Docker 主机名。

数组元素类型 objects or null (ContainerSpec)

替换的有序初始化容器声明。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

object

Cargo 的新用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
string or null

Cargo 的新名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer or null >= 1

新副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings or null

替换的 Cargo 层共享 Secret。

{
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

CargoSpecRevision

CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

CreatedAt
required
string <date-time>

Cargo 规格创建时间。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序执行的初始化容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or ContainerSpecHealthConfig (object)
null or ContainerSpecHostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

Key
required
string <uuid>

Cargo 规格唯一标识。

object

Cargo 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
One of
null
null or CargoPlacementSpec (object)
One of
null
null or HashMap (object)
One of
null
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
One of
null
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

Version
required
string

规格版本。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CargoKey": "string",
  • "Version": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "Metadata": {
    },
  • "Replicas": 1,
  • "NetworkMode": { },
  • "PortBindings": { },
  • "Hostname": "string",
  • "Dns": [
    ],
  • "Secrets": [
    ],
  • "Placement": { },
  • "ResourceRequirement": { },
  • "InitContainers": [
    ],
  • "Containers": [
    ]
}

CargoSummary

CreatedAt
required
string <date-time>

Cargo 创建时间。

InstanceRunning
required
integer >= 0

运行实例数。

InstanceTotal
required
integer >= 0

实例数量。

NamespaceName
required
string

命名空间名称。

required
object (CargoSpecRevision)

Cargo 规格。

CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

CreatedAt
required
string <date-time>

Cargo 规格创建时间。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序执行的初始化容器。

Key
required
string <uuid>

Cargo 规格唯一标识。

object

Cargo 的用户定义元数据。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
null or CargoPlacementSpec (object)
null or HashMap (object)
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

Version
required
string

规格版本。

required
object (ObjPsStatus)

Cargo 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "Status": {
    },
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Spec": {
    }
}

ClusterInfo

null or String (string)
One of
null
DataPathPort
integer or null <int32> >= 0

DataPathPort 指定数据流量的数据路径端口,允许范围为 1024 到 49151。未设置或设为 0 时,使用默认端口 4789。

DefaultAddrPool
数组元素类型 strings or null

Default Address Pool 指定全局作用域网络的默认子网池。

ID
string or null

Swarm ID。

RootRotationInProgress
boolean or null

Swarm 是否正在轮换根 CA。

null or SwarmSpec (object)
One of
null
SubnetSize
integer or null <int32> >= 0

SubnetSize 指定从默认子网池创建网络时的子网大小。

null or TlsInfo (object)
One of
null
null or String (string)
One of
null
null or ObjectVersion (object)
One of
null
{
  • "ID": "string",
  • "Version": { },
  • "CreatedAt": { },
  • "UpdatedAt": { },
  • "Spec": { },
  • "TLSInfo": { },
  • "RootRotationInProgress": true,
  • "DataPathPort": 0,
  • "DefaultAddrPool": [
    ],
  • "SubnetSize": 0
}

Commit

Expected
string or null

dockerd 在构建时设置的预期外部工具提交 ID。

ID
string or null

外部工具的实际提交 ID。

{
  • "ID": "string",
  • "Expected": "string"
}

Config

ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

additional property
object
null or HealthConfig (object)
One of
null
null or HostConfig (object)
One of
null
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

容器 MAC 地址。

NetworkDisabled
boolean or null

禁用容器网络。

null or NetworkingConfig_String (object)
One of
null
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

additional property
object
WorkingDir
string or null

命令运行的工作目录。

{
  • "Hostname": "string",
  • "Domainname": "string",
  • "User": "string",
  • "AttachStdin": true,
  • "AttachStdout": true,
  • "AttachStderr": true,
  • "ExposedPorts": {
    },
  • "Tty": true,
  • "OpenStdin": true,
  • "StdinOnce": true,
  • "Env": [
    ],
  • "Cmd": [
    ],
  • "Healthcheck": { },
  • "ArgsEscaped": true,
  • "Image": "string",
  • "Volumes": {
    },
  • "WorkingDir": "string",
  • "Entrypoint": [
    ],
  • "NetworkDisabled": true,
  • "MacAddress": "string",
  • "OnBuild": [
    ],
  • "Labels": {
    },
  • "StopSignal": "string",
  • "StopTimeout": 0,
  • "Shell": [
    ],
  • "HostConfig": { },
  • "NetworkingConfig": { }
}

ConstraintOp

string (ConstraintOp)
枚举值: "Eq" "Ne"

节点选择的通用约束运算符,支持超出简单选择器的高级匹配。

"Eq"

ContainerConfig

ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

additional property
object
null or HealthConfig (object)
One of
null
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称或引用,或此容器创建时使用的镜像。

object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

容器 MAC 地址。已弃用:此字段在 API v1.44 及以上弃用,请改用 EndpointSettings.MacAddress。

NetworkDisabled
boolean or null

禁用容器网络。

OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

additional property
object
WorkingDir
string or null

命令运行的工作目录。

{
  • "Hostname": "string",
  • "Domainname": "string",
  • "User": "string",
  • "AttachStdin": true,
  • "AttachStdout": true,
  • "AttachStderr": true,
  • "ExposedPorts": {
    },
  • "Tty": true,
  • "OpenStdin": true,
  • "StdinOnce": true,
  • "Env": [
    ],
  • "Cmd": [
    ],
  • "Healthcheck": { },
  • "ArgsEscaped": true,
  • "Image": "string",
  • "Volumes": {
    },
  • "WorkingDir": "string",
  • "Entrypoint": [
    ],
  • "NetworkDisabled": true,
  • "MacAddress": "string",
  • "OnBuild": [
    ],
  • "Labels": {
    },
  • "StopSignal": "string",
  • "StopTimeout": 0,
  • "Shell": [
    ]
}

ContainerInspectResponse

AppArmorProfile
string or null
Args
数组元素类型 strings or null

正在运行命令的参数。

null or ContainerConfig (object)
One of
null
Created
string or null

容器创建时间。

Driver
string or null
ExecIDs
数组元素类型 strings or null

容器中运行的 exec 实例 ID。

null or GraphDriverData (object)
One of
null
null or HostConfig (object)
One of
null
HostnamePath
string or null
HostsPath
string or null
Id
string or null

容器 ID。

Image
string or null

容器镜像 ID。

LogPath
string or null
MountLabel
string or null
数组元素类型 objects or null (MountPoint)
Array
Destination
string or null

Destination 是相对于容器根目录(/)的路径,Source 会挂载到容器内的此位置。

Driver
string or null

Driver 是创建卷使用的卷驱动(当挂载类型为卷时)。

Mode
string or null

Mode 是创建绑定挂载或卷挂载时用户提供的逗号分隔选项。默认值因平台而异(Linux 为 \"z\",Windows 为空)。

Name
string or null

Name 是 Source 定义的底层数据的名称引用,例如卷名称。

Propagation
string or null

Propagation 描述挂载如何从主机传播到挂载点,以及反向传播方式。详情见 Linux 内核文档。Windows 不使用此字段。

RW
boolean or null

挂载是否可写,即读写挂载。

Source
string or null

挂载源位置。卷挂载保存卷的存储位置(在 /var/lib/docker/volumes/ 内);绑定挂载和 npipe 保存主机源路径;tmpfs 挂载此字段为空。

null or MountPointTypeEnum (string)
Name
string or null
null or NetworkSettings (object)
One of
null
Path
string or null

正在运行命令的路径。

Platform
string or null
ProcessLabel
string or null
ResolvConfPath
string or null
RestartCount
integer or null <int64>
SizeRootFs
integer or null <int64>

容器中全部文件总大小。

SizeRw
integer or null <int64>

容器创建或修改的文件大小。

null or ContainerState (object)
One of
null
{
  • "Id": "string",
  • "Created": "string",
  • "Path": "string",
  • "Args": [
    ],
  • "State": { },
  • "Image": "string",
  • "ResolvConfPath": "string",
  • "HostnamePath": "string",
  • "HostsPath": "string",
  • "LogPath": "string",
  • "Name": "string",
  • "RestartCount": 0,
  • "Driver": "string",
  • "Platform": "string",
  • "MountLabel": "string",
  • "ProcessLabel": "string",
  • "AppArmorProfile": "string",
  • "ExecIDs": [
    ],
  • "HostConfig": { },
  • "GraphDriver": { },
  • "SizeRw": 0,
  • "SizeRootFs": 0,
  • "Mounts": [
    ],
  • "Config": { },
  • "NetworkSettings": { }
}

ContainerSpec

ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

Essential
boolean
默认值: true

此容器失败是否让 Cargo 副本不健康。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

additional property
object
null or ContainerSpecHealthConfig (object)
One of
null
null or ContainerSpecHostConfig (object)
One of
null
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

ImagePullPolicy
string
默认值: "IfNotPresent"
枚举值: "Never" "Always" "IfNotPresent"

拉取此容器镜像的策略。

null or string

拉取此容器镜像时使用的 Secret。

One of
null

拉取此容器镜像时使用的 Secret。

object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

容器 MAC 地址。

Name
required
string

在 Cargo 声明中唯一的名称。

NetworkDisabled
boolean or null

禁用容器网络。

null or ContainerSpecNetworkingConfig_String (object)
One of
null
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Secrets
数组元素类型 strings
默认值: []

仅注入此容器的 Secret。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

additional property
object
WorkingDir
string or null

命令运行的工作目录。

{
  • "Hostname": "string",
  • "Domainname": "string",
  • "User": "string",
  • "AttachStdin": true,
  • "AttachStdout": true,
  • "AttachStderr": true,
  • "ExposedPorts": {
    },
  • "Tty": true,
  • "OpenStdin": true,
  • "StdinOnce": true,
  • "Env": [
    ],
  • "Cmd": [
    ],
  • "Healthcheck": { },
  • "ArgsEscaped": true,
  • "Image": "string",
  • "Volumes": {
    },
  • "WorkingDir": "string",
  • "Entrypoint": [
    ],
  • "NetworkDisabled": true,
  • "MacAddress": "string",
  • "OnBuild": [
    ],
  • "Labels": {
    },
  • "StopSignal": "string",
  • "StopTimeout": 0,
  • "Shell": [
    ],
  • "HostConfig": { },
  • "NetworkingConfig": { },
  • "Name": "string",
  • "Essential": true,
  • "Secrets": [ ],
  • "ImagePullSecret": { },
  • "ImagePullPolicy": "Never"
}

ContainerSpecDeviceMapping

CgroupPermissions
string or null
PathInContainer
string or null
PathOnHost
string or null
{
  • "PathOnHost": "string",
  • "PathInContainer": "string",
  • "CgroupPermissions": "string"
}

ContainerSpecDeviceRequest

Capabilities
数组元素类型 strings or null[ items ]

权限能力列表,由多个“与”能力列表以“或”关系组成。

Count
integer or null <int64>
DeviceIDs
数组元素类型 strings or null
Driver
string or null
object or null

驱动专属选项,以键值对指定,直接传递给驱动。

property name*
additional property
string
{
  • "Driver": "string",
  • "Count": 0,
  • "DeviceIDs": [
    ],
  • "Capabilities": [
    ],
  • "Options": {
    }
}

ContainerSpecEndpointIpamConfig

IPv4Address
string or null
IPv6Address
string or null
LinkLocalIPs
数组元素类型 strings or null
{
  • "IPv4Address": "string",
  • "IPv6Address": "string",
  • "LinkLocalIPs": [
    ]
}

ContainerSpecEndpointSettings

Aliases
数组元素类型 strings or null
DNSNames
数组元素类型 strings or null

端点在指定网络上的全部 DNS 名称,来自容器名称、网络别名、容器短 ID 和主机名。名称不是完全限定名称,但可包含多个点。添加 .<network-name> 可以得到完全限定名称。例如容器 my.ctr 位于 testnet 网络,DNSNames 包含 my.ctr,FQDN 为 my.ctr.testnet。

object or null

DriverOpts 是驱动选项和值的映射,直接传递给驱动,内容由具体驱动决定。

property name*
additional property
string
EndpointID
string or null

沙箱中服务端点的唯一 ID。

Gateway
string or null

此网络的网关地址。

GlobalIPv6Address
string or null

全局 IPv6 地址。

GlobalIPv6PrefixLen
integer or null <int64>

全局 IPv6 地址掩码长度。

IPAddress
string or null

IPv4 地址。

null or ContainerSpecEndpointIpamConfig (object)
One of
null
IPPrefixLen
integer or null <int64>

IPv4 地址掩码长度。

IPv6Gateway
string or null

IPv6 网关地址。

Links
数组元素类型 strings or null
MacAddress
string or null

端点在此网络上的 MAC 地址,网络驱动可能忽略此参数。

NetworkID
string or null

网络唯一 ID。

{
  • "IPAMConfig": { },
  • "Links": [
    ],
  • "MacAddress": "string",
  • "Aliases": [
    ],
  • "NetworkID": "string",
  • "EndpointID": "string",
  • "Gateway": "string",
  • "IPAddress": "string",
  • "IPPrefixLen": 0,
  • "IPv6Gateway": "string",
  • "GlobalIPv6Address": "string",
  • "GlobalIPv6PrefixLen": 0,
  • "DriverOpts": {
    },
  • "DNSNames": [
    ]
}

ContainerSpecHashMap

additional property
null or 数组元素类型 objects
One of
null
{
  • "property1": { },
  • "property2": { }
}

ContainerSpecHealthConfig

Interval
integer or null <int64>

检查之间的等待时间,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

Retries
integer or null <int64>

将容器视为不健康所需的连续失败次数,0 表示继承。

StartInterval
integer or null <int64>

启动宽限期内检查之间的等待时间,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

StartPeriod
integer or null <int64>

容器初始化的启动宽限期,在此期间不开始健康检查重试倒计时,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

Test
数组元素类型 strings or null

要执行的测试,可选值:[] 继承镜像或父镜像的健康检查;[\"NONE\"] 禁用健康检查;[\"CMD\", args...] 直接执行参数;[\"CMD-SHELL\", command] 用系统默认 Shell 运行命令。

Timeout
integer or null <int64>

判定检查卡住之前的等待时间,应为 0 或至少 1000000(1 毫秒),0 表示继承。

{
  • "Test": [
    ],
  • "Interval": 0,
  • "Timeout": 0,
  • "Retries": 0,
  • "StartPeriod": 0,
  • "StartInterval": 0
}

ContainerSpecHostConfig

object or null

附加到容器的任意非标识元数据,在容器启动时提供给运行时。

property name*
additional property
string
AutoRemove
boolean or null

容器进程退出时自动移除容器。设置 RestartPolicy 时无效。

Binds
数组元素类型 strings or null

容器的卷绑定列表,每项是以下格式之一的字符串:

  • host-src:container-dest[:options]:将主机路径绑定挂载到容器。host-src 和 container-dest 都必须是_绝对_路径。
  • volume-name:container-dest[:options]:将卷驱动管理的卷绑定挂载到容器,container-dest 必须是_绝对_路径。

options 是可选的逗号分隔列表,支持:

  • nocopy:禁用从容器路径到卷的自动数据复制,nocopy 仅适用于命名卷。
  • [ro|rw]:分别以只读或读写方式挂载卷。省略或设为 rw 时以读写方式挂载。
  • [z|Z]:应用 SELinux 标签,允许或禁止多个容器读写同一卷。
    • z:为内容应用_共享_标签,表示多个容器可共同读写卷内容。
    • Z:为内容应用_私有且不共享_标签,表示仅当前容器可使用私有卷。SELinux 等标签系统要求正确标记挂载到容器的卷内容;没有标签时,安全系统可能阻止进程访问。默认不会修改主机操作系统设置的标签。
  • [[r]shared|[r]slave|[r]private]:指定挂载传播行为。仅适用于绑定挂载,不适用于内部卷或命名卷。挂载传播要求源挂载点(主机中源目录的挂载位置)具有正确传播属性。共享卷的源挂载点必须为 shared;从属卷的挂载点必须为 shared 或 slave。
数组元素类型 objects or null (ContainerSpecThrottleDevice)

限制设备读取速率(每秒字节数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ContainerSpecThrottleDevice)

限制设备读取速率(每秒 IO 次数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ContainerSpecThrottleDevice)

限制设备写入速率(每秒字节数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ContainerSpecThrottleDevice)

限制设备写入速率(每秒 IO 次数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

BlkioWeight
integer or null <int32> >= 0

块 IO 权重(相对权重)。

数组元素类型 objects or null (ContainerSpecResourcesBlkioWeightDevice)

块 IO 权重(相对设备权重),格式为:[{\"Path\": \"device_path\", \"Weight\": weight}]

Array
Path
string or null
Weight
integer or null >= 0
CapAdd
数组元素类型 strings or null

要添加到容器的内核权限能力列表,与 'Capabilities' 选项冲突。

CapDrop
数组元素类型 strings or null

要从容器移除的内核权限能力列表,与 'Capabilities' 选项冲突。

Cgroup
string or null

容器使用的 cgroup。

null or ContainerSpecHostConfigCgroupnsModeEnum (string)
One of
null
CgroupParent
string or null

cgroups 中创建容器 cgroup 的路径。非绝对路径视为相对于初始化进程的 cgroups 路径。不存在时会创建 cgroup。

ConsoleSize
数组元素类型 integers or null <int32> [ items <int32 > ]

初始控制台大小,以 [height, width] 数组表示。

ContainerIDFile
string or null

写入容器 ID 的文件路径。

CpuCount
integer or null <int64>

可用 CPU 数量,仅限 Windows。Windows Server 容器的处理器资源控制互斥,优先级依次为 CPUCount、CPUShares、CPUPercent。

CpuPercent
integer or null <int64>

可用 CPU 的使用比例,仅限 Windows。Windows Server 容器的处理器资源控制互斥,优先级依次为 CPUCount、CPUShares、CPUPercent。

CpuPeriod
integer or null <int64>

CPU 周期长度,单位微秒。

CpuQuota
integer or null <int64>

容器在一个 CPU 周期内可获得的 CPU 时间,单位微秒。

CpuRealtimePeriod
integer or null <int64>

CPU 实时周期长度,单位微秒。设为 0 时不给实时任务分配时间。

CpuRealtimeRuntime
integer or null <int64>

CPU 实时运行时间长度,单位微秒。设为 0 时不给实时任务分配时间。

CpusetCpus
string or null

允许执行的 CPU(如 0-3、0,1)。

CpusetMems
string or null

允许执行的内存节点 MEM(0-3、0,1),仅在 NUMA 系统生效。

CpuShares
integer or null <int64>

整数值,表示此容器相对其他容器的 CPU 权重。

DeviceCgroupRules
数组元素类型 strings or null

要应用到容器的 cgroup 规则列表。

数组元素类型 objects or null (ContainerSpecDeviceRequest)

要发送给设备驱动的设备请求列表。

Array
Capabilities
数组元素类型 strings or null[ items ]

权限能力列表,由多个“与”能力列表以“或”关系组成。

Count
integer or null <int64>
DeviceIDs
数组元素类型 strings or null
Driver
string or null
object or null

驱动专属选项,以键值对指定,直接传递给驱动。

数组元素类型 objects or null (ContainerSpecDeviceMapping)

要添加到容器的设备列表。

Array
CgroupPermissions
string or null
PathInContainer
string or null
PathOnHost
string or null
Dns
数组元素类型 strings or null

容器使用的 DNS 服务器列表。

DnsOptions
数组元素类型 strings or null

DNS 选项列表。

DnsSearch
数组元素类型 strings or null

DNS 搜索域列表。

ExtraHosts
数组元素类型 strings or null

添加到容器 /etc/hosts 文件的主机名与 IP 映射列表,格式为 [\"hostname:IP\"]。

GroupAdd
数组元素类型 strings or null

容器进程运行时所属的附加用户组列表。

Init
boolean or null

在容器内运行初始化进程,转发信号并回收进程。为空时省略字段,使用守护进程配置的默认值。

IOMaximumBandwidth
integer or null <int64>

容器系统盘的最大每秒 IO 字节数(仅限 Windows)。

IOMaximumIOps
integer or null <int64>

容器系统盘的最大每秒 IO 次数(仅限 Windows)。

IpcMode
string or null

容器 IPC 共享模式,可选值:

  • \"none\":独立私有 IPC 命名空间,不挂载 /dev/shm。
  • \"private\":独立私有 IPC 命名空间。
  • \"shareable\":独立私有 IPC 命名空间,可以与其他容器共享。
  • \"container:<name|id>\":加入另一容器的可共享 IPC 命名空间。
  • \"host\":使用主机系统 IPC 命名空间。 未指定时使用守护进程默认值,根据版本和配置可能为 \"private\" 或 \"shareable\"。
null or ContainerSpecHostConfigIsolationEnum (string)
One of
null
KernelMemoryTCP
integer or null <int64>

内核 TCP 缓冲内存硬限制(字节)。根据 OCI 运行时,此选项可能被忽略。默认 runc 运行时已不再支持。值为空时省略此字段。

Links
数组元素类型 strings or null

容器链接列表,格式为 container_name:alias。

null or ContainerSpecHostConfigLogConfig (object)
One of
null
MaskedPaths
数组元素类型 strings or null

容器中要屏蔽的路径列表,覆盖默认路径集合。

Memory
integer or null <int64>

内存限制,单位字节。

MemoryReservation
integer or null <int64>

内存软限制,单位字节。

MemorySwap
integer or null <int64>

内存总限制(内存加交换空间)。设为 -1 可启用无限交换空间。

MemorySwappiness
integer or null <int64>

调整容器内存交换倾向,接受 0 到 100 的整数。

数组元素类型 objects or null (ContainerSpecMount)

要添加到容器的挂载规格。

Array
null or ContainerSpecMountBindOptions (object)
Consistency
string or null

挂载一致性要求:default、consistent、cached 或 delegated。

ReadOnly
boolean or null

挂载是否应为只读。

Source
string or null

挂载源,例如卷名称或主机路径。

Target
string or null

容器路径。

null or ContainerSpecMountTmpfsOptions (object)
null or ContainerSpecMountTypeEnum (string)
null or ContainerSpecMountVolumeOptions (object)
NanoCpus
integer or null <int64>

CPU 配额,以 10-9 个 CPU 为单位。

NetworkMode
string or null

容器使用的网络模式。支持标准值 bridge、host、none 和 container:<name|id>。其他值视为容器要连接的自定义网络名称。

OomKillDisable
boolean or null

禁用容器的 OOM killer。

OomScoreAdj
integer or null <int64>

整数值,表示容器的 OOM 分数,用于调整 OOM killer 的选择优先级。

PidMode
string or null

设置容器 PID(进程)命名空间模式,可选值为:\"container:<name|id>\" 加入另一容器的 PID 命名空间;\"host\" 在容器内使用主机 PID 命名空间。

PidsLimit
integer or null <int64>

调整容器 PID 限制。0 或 -1 表示无限制,null 表示不改变。

null or ContainerSpecHashMap (object)
One of
null
Privileged
boolean or null

给予容器对主机的完整访问权限。

PublishAllPorts
boolean or null

为容器所有公开端口分配临时主机端口。容器停止时释放端口,启动时重新分配,因此重启后可能改变。端口从内核决定的临时端口范围选择,例如 Linux 使用 /proc/sys/net/ipv4/ip_local_port_range 定义范围。

ReadonlyPaths
数组元素类型 strings or null

容器中要设为只读的路径列表,覆盖默认路径集合。

ReadonlyRootfs
boolean or null

以只读方式挂载容器根文件系统。

null or ContainerSpecRestartPolicy (object)
One of
null
Runtime
string or null

此容器使用的运行时。

SecurityOpt
数组元素类型 strings or null

用于自定义 SELinux 等 MLS 系统标签的字符串值列表。

ShmSize
integer or null <int64>

/dev/shm 大小,单位字节。省略时使用 64 MB。

object or null

容器存储驱动选项,格式为 {\"size\": \"120G\"}。

property name*
additional property
string
object or null

要在容器中设置的内核参数(sysctl)列表。例如:{\"net.ipv4.ip_forward\": \"1\"}

property name*
additional property
string
object or null

将容器目录映射到 tmpfs 挂载及相应挂载选项。例如:{ \"/run\": \"rw,noexec,nosuid,size=65536k\" }

property name*
additional property
string
数组元素类型 objects or null (ContainerSpecResourcesUlimits)

要在容器中设置的资源限制列表。例如:{\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}

Array
Hard
integer or null <int64>

硬限制。

Name
string or null

ulimit 名称。

Soft
integer or null <int64>

软限制。

UsernsMode
string or null

启用用户命名空间重映射时,设置容器的用户命名空间模式。

UTSMode
string or null

容器使用的 UTS 命名空间。

VolumeDriver
string or null

此容器挂载卷使用的驱动。

VolumesFrom
数组元素类型 strings or null

从其他容器继承的卷列表,格式为 <container name>[:<ro|rw>]。

{
  • "CpuShares": 0,
  • "Memory": 0,
  • "CgroupParent": "string",
  • "BlkioWeight": 0,
  • "BlkioWeightDevice": [
    ],
  • "BlkioDeviceReadBps": [
    ],
  • "BlkioDeviceWriteBps": [
    ],
  • "BlkioDeviceReadIOps": [
    ],
  • "BlkioDeviceWriteIOps": [
    ],
  • "CpuPeriod": 0,
  • "CpuQuota": 0,
  • "CpuRealtimePeriod": 0,
  • "CpuRealtimeRuntime": 0,
  • "CpusetCpus": "string",
  • "CpusetMems": "string",
  • "Devices": [
    ],
  • "DeviceCgroupRules": [
    ],
  • "DeviceRequests": [
    ],
  • "KernelMemoryTCP": 0,
  • "MemoryReservation": 0,
  • "MemorySwap": 0,
  • "MemorySwappiness": 0,
  • "NanoCpus": 0,
  • "OomKillDisable": true,
  • "Init": true,
  • "PidsLimit": 0,
  • "Ulimits": [
    ],
  • "CpuCount": 0,
  • "CpuPercent": 0,
  • "IOMaximumIOps": 0,
  • "IOMaximumBandwidth": 0,
  • "Binds": [
    ],
  • "ContainerIDFile": "string",
  • "LogConfig": { },
  • "NetworkMode": "string",
  • "PortBindings": { },
  • "RestartPolicy": { },
  • "AutoRemove": true,
  • "VolumeDriver": "string",
  • "VolumesFrom": [
    ],
  • "Mounts": [
    ],
  • "ConsoleSize": [
    ],
  • "Annotations": {
    },
  • "CapAdd": [
    ],
  • "CapDrop": [
    ],
  • "CgroupnsMode": { },
  • "Dns": [
    ],
  • "DnsOptions": [
    ],
  • "DnsSearch": [
    ],
  • "ExtraHosts": [
    ],
  • "GroupAdd": [
    ],
  • "IpcMode": "string",
  • "Cgroup": "string",
  • "Links": [
    ],
  • "OomScoreAdj": 0,
  • "PidMode": "string",
  • "Privileged": true,
  • "PublishAllPorts": true,
  • "ReadonlyRootfs": true,
  • "SecurityOpt": [
    ],
  • "StorageOpt": {
    },
  • "Tmpfs": {
    },
  • "UTSMode": "string",
  • "UsernsMode": "string",
  • "ShmSize": 0,
  • "Sysctls": {
    },
  • "Runtime": "string",
  • "Isolation": { },
  • "MaskedPaths": [
    ],
  • "ReadonlyPaths": [
    ]
}

ContainerSpecHostConfigCgroupnsModeEnum

string (ContainerSpecHostConfigCgroupnsModeEnum)
枚举值: "EMPTY" "private" "host"
"EMPTY"

ContainerSpecHostConfigIsolationEnum

string (ContainerSpecHostConfigIsolationEnum)
枚举值: "EMPTY" "default" "process" "hyperv"
"EMPTY"

ContainerSpecHostConfigLogConfig

object or null
property name*
additional property
string
Type
string or null
{
  • "Type": "string",
  • "Config": {
    }
}

ContainerSpecMount

null or ContainerSpecMountBindOptions (object)
One of
null
Consistency
string or null

挂载一致性要求:default、consistent、cached 或 delegated。

ReadOnly
boolean or null

挂载是否应为只读。

Source
string or null

挂载源,例如卷名称或主机路径。

Target
string or null

容器路径。

null or ContainerSpecMountTmpfsOptions (object)
One of
null
null or ContainerSpecMountTypeEnum (string)
One of
null
null or ContainerSpecMountVolumeOptions (object)
One of
null
{
  • "Target": "string",
  • "Source": "string",
  • "Type": { },
  • "ReadOnly": true,
  • "Consistency": "string",
  • "BindOptions": { },
  • "VolumeOptions": { },
  • "TmpfsOptions": { }
}

ContainerSpecMountBindOptions

CreateMountpoint
boolean or null

主机挂载点缺失时创建。

NonRecursive
boolean or null

禁用递归绑定挂载。

null or ContainerSpecMountBindOptionsPropagationEnum (string)
One of
null
ReadOnlyForceRecursive
boolean or null

无法将挂载设为递归只读时返回错误。

ReadOnlyNonRecursive
boolean or null

让挂载自身只读而非递归只读,但仍保留递归挂载(除非同时将 NonRecursive 设为 true)。v1.44 新增;此前所有只读挂载默认非递归。为兼容此前行为,v1.44 之前的客户端默认设为 true。

{
  • "Propagation": { },
  • "NonRecursive": true,
  • "CreateMountpoint": true,
  • "ReadOnlyNonRecursive": true,
  • "ReadOnlyForceRecursive": true
}

ContainerSpecMountBindOptionsPropagationEnum

string (ContainerSpecMountBindOptionsPropagationEnum)
枚举值: "EMPTY" "private" "rprivate" "shared" "rshared" "slave" "rslave"
"EMPTY"

ContainerSpecMountTmpfsOptions

Mode
integer or null <int64>

tmpfs 挂载的权限模式,以整数表示。

SizeBytes
integer or null <int64>

tmpfs 挂载大小,单位字节。

{
  • "SizeBytes": 0,
  • "Mode": 0
}

ContainerSpecMountTypeEnum

string (ContainerSpecMountTypeEnum)
枚举值: "EMPTY" "bind" "volume" "tmpfs" "npipe" "cluster"
"EMPTY"

ContainerSpecMountVolumeOptions

null or ContainerSpecMountVolumeOptionsDriverConfig (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
NoCopy
boolean or null

使用目标数据填充卷。

Subpath
string or null

卷内的源路径,必须是相对路径,且不能包含向父目录回退的片段。

{
  • "NoCopy": true,
  • "Labels": {
    },
  • "DriverConfig": { },
  • "Subpath": "string"
}

ContainerSpecMountVolumeOptionsDriverConfig

Name
string or null

创建卷所用驱动名称。

object or null

驱动专属选项的键值映射。

property name*
additional property
string
{
  • "Name": "string",
  • "Options": {
    }
}

ContainerSpecNetworkingConfig_String

required
object
additional property
object (ContainerSpecEndpointSettings)

网络端点配置。

{
  • "EndpointsConfig": {
    }
}

ContainerSpecResourcesBlkioWeightDevice

Path
string or null
Weight
integer or null >= 0
{
  • "Path": "string",
  • "Weight": 0
}

ContainerSpecResourcesUlimits

Hard
integer or null <int64>

硬限制。

Name
string or null

ulimit 名称。

Soft
integer or null <int64>

软限制。

{
  • "Name": "string",
  • "Soft": 0,
  • "Hard": 0
}

ContainerSpecRestartPolicy

MaximumRetryCount
integer or null <int64>

使用 on-failure 时,放弃前的重试次数。

null or ContainerSpecRestartPolicyNameEnum (string)
One of
null
{
  • "Name": { },
  • "MaximumRetryCount": 0
}

ContainerSpecRestartPolicyNameEnum

string (ContainerSpecRestartPolicyNameEnum)
枚举值: "EMPTY" "no" "always" "unless-stopped" "on-failure"
"EMPTY"

ContainerSpecThrottleDevice

Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

{
  • "Path": "string",
  • "Rate": 0
}

ContainerState

Dead
boolean or null
Error
string or null
ExitCode
integer or null <int64>

容器最近退出码。

FinishedAt
string or null

容器最近退出时间。

null or Health (object)
One of
null
OOMKilled
boolean or null

容器最近启动以来,内部进程是否因内存不足被终止。

Paused
boolean or null

容器是否暂停。

Pid
integer or null <int64>

容器进程 ID。

Restarting
boolean or null

容器是否正在重启。

Running
boolean or null

容器是否运行。注意运行容器也可_暂停_,Running 和 Paused 布尔值不互斥。在 Linux 上暂停容器时,使用 freezer cgroup 挂起全部进程。冻结要求进程正在运行,因此暂停容器同时为 Running 和 Paused。判断容器是否处于 "running" 状态,请使用 Status 字段。

StartedAt
string or null

容器最近启动时间。

null or ContainerStateStatusEnum (string)
One of
null
{
  • "Status": { },
  • "Running": true,
  • "Paused": true,
  • "Restarting": true,
  • "OOMKilled": true,
  • "Dead": true,
  • "Pid": 0,
  • "ExitCode": 0,
  • "Error": "string",
  • "StartedAt": "string",
  • "FinishedAt": "string",
  • "Health": { }
}

ContainerStateStatusEnum

string (ContainerStateStatusEnum)
枚举值: "EMPTY" "created" "running" "paused" "restarting" "removing" "exited" "dead"
"EMPTY"

DaemonConfig

advertise_addr
required
string

向其他节点公布的地址。

conf_dir
required
string

配置目录。

docker_host
string

使用的 Docker 主机。

gateway
required
string

主机网关,未设置时自动检测默认网关。

gid
required
integer <int32> >= 0

用户组 ID。

hostname
required
string

节点使用的主机名,未设置时自动检测。

hosts
required
数组元素类型 strings

监听地址列表。

nodes
required
数组元素类型 strings

要加入的节点列表。

null or SslConfig (object)
One of
null
state_dir
required
string

状态目录路径。

store_addr
string or null

存储连接地址。

{
  • "hosts": [
    ],
  • "state_dir": "string",
  • "docker_host": "string",
  • "store_addr": "string",
  • "gateway": "string",
  • "hostname": "string",
  • "nodes": [
    ],
  • "advertise_addr": "string",
  • "conf_dir": "string",
  • "gid": 0,
  • "ssl": { }
}

DeviceMapping

CgroupPermissions
string or null
PathInContainer
string or null
PathOnHost
string or null
{
  • "PathOnHost": "string",
  • "PathInContainer": "string",
  • "CgroupPermissions": "string"
}

DeviceRequest

Capabilities
数组元素类型 strings or null[ items ]

权限能力列表,由多个“与”能力列表以“或”关系组成。

Count
integer or null <int64>
DeviceIDs
数组元素类型 strings or null
Driver
string or null
object or null

驱动专属选项,以键值对指定,直接传递给驱动。

property name*
additional property
string
{
  • "Driver": "string",
  • "Count": 0,
  • "DeviceIDs": [
    ],
  • "Capabilities": [
    ],
  • "Options": {
    }
}

DnsEntry

required
string or object or object (NetworkKind)
One of
string

网络绑定选择器。

Name
required
string
{
  • "Name": "string",
  • "IpAddress": "string"
}

EndpointIpamConfig

IPv4Address
string or null
IPv6Address
string or null
LinkLocalIPs
数组元素类型 strings or null
{
  • "IPv4Address": "string",
  • "IPv6Address": "string",
  • "LinkLocalIPs": [
    ]
}

EndpointSettings

Aliases
数组元素类型 strings or null
DNSNames
数组元素类型 strings or null

端点在指定网络上的全部 DNS 名称,来自容器名称、网络别名、容器短 ID 和主机名。名称不是完全限定名称,但可包含多个点。添加 .<network-name> 可以得到完全限定名称。例如容器 my.ctr 位于 testnet 网络,DNSNames 包含 my.ctr,FQDN 为 my.ctr.testnet。

object or null

DriverOpts 是驱动选项和值的映射,直接传递给驱动,内容由具体驱动决定。

property name*
additional property
string
EndpointID
string or null

沙箱中服务端点的唯一 ID。

Gateway
string or null

此网络的网关地址。

GlobalIPv6Address
string or null

全局 IPv6 地址。

GlobalIPv6PrefixLen
integer or null <int64>

全局 IPv6 地址掩码长度。

IPAddress
string or null

IPv4 地址。

null or EndpointIpamConfig (object)
One of
null
IPPrefixLen
integer or null <int64>

IPv4 地址掩码长度。

IPv6Gateway
string or null

IPv6 网关地址。

Links
数组元素类型 strings or null
MacAddress
string or null

端点在此网络上的 MAC 地址,网络驱动可能忽略此参数。

NetworkID
string or null

网络唯一 ID。

{
  • "IPAMConfig": { },
  • "Links": [
    ],
  • "MacAddress": "string",
  • "Aliases": [
    ],
  • "NetworkID": "string",
  • "EndpointID": "string",
  • "Gateway": "string",
  • "IPAddress": "string",
  • "IPPrefixLen": 0,
  • "IPv6Gateway": "string",
  • "GlobalIPv6Address": "string",
  • "GlobalIPv6PrefixLen": 0,
  • "DriverOpts": {
    },
  • "DNSNames": [
    ]
}

Event

Action
required
string

Action 表示针对相关对象执行或失败的操作,供机器读取。新事件的此字段不能为空,最多 128 个字符。

null or EventActor (object)
One of
null
CreatedAt
required
string <date-time>

事件创建时间。

ExpiresAt
required
string <date-time>

事件到期时间。

Key
required
string <uuid>

事件唯一标识。

Kind
required
string (EventKind)
枚举值: "error" "normal" "warning"

此事件的类型(Error、Normal、Warning),未来可能新增类型。供机器读取;新事件的此字段不能为空。

object

标准元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Note
string or null

此次操作状态的人类可读描述。

Reason
required
string

Reason 是执行操作的原因,供人阅读。新事件的此字段不能为空,最多 128 个字符。

null or EventActor (object)
One of
null
ReportingController
required
string

Reporting Controller 是发出此事件的控制器名称,如 nanocl.io/core。新事件的此字段不能为空。

ReportingNode
required
string

Reporting Node 是生成事件的节点名称。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ExpiresAt": "2019-08-24T14:15:22Z",
  • "ReportingNode": "string",
  • "ReportingController": "string",
  • "Kind": "error",
  • "Action": "string",
  • "Reason": "string",
  • "Note": "string",
  • "Actor": { },
  • "Related": { },
  • "Metadata": {
    }
}

EventActor

object
additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Key
string or null
Kind
required
string (EventActorKind)
枚举值: "Namespace" "Cargo" "Vm" "Job" "Resource" "Secret" "Process" "ContainerImage"

Kind 是与对象类型相关的事件类型。

{
  • "Key": "string",
  • "Kind": "Namespace",
  • "Attributes": {
    }
}

EventActorKind

string (EventActorKind)
枚举值: "Namespace" "Cargo" "Vm" "Job" "Resource" "Secret" "Process" "ContainerImage"

Kind 是与对象类型相关的事件类型。

"Namespace"

EventCondition

required
数组元素类型 strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or strings or objects (NativeEventAction)
Array
One of
string
值: "create"

Action 是触发事件的操作。

ActorKey
string or null
null or EventActorKind (string)
One of
null
Kind
required
数组元素类型 strings (EventKind)
允许的元素 枚举值: "error" "normal" "warning"
RelatedKey
string or null
null or EventActorKind (string)
One of
null
{
  • "ActorKey": "string",
  • "ActorKind": { },
  • "RelatedKey": "string",
  • "RelatedKind": { },
  • "Kind": [
    ],
  • "Action": [
    ]
}

EventKind

string (EventKind)
枚举值: "error" "normal" "warning"

事件类型(Error、Normal、Warning),未来可能新增类型。

"error"

GenericCount

Count
required
integer <int64>

条目数量。

{
  • "Count": 0
}

GenericResourcesInner

null or GenericResourcesInnerDiscreteResourceSpec (object)
One of
null
null or GenericResourcesInnerNamedResourceSpec (object)
One of
null
{
  • "NamedResourceSpec": { },
  • "DiscreteResourceSpec": { }
}

GenericResourcesInnerDiscreteResourceSpec

Kind
string or null
Value
integer or null <int64>
{
  • "Kind": "string",
  • "Value": 0
}

GenericResourcesInnerNamedResourceSpec

Kind
string or null
Value
string or null
{
  • "Kind": "string",
  • "Value": "string"
}

GraphDriverData

required
object

底层存储元数据,以键值对提供。信息由所用存储驱动决定,仅供参考。

property name*
additional property
string
Name
required
string

存储驱动名称。

{
  • "Name": "string",
  • "Data": {
    }
}

HashMap

additional property
null or 数组元素类型 objects
One of
null
{
  • "property1": { },
  • "property2": { }
}

Health

FailingStreak
integer or null <int64>

FailingStreak 是连续失败次数。

数组元素类型 objects or null (HealthcheckResult)

Log 包含最近几次结果,最旧的在前。

Array
null or String (string)
ExitCode
integer or null <int64>

ExitCode 的含义:0 健康;1 不健康;2 保留(视为不健康);其他值表示运行探针时出错。

Output
string or null

最近一次检查的输出。

null or String (string)
null or HealthStatusEnum (string)
One of
null
{
  • "Status": { },
  • "FailingStreak": 0,
  • "Log": [
    ]
}

HealthConfig

Interval
integer or null <int64>

检查之间的等待时间,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

Retries
integer or null <int64>

将容器视为不健康所需的连续失败次数,0 表示继承。

StartInterval
integer or null <int64>

启动宽限期内检查之间的等待时间,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

StartPeriod
integer or null <int64>

容器初始化的启动宽限期,在此期间不开始健康检查重试倒计时,单位纳秒。应为 0 或至少 1000000(1 毫秒),0 表示继承。

Test
数组元素类型 strings or null

要执行的测试,可选值:[] 继承镜像或父镜像的健康检查;[\"NONE\"] 禁用健康检查;[\"CMD\", args...] 直接执行参数;[\"CMD-SHELL\", command] 用系统默认 Shell 运行命令。

Timeout
integer or null <int64>

判定检查卡住之前的等待时间,应为 0 或至少 1000000(1 毫秒),0 表示继承。

{
  • "Test": [
    ],
  • "Interval": 0,
  • "Timeout": 0,
  • "Retries": 0,
  • "StartPeriod": 0,
  • "StartInterval": 0
}

HealthStatusEnum

string (HealthStatusEnum)
枚举值: "EMPTY" "none" "starting" "healthy" "unhealthy"
"EMPTY"

HealthcheckResult

null or String (string)
One of
null
ExitCode
integer or null <int64>

ExitCode 的含义:0 健康;1 不健康;2 保留(视为不健康);其他值表示运行探针时出错。

Output
string or null

最近一次检查的输出。

null or String (string)
One of
null
{
  • "Start": { },
  • "End": { },
  • "ExitCode": 0,
  • "Output": "string"
}

HostConfig

object or null

附加到容器的任意非标识元数据,在容器启动时提供给运行时。

property name*
additional property
string
AutoRemove
boolean or null

容器进程退出时自动移除容器。设置 RestartPolicy 时无效。

Binds
数组元素类型 strings or null

容器的卷绑定列表,每项是以下格式之一的字符串:

  • host-src:container-dest[:options]:将主机路径绑定挂载到容器。host-src 和 container-dest 都必须是_绝对_路径。
  • volume-name:container-dest[:options]:将卷驱动管理的卷绑定挂载到容器,container-dest 必须是_绝对_路径。

options 是可选的逗号分隔列表,支持:

  • nocopy:禁用从容器路径到卷的自动数据复制,nocopy 仅适用于命名卷。
  • [ro|rw]:分别以只读或读写方式挂载卷。省略或设为 rw 时以读写方式挂载。
  • [z|Z]:应用 SELinux 标签,允许或禁止多个容器读写同一卷。
    • z:为内容应用_共享_标签,表示多个容器可共同读写卷内容。
    • Z:为内容应用_私有且不共享_标签,表示仅当前容器可使用私有卷。SELinux 等标签系统要求正确标记挂载到容器的卷内容;没有标签时,安全系统可能阻止进程访问。默认不会修改主机操作系统设置的标签。
  • [[r]shared|[r]slave|[r]private]:指定挂载传播行为。仅适用于绑定挂载,不适用于内部卷或命名卷。挂载传播要求源挂载点(主机中源目录的挂载位置)具有正确传播属性。共享卷的源挂载点必须为 shared;从属卷的挂载点必须为 shared 或 slave。
数组元素类型 objects or null (ThrottleDevice)

限制设备读取速率(每秒字节数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ThrottleDevice)

限制设备读取速率(每秒 IO 次数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ThrottleDevice)

限制设备写入速率(每秒字节数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

数组元素类型 objects or null (ThrottleDevice)

限制设备写入速率(每秒 IO 次数),格式为:[{\"Path\": \"device_path\", \"Rate\": rate}]

Array
Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

BlkioWeight
integer or null <int32> >= 0

块 IO 权重(相对权重)。

数组元素类型 objects or null (ResourcesBlkioWeightDevice)

块 IO 权重(相对设备权重),格式为:[{\"Path\": \"device_path\", \"Weight\": weight}]

Array
Path
string or null
Weight
integer or null >= 0
CapAdd
数组元素类型 strings or null

要添加到容器的内核权限能力列表,与 'Capabilities' 选项冲突。

CapDrop
数组元素类型 strings or null

要从容器移除的内核权限能力列表,与 'Capabilities' 选项冲突。

Cgroup
string or null

容器使用的 cgroup。

null or HostConfigCgroupnsModeEnum (string)
One of
null
CgroupParent
string or null

cgroups 中创建容器 cgroup 的路径。非绝对路径视为相对于初始化进程的 cgroups 路径。不存在时会创建 cgroup。

ConsoleSize
数组元素类型 integers or null <int32> [ items <int32 > ]

初始控制台大小,以 [height, width] 数组表示。

ContainerIDFile
string or null

写入容器 ID 的文件路径。

CpuCount
integer or null <int64>

可用 CPU 数量,仅限 Windows。Windows Server 容器的处理器资源控制互斥,优先级依次为 CPUCount、CPUShares、CPUPercent。

CpuPercent
integer or null <int64>

可用 CPU 的使用比例,仅限 Windows。Windows Server 容器的处理器资源控制互斥,优先级依次为 CPUCount、CPUShares、CPUPercent。

CpuPeriod
integer or null <int64>

CPU 周期长度,单位微秒。

CpuQuota
integer or null <int64>

容器在一个 CPU 周期内可获得的 CPU 时间,单位微秒。

CpuRealtimePeriod
integer or null <int64>

CPU 实时周期长度,单位微秒。设为 0 时不给实时任务分配时间。

CpuRealtimeRuntime
integer or null <int64>

CPU 实时运行时间长度,单位微秒。设为 0 时不给实时任务分配时间。

CpusetCpus
string or null

允许执行的 CPU(如 0-3、0,1)。

CpusetMems
string or null

允许执行的内存节点 MEM(0-3、0,1),仅在 NUMA 系统生效。

CpuShares
integer or null <int64>

整数值,表示此容器相对其他容器的 CPU 权重。

DeviceCgroupRules
数组元素类型 strings or null

要应用到容器的 cgroup 规则列表。

数组元素类型 objects or null (DeviceRequest)

要发送给设备驱动的设备请求列表。

Array
Capabilities
数组元素类型 strings or null[ items ]

权限能力列表,由多个“与”能力列表以“或”关系组成。

Count
integer or null <int64>
DeviceIDs
数组元素类型 strings or null
Driver
string or null
object or null

驱动专属选项,以键值对指定,直接传递给驱动。

数组元素类型 objects or null (DeviceMapping)

要添加到容器的设备列表。

Array
CgroupPermissions
string or null
PathInContainer
string or null
PathOnHost
string or null
Dns
数组元素类型 strings or null

容器使用的 DNS 服务器列表。

DnsOptions
数组元素类型 strings or null

DNS 选项列表。

DnsSearch
数组元素类型 strings or null

DNS 搜索域列表。

ExtraHosts
数组元素类型 strings or null

添加到容器 /etc/hosts 文件的主机名与 IP 映射列表,格式为 [\"hostname:IP\"]。

GroupAdd
数组元素类型 strings or null

容器进程运行时所属的附加用户组列表。

Init
boolean or null

在容器内运行初始化进程,转发信号并回收进程。为空时省略字段,使用守护进程配置的默认值。

IOMaximumBandwidth
integer or null <int64>

容器系统盘的最大每秒 IO 字节数(仅限 Windows)。

IOMaximumIOps
integer or null <int64>

容器系统盘的最大每秒 IO 次数(仅限 Windows)。

IpcMode
string or null

容器 IPC 共享模式,可选值:

  • \"none\":独立私有 IPC 命名空间,不挂载 /dev/shm。
  • \"private\":独立私有 IPC 命名空间。
  • \"shareable\":独立私有 IPC 命名空间,可以与其他容器共享。
  • \"container:<name|id>\":加入另一容器的可共享 IPC 命名空间。
  • \"host\":使用主机系统 IPC 命名空间。 未指定时使用守护进程默认值,根据版本和配置可能为 \"private\" 或 \"shareable\"。
null or HostConfigIsolationEnum (string)
One of
null
KernelMemoryTCP
integer or null <int64>

内核 TCP 缓冲内存硬限制(字节)。根据 OCI 运行时,此选项可能被忽略。默认 runc 运行时已不再支持。值为空时省略此字段。

Links
数组元素类型 strings or null

容器链接列表,格式为 container_name:alias。

null or HostConfigLogConfig (object)
One of
null
MaskedPaths
数组元素类型 strings or null

容器中要屏蔽的路径列表,覆盖默认路径集合。

Memory
integer or null <int64>

内存限制,单位字节。

MemoryReservation
integer or null <int64>

内存软限制,单位字节。

MemorySwap
integer or null <int64>

内存总限制(内存加交换空间)。设为 -1 可启用无限交换空间。

MemorySwappiness
integer or null <int64>

调整容器内存交换倾向,接受 0 到 100 的整数。

数组元素类型 objects or null (Mount)

要添加到容器的挂载规格。

Array
null or MountBindOptions (object)
Consistency
string or null

挂载一致性要求:default、consistent、cached 或 delegated。

ReadOnly
boolean or null

挂载是否应为只读。

Source
string or null

挂载源,例如卷名称或主机路径。

Target
string or null

容器路径。

null or MountTmpfsOptions (object)
null or MountTypeEnum (string)
null or MountVolumeOptions (object)
NanoCpus
integer or null <int64>

CPU 配额,以 10-9 个 CPU 为单位。

NetworkMode
string or null

容器使用的网络模式。支持标准值 bridge、host、none 和 container:<name|id>。其他值视为容器要连接的自定义网络名称。

OomKillDisable
boolean or null

禁用容器的 OOM killer。

OomScoreAdj
integer or null <int64>

整数值,表示容器的 OOM 分数,用于调整 OOM killer 的选择优先级。

PidMode
string or null

设置容器 PID(进程)命名空间模式,可选值为:\"container:<name|id>\" 加入另一容器的 PID 命名空间;\"host\" 在容器内使用主机 PID 命名空间。

PidsLimit
integer or null <int64>

调整容器 PID 限制。0 或 -1 表示无限制,null 表示不改变。

null or HashMap (object)
One of
null
Privileged
boolean or null

给予容器对主机的完整访问权限。

PublishAllPorts
boolean or null

为容器所有公开端口分配临时主机端口。容器停止时释放端口,启动时重新分配,因此重启后可能改变。端口从内核决定的临时端口范围选择,例如 Linux 使用 /proc/sys/net/ipv4/ip_local_port_range 定义范围。

ReadonlyPaths
数组元素类型 strings or null

容器中要设为只读的路径列表,覆盖默认路径集合。

ReadonlyRootfs
boolean or null

以只读方式挂载容器根文件系统。

null or RestartPolicy (object)
One of
null
Runtime
string or null

此容器使用的运行时。

SecurityOpt
数组元素类型 strings or null

用于自定义 SELinux 等 MLS 系统标签的字符串值列表。

ShmSize
integer or null <int64>

/dev/shm 大小,单位字节。省略时使用 64 MB。

object or null

容器存储驱动选项,格式为 {\"size\": \"120G\"}。

property name*
additional property
string
object or null

要在容器中设置的内核参数(sysctl)列表。例如:{\"net.ipv4.ip_forward\": \"1\"}

property name*
additional property
string
object or null

将容器目录映射到 tmpfs 挂载及相应挂载选项。例如:{ \"/run\": \"rw,noexec,nosuid,size=65536k\" }

property name*
additional property
string
数组元素类型 objects or null (ResourcesUlimits)

要在容器中设置的资源限制列表。例如:{\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}

Array
Hard
integer or null <int64>

硬限制。

Name
string or null

ulimit 名称。

Soft
integer or null <int64>

软限制。

UsernsMode
string or null

启用用户命名空间重映射时,设置容器的用户命名空间模式。

UTSMode
string or null

容器使用的 UTS 命名空间。

VolumeDriver
string or null

此容器挂载卷使用的驱动。

VolumesFrom
数组元素类型 strings or null

从其他容器继承的卷列表,格式为 <container name>[:<ro|rw>]。

{
  • "CpuShares": 0,
  • "Memory": 0,
  • "CgroupParent": "string",
  • "BlkioWeight": 0,
  • "BlkioWeightDevice": [
    ],
  • "BlkioDeviceReadBps": [
    ],
  • "BlkioDeviceWriteBps": [
    ],
  • "BlkioDeviceReadIOps": [
    ],
  • "BlkioDeviceWriteIOps": [
    ],
  • "CpuPeriod": 0,
  • "CpuQuota": 0,
  • "CpuRealtimePeriod": 0,
  • "CpuRealtimeRuntime": 0,
  • "CpusetCpus": "string",
  • "CpusetMems": "string",
  • "Devices": [
    ],
  • "DeviceCgroupRules": [
    ],
  • "DeviceRequests": [
    ],
  • "KernelMemoryTCP": 0,
  • "MemoryReservation": 0,
  • "MemorySwap": 0,
  • "MemorySwappiness": 0,
  • "NanoCpus": 0,
  • "OomKillDisable": true,
  • "Init": true,
  • "PidsLimit": 0,
  • "Ulimits": [
    ],
  • "CpuCount": 0,
  • "CpuPercent": 0,
  • "IOMaximumIOps": 0,
  • "IOMaximumBandwidth": 0,
  • "Binds": [
    ],
  • "ContainerIDFile": "string",
  • "LogConfig": { },
  • "NetworkMode": "string",
  • "PortBindings": { },
  • "RestartPolicy": { },
  • "AutoRemove": true,
  • "VolumeDriver": "string",
  • "VolumesFrom": [
    ],
  • "Mounts": [
    ],
  • "ConsoleSize": [
    ],
  • "Annotations": {
    },
  • "CapAdd": [
    ],
  • "CapDrop": [
    ],
  • "CgroupnsMode": { },
  • "Dns": [
    ],
  • "DnsOptions": [
    ],
  • "DnsSearch": [
    ],
  • "ExtraHosts": [
    ],
  • "GroupAdd": [
    ],
  • "IpcMode": "string",
  • "Cgroup": "string",
  • "Links": [
    ],
  • "OomScoreAdj": 0,
  • "PidMode": "string",
  • "Privileged": true,
  • "PublishAllPorts": true,
  • "ReadonlyRootfs": true,
  • "SecurityOpt": [
    ],
  • "StorageOpt": {
    },
  • "Tmpfs": {
    },
  • "UTSMode": "string",
  • "UsernsMode": "string",
  • "ShmSize": 0,
  • "Sysctls": {
    },
  • "Runtime": "string",
  • "Isolation": { },
  • "MaskedPaths": [
    ],
  • "ReadonlyPaths": [
    ]
}

HostConfigCgroupnsModeEnum

string (HostConfigCgroupnsModeEnum)
枚举值: "EMPTY" "private" "host"
"EMPTY"

HostConfigIsolationEnum

string (HostConfigIsolationEnum)
枚举值: "EMPTY" "default" "process" "hyperv"
"EMPTY"

HostConfigLogConfig

object or null
property name*
additional property
string
Type
string or null
{
  • "Type": "string",
  • "Config": {
    }
}

HostInfo

Architecture
string or null

主机硬件架构,由 Go 运行时(GOARCH)返回。完整取值见 Go 文档。

BridgeNfIp6tables
boolean or null

表示主机是否提供 bridge-nf-call-ip6tables。

BridgeNfIptables
boolean or null

表示主机是否提供 bridge-nf-call-iptables。

CDISpecDirs
数组元素类型 strings or null

CDI(Container Device Interface)规范所在目录列表。规范定义创建容器时,对 OCI 运行时规格所做的厂商专属修改。列表为空表示禁用 CDI 设备注入。CDI 注入要求守护进程启用实验性功能,非实验性守护进程始终返回空列表。

null or SystemInfoCgroupDriverEnum (string)
One of
null
null or SystemInfoCgroupVersionEnum (string)
One of
null
required
object (DaemonConfig)

守护进程配置。

advertise_addr
required
string

向其他节点公布的地址。

conf_dir
required
string

配置目录。

docker_host
string

使用的 Docker 主机。

gateway
required
string

主机网关,未设置时自动检测默认网关。

gid
required
integer <int32> >= 0

用户组 ID。

hostname
required
string

节点使用的主机名,未设置时自动检测。

hosts
required
数组元素类型 strings

监听地址列表。

nodes
required
数组元素类型 strings

要加入的节点列表。

null or SslConfig (object)
state_dir
required
string

状态目录路径。

store_addr
string or null

存储连接地址。

null or Commit (object)
One of
null
Containers
integer or null <int64>

主机容器总数。

ContainersPaused
integer or null <int64>

状态为 \"paused\" 的容器数量。

ContainersRunning
integer or null <int64>

状态为 \"running\" 的容器数量。

ContainersStopped
integer or null <int64>

状态为 \"stopped\" 的容器数量。

CpuCfsPeriod
boolean or null

表示主机是否支持 CPU CFS(完全公平调度器)周期。

CpuCfsQuota
boolean or null

表示主机是否支持 CPU CFS(完全公平调度器)配额。

CPUSet
boolean or null

表示主机是否支持 CPUset(cpuset.cpus、cpuset.mems)。参见 cpuset(7)。

CPUShares
boolean or null

表示主机是否支持 CPU Shares 限制。

Debug
boolean or null

表示守护进程是否在调试模式运行,或启用了调试级日志。

数组元素类型 objects or null (SystemInfoDefaultAddressPools)

本地网络的自定义默认地址池列表,可在 daemon.json 或 dockerd 选项中指定。例如 Base 为 "10.10.0.0/16"、Size 为 24 时,会定义 256 个 10.10.[0-255].0/24 地址池。

Array
Base
string or null

CIDR 格式网络地址。

Size
integer or null <int64>

网络池大小。

DefaultRuntime
string or null

启动容器时默认使用的 OCI 运行时名称,可在创建各容器时覆盖。

DockerRootDir
string or null

Docker 持久化状态根目录。Linux 默认为 /var/lib/docker,Windows 默认为 C:\\ProgramData\\docker。

Driver
string or null

正在使用的存储驱动名称。

DriverStatus
数组元素类型 strings or null[ items ]

存储驱动专属信息,由驱动提供 "label" / "value" 对,格式与命令行 docker info 输出一致。


> 注意:此字段返回的信息,包括值和标签格式,不应视为稳定,可能不经通知而改变。

ExperimentalBuild
boolean or null

表示守护进程是否启用实验性功能。

null or GenericResourcesInner (object)
One of
null
HostGateway
required
string

HostGateway 是主机网关地址。

HttpProxy
string or null

守护进程的 HTTP 代理配置,来自 HTTP_PROXY 环境变量。API 响应会遮蔽代理 URL 中的凭据(用户信息部分)。容器不会自动继承此配置。

HttpsProxy
string or null

守护进程的 HTTPS 代理配置,来自 HTTPS_PROXY 环境变量。API 响应会遮蔽代理 URL 中的凭据(用户信息部分)。容器不会自动继承此配置。

ID
string or null

守护进程唯一标识。


> 注意:ID 格式本身不属于 API,不应视为稳定。

Images
integer or null <int64>

主机镜像总数,包括_有标签_和_无标签_(悬空)镜像。

IndexServerAddress
string or null

镜像搜索所用索引服务器的地址或 URL,也作为 Docker Hub 和 Docker Cloud 用户认证的默认服务器。

InitBinary
string or null

docker-init 二进制文件名称及可选路径。省略路径时,守护进程搜索主机 $PATH 并使用首个结果。

null or Commit (object)
One of
null
IPv4Forwarding
boolean or null

表示是否启用 IPv4 转发。

null or SystemInfoIsolationEnum (string)
One of
null
KernelMemoryTCP
boolean or null

表示主机是否启用内核 TCP 内存限制,不支持时省略。cgroup v2 不支持内核 TCP 内存限制及对应的 memory.kmem.tcp.limit_in_bytes cgroup。

KernelVersion
string or null

主机内核版本。Linux 从 uname 获取;Windows 从注册表 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ 获取,例如 _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_。

Labels
数组元素类型 strings or null

守护进程上设置的用户自定义标签(键值元数据)。


> 注意:Swarm 节点可同时具有通过守护进程配置设置的_守护进程_标签,以及通过 Swarm 管理节点设置的_节点_标签。此字段不包含节点标签,可通过管理节点的 /nodes/(id) 端点获取。

LiveRestoreEnabled
boolean or null

表示是否启用 live restore。启用后,守护进程关闭时容器继续运行;守护进程启动并检测到运行中的容器时也保持运行。

LoggingDriver
string or null

新容器默认使用的日志驱动。

MemoryLimit
boolean or null

表示主机是否支持内存限制。

MemTotal
integer or null <int64>

主机可用物理内存总量,单位字节。

Name
string or null

主机的主机名。

NCPU
integer or null <int64>

守护进程可使用的逻辑 CPU 数量,启动时通过操作系统查询。启动后操作系统 CPU 分配变化不会反映在此值中。

required
object (Network)

网络配置。

Attachable
boolean or null
object or null
null or String (string)
Driver
string or null
EnableIPv6
boolean or null
Id
string or null
Ingress
boolean or null
Internal
boolean or null
null or Ipam (object)
object or null
Name
string or null
object or null
Scope
string or null
NEventsListener
integer or null <int64>

已订阅的事件监听器数量。

NFd
integer or null <int64>

守护进程使用的文件描述符总数,仅在启用调试模式时返回。

NGoroutines
integer or null <int64>

当前 goroutine 数量,仅在启用调试模式时返回。

NoProxy
string or null

不使用代理的域名后缀列表,以逗号分隔。此值来自 NO_PROXY 环境变量。容器不会自动继承此配置。

OomKillDisable
boolean or null

表示主机是否支持禁用 OOM killer。

OperatingSystem
string or null

主机操作系统名称,如 "Ubuntu 16.04.2 LTS" 或 "Windows Server 2016 Datacenter"。

OSType
string or null

主机操作系统的通用类型,由 Go 运行时(GOOS)返回。目前值为 "linux" 和 "windows"。完整取值列表见 Go 文档。

OSVersion
string or null

主机操作系统版本。


> 注意:此字段返回的信息,包括字段是否存在和取值格式,不应视为稳定,可能不经通知而改变。

PidsLimit
boolean or null

表示主机内核是否支持 PID 限制。

null or PluginsInfo (object)
One of
null
ProductLicense
string or null

报告守护进程的产品许可证摘要。如果应用了商业许可证,会包含节点数量和到期时间等信息。

null or RegistryServiceConfig (object)
One of
null
null or Commit (object)
One of
null
object or null

守护进程配置的 OCI 兼容运行时列表,键保存引用运行时的名称。Docker 守护进程依靠经 containerd 调用的 OCI 运行时连接 Linux 内核命名空间、cgroup 和 SELinux。默认运行时是自动配置的 runc;用户可配置额外运行时,并在此列出。

additional property
object (Runtime)

Runtime 描述 OCI 兼容运行时。守护进程通过 containerd 调用运行时,连接 Linux 内核命名空间、cgroup 和 SELinux。

SecurityOptions
数组元素类型 strings or null

守护进程启用的安全功能列表,如 apparmor、seccomp、SELinux、用户命名空间 userns、rootless 和 no-new-privileges。各功能可能包含额外配置,以逗号分隔的键值对列出。

ServerVersion
string or null

守护进程版本字符串。

SwapLimit
boolean or null

表示主机是否支持交换内存限制。

null or SwarmInfo (object)
One of
null
SystemTime
string or null

当前系统时间,使用纳秒精度的 RFC 3339 格式。

Warnings
数组元素类型 strings or null

缺失功能或守护进程配置问题的警告和信息消息列表,客户端可将这些消息展示给用户。

{
  • "ID": "string",
  • "Containers": 0,
  • "ContainersRunning": 0,
  • "ContainersPaused": 0,
  • "ContainersStopped": 0,
  • "Images": 0,
  • "Driver": "string",
  • "DriverStatus": [
    ],
  • "DockerRootDir": "string",
  • "Plugins": { },
  • "MemoryLimit": true,
  • "SwapLimit": true,
  • "KernelMemoryTCP": true,
  • "CpuCfsPeriod": true,
  • "CpuCfsQuota": true,
  • "CPUShares": true,
  • "CPUSet": true,
  • "PidsLimit": true,
  • "OomKillDisable": true,
  • "IPv4Forwarding": true,
  • "BridgeNfIptables": true,
  • "BridgeNfIp6tables": true,
  • "Debug": true,
  • "NFd": 0,
  • "NGoroutines": 0,
  • "SystemTime": "string",
  • "LoggingDriver": "string",
  • "CgroupDriver": { },
  • "CgroupVersion": { },
  • "NEventsListener": 0,
  • "KernelVersion": "string",
  • "OperatingSystem": "string",
  • "OSVersion": "string",
  • "OSType": "string",
  • "Architecture": "string",
  • "NCPU": 0,
  • "MemTotal": 0,
  • "IndexServerAddress": "string",
  • "RegistryConfig": { },
  • "GenericResources": { },
  • "HttpProxy": "string",
  • "HttpsProxy": "string",
  • "NoProxy": "string",
  • "Name": "string",
  • "Labels": [
    ],
  • "ExperimentalBuild": true,
  • "ServerVersion": "string",
  • "Runtimes": {
    },
  • "DefaultRuntime": "string",
  • "Swarm": { },
  • "LiveRestoreEnabled": true,
  • "Isolation": { },
  • "InitBinary": "string",
  • "ContainerdCommit": { },
  • "RuncCommit": { },
  • "InitCommit": { },
  • "SecurityOptions": [
    ],
  • "ProductLicense": "string",
  • "DefaultAddressPools": [
    ],
  • "Warnings": [
    ],
  • "CDISpecDirs": [
    ],
  • "HostGateway": "string",
  • "Network": {
    },
  • "Config": {
    }
}

Hsts

One of
string
值: "Recommended"
{
  • "Config": {
    }
}

HstsConfig

Always
required
boolean
IncludeSubDomains
required
boolean
MaxAge
required
integer <int64> >= 0
Preload
required
boolean
{
  • "MaxAge": 0,
  • "Preload": true,
  • "Always": true,
  • "IncludeSubDomains": true
}

HttpTarget

null or UrlRedirect (string)
One of
null
Url
required
string

目标 URL。

{
  • "Url": "string",
  • "Redirect": { }
}

ImagePullPolicy

string (ImagePullPolicy)
枚举值: "Never" "Always" "IfNotPresent"

进程对象(Job、Cargo、VM)相关镜像的拉取策略。

"Never"

IndexInfo

Mirrors
数组元素类型 strings or null

镜像源列表,以 URI 表示。

Name
string or null

镜像仓库名称,如 "docker.io"。

Official
boolean or null

表示是否为官方镜像仓库(Docker Hub / docker.io)。

Secure
boolean or null

表示镜像仓库是否属于不安全仓库列表。值为 false 时仓库不安全。不安全仓库允许未加密的 HTTP,或不可信的 HTTPS(使用未知 CA 证书)通信。> 警告:不安全仓库有助于本地测试,但存在安全漏洞,只应在测试时启用。为了提高安全性,应将 CA 加入系统可信 CA 列表,而不是启用此选项。

{
  • "Name": "string",
  • "Mirrors": [
    ],
  • "Secure": true,
  • "Official": true
}

Ipam

数组元素类型 objects or null (IpamConfig)

IPAM 配置选项列表,以映射指定:{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}

Array
object or null
Gateway
string or null
IPRange
string or null
Subnet
string or null
Driver
string or null

使用的 IPAM 驱动名称。

object or null

驱动专属选项,以映射指定。

property name*
additional property
string
{
  • "Driver": "string",
  • "Config": [
    ],
  • "Options": {
    }
}

IpamConfig

object or null
property name*
additional property
string
Gateway
string or null
IPRange
string or null
Subnet
string or null
{
  • "Subnet": "string",
  • "IPRange": "string",
  • "Gateway": "string",
  • "AuxiliaryAddresses": {
    }
}

Job

CreatedAt
required
string <date-time>

任务创建时间。

required
object (JobSpec)

任务规格。

required
数组元素类型 objects (Config)

要运行的容器。

null or ImagePullPolicy (string)
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

Name
required
string

任务名称。

Schedule
string or null

任务调度时间(cron)。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

required
object (ObjPsStatus)

任务状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>

任务更新时间。

{
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

JobInspect

CreatedAt
required
string <date-time>

任务创建时间。

InstanceFailed
required
integer >= 0

失败实例数。

InstanceRunning
required
integer >= 0

运行实例数。

required
数组元素类型 objects (Process)

实例列表。

Array
CreatedAt
required
string <date-time>

创建时间。

required
object (ContainerInspectResponse)

进程数据,类型为 ContainerInspect。

IpAddress
string or null

从最近观察到的进程状态解析的有效 IP 地址。

Key
required
string

进程键。

Kind
required
string (ProcessKind)
枚举值: "vm" "job" "cargo"

进程类型(Job、Vm、Cargo)。

KindKey
required
string

Cargo 和 VM 的规范资源键;任务使用名称。

Name
required
string

进程名称。

NodeName
required
string

容器运行所在节点的名称。

UpdatedAt
required
string <date-time>

实例最近更新时间。

InstanceSuccess
required
integer >= 0

成功实例数。

InstanceTotal
required
integer >= 0

实例数量。

required
object (JobSpec)

任务规格。

required
数组元素类型 objects (Config)

要运行的容器。

null or ImagePullPolicy (string)
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

Name
required
string

任务名称。

Schedule
string or null

任务调度时间(cron)。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

required
object (ObjPsStatus)

任务状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>

任务更新时间。

{
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "InstanceTotal": 0,
  • "InstanceSuccess": 0,
  • "InstanceRunning": 0,
  • "InstanceFailed": 0,
  • "Spec": {
    },
  • "Instances": [
    ]
}

JobPartial

required
数组元素类型 objects (Config)

要运行的容器列表。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or HealthConfig (object)
null or HostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

NetworkDisabled
boolean or null

禁用容器网络。

null or NetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

null or ImagePullPolicy (string)
One of
null
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

任务名称。

Schedule
string or null

五字段 cron 表达式或支持的快捷形式;参见 [crate::cron::validate_schedule]。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

{
  • "Name": "string",
  • "Secrets": [
    ],
  • "Metadata": {
    },
  • "Schedule": "string",
  • "Ttl": 0,
  • "ImagePullSecret": "string",
  • "ImagePullPolicy": { },
  • "Containers": [
    ]
}

JobSpec

required
数组元素类型 objects (Config)

要运行的容器。

Array
ArgsEscaped
boolean or null

命令已转义(仅限 Windows)。

AttachStderr
boolean or null

是否连接 stderr。

AttachStdin
boolean or null

是否连接 stdin。

AttachStdout
boolean or null

是否连接 stdout。

Cmd
数组元素类型 strings or null

要运行的命令,指定为字符串或字符串数组。

Domainname
string or null

容器使用的域名。

Entrypoint
数组元素类型 strings or null

容器入口点,指定为字符串或字符串数组。如果数组仅包含一个空字符串([\"\"]),则重置为系统默认入口点,即没有 ENTRYPOINT 指令的 Dockerfile 所对应的 Docker 入口点。

Env
数组元素类型 strings or null

在容器内设置的环境变量列表,格式为 [\"VAR=value\", ...]。不带 = 的变量会从环境中移除,而不是设为空值。

object or null

将端口映射到空对象的对象,格式为 {\"<port>/<tcp|udp|sctp>\": {}}。

null or HealthConfig (object)
null or HostConfig (object)
Hostname
string or null

容器主机名,必须符合 RFC 1123。

Image
string or null

创建容器时使用的镜像名称。

object or null

用户定义的键值元数据。

MacAddress
string or null

容器 MAC 地址。

NetworkDisabled
boolean or null

禁用容器网络。

null or NetworkingConfig_String (object)
OnBuild
数组元素类型 strings or null

ONBUILD 元数据,定义于镜像的 Dockerfile。

OpenStdin
boolean or null

打开 stdin。

Shell
数组元素类型 strings or null

RUN、CMD 和 ENTRYPOINT 使用 Shell 时所用的 Shell。

StdinOnce
boolean or null

一个已连接客户端断开后关闭 stdin。

StopSignal
string or null

停止容器的信号,指定为字符串或无符号整数。

StopTimeout
integer or null <int64>

停止容器的超时,单位秒。

Tty
boolean or null

将标准流连接到 TTY,包括尚未关闭的 stdin。

User
string or null

容器内执行命令的用户。

object or null

将容器内挂载点路径映射到空对象的对象。

WorkingDir
string or null

命令运行的工作目录。

null or ImagePullPolicy (string)
One of
null
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

任务名称。

Schedule
string or null

任务调度时间(cron)。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

{
  • "Name": "string",
  • "Secrets": [
    ],
  • "Metadata": {
    },
  • "Schedule": "string",
  • "Ttl": 0,
  • "ImagePullSecret": "string",
  • "ImagePullPolicy": { },
  • "Containers": [
    ]
}

JobSummary

CreatedAt
required
string <date-time>

任务创建时间。

InstanceFailed
required
integer >= 0

失败实例数。

InstanceRunning
required
integer >= 0

运行实例数。

InstanceSuccess
required
integer >= 0

成功实例数。

InstanceTotal
required
integer >= 0

实例数量。

required
object (JobSpec)

任务规格。

required
数组元素类型 objects (Config)

要运行的容器。

null or ImagePullPolicy (string)
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

Name
required
string

任务名称。

Schedule
string or null

任务调度时间(cron)。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

required
object (ObjPsStatus)

任务状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>

任务更新时间。

{
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "InstanceTotal": 0,
  • "InstanceSuccess": 0,
  • "InstanceRunning": 0,
  • "InstanceFailed": 0,
  • "Spec": {
    }
}

LimitReq

Burst
required
integer >= 0

突发容量。

Delay
integer or null >= 0

重试前的等待时间。

{
  • "Burst": 0,
  • "Delay": 0
}

LimitReqZone

Rate
required
integer >= 0

每秒最大请求数。

Size
required
integer >= 0

缓存最大大小,单位 MB。

{
  • "Size": 0,
  • "Rate": 0
}

LocalNodeState

string (LocalNodeState)
枚举值: "EMPTY" "inactive" "pending" "active" "error" "locked"

此节点当前本地状态,使用枚举值表示。枚举变体不携带数据,可定义为 #[repr(C)],便于 FFI。

"EMPTY"

LocationTarget

One of
DisableLogging
boolean or null

禁用此目标的日志。

Key
required
string

目标 Cargo 或 VM 的键。

Path
string or null

使用 HTTP 时的目标路径。

Port
required
integer <int32> >= 0

目标 Cargo 或 VM 的端口。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
Example
{
  • "Key": "string",
  • "Port": 0,
  • "Path": "string",
  • "DisableLogging": true,
  • "Ssl": { }
}

MemoryStats

commit
integer or null <int64> >= 0
commit_peak
integer or null <int64> >= 0
commitbytes
integer or null <int64> >= 0
commitpeakbytes
integer or null <int64> >= 0
failcnt
integer or null <int64> >= 0
limit
integer or null <int64> >= 0
max_usage
integer or null <int64> >= 0
privateworkingset
integer or null <int64> >= 0
null or (MemoryStatsStats (MemoryStatsStatsV1 (object) or MemoryStatsStatsV2 (object)))
One of
null
usage
integer or null <int64> >= 0
{
  • "stats": { },
  • "max_usage": 0,
  • "usage": 0,
  • "failcnt": 0,
  • "limit": 0,
  • "commit": 0,
  • "commit_peak": 0,
  • "commitbytes": 0,
  • "commitpeakbytes": 0,
  • "privateworkingset": 0
}

MemoryStatsStats

One of
active_anon
required
integer <int64> >= 0
active_file
required
integer <int64> >= 0
cache
required
integer <int64> >= 0
dirty
required
integer <int64> >= 0
hierarchical_memory_limit
required
integer <int64> >= 0
hierarchical_memsw_limit
integer or null <int64> >= 0
inactive_anon
required
integer <int64> >= 0
inactive_file
required
integer <int64> >= 0
mapped_file
required
integer <int64> >= 0
pgfault
required
integer <int64> >= 0
pgmajfault
required
integer <int64> >= 0
pgpgin
required
integer <int64> >= 0
pgpgout
required
integer <int64> >= 0
rss
required
integer <int64> >= 0
rss_huge
required
integer <int64> >= 0
shmem
integer or null <int64> >= 0
total_active_anon
required
integer <int64> >= 0
total_active_file
required
integer <int64> >= 0
total_cache
required
integer <int64> >= 0
total_dirty
required
integer <int64> >= 0
total_inactive_anon
required
integer <int64> >= 0
total_inactive_file
required
integer <int64> >= 0
total_mapped_file
required
integer <int64> >= 0
total_pgfault
required
integer <int64> >= 0
total_pgmajfault
required
integer <int64> >= 0
total_pgpgin
required
integer <int64> >= 0
total_pgpgout
required
integer <int64> >= 0
total_rss
required
integer <int64> >= 0
total_rss_huge
required
integer <int64> >= 0
total_shmem
integer or null <int64> >= 0
total_unevictable
required
integer <int64> >= 0
total_writeback
required
integer <int64> >= 0
unevictable
required
integer <int64> >= 0
writeback
required
integer <int64> >= 0
Example
{
  • "cache": 0,
  • "dirty": 0,
  • "mapped_file": 0,
  • "total_inactive_file": 0,
  • "pgpgout": 0,
  • "rss": 0,
  • "total_mapped_file": 0,
  • "writeback": 0,
  • "unevictable": 0,
  • "pgpgin": 0,
  • "total_unevictable": 0,
  • "pgmajfault": 0,
  • "total_rss": 0,
  • "total_rss_huge": 0,
  • "total_writeback": 0,
  • "total_inactive_anon": 0,
  • "rss_huge": 0,
  • "hierarchical_memory_limit": 0,
  • "total_pgfault": 0,
  • "total_active_file": 0,
  • "active_anon": 0,
  • "total_active_anon": 0,
  • "total_pgpgout": 0,
  • "total_cache": 0,
  • "total_dirty": 0,
  • "inactive_anon": 0,
  • "active_file": 0,
  • "pgfault": 0,
  • "inactive_file": 0,
  • "total_pgmajfault": 0,
  • "total_pgpgin": 0,
  • "hierarchical_memsw_limit": 0,
  • "shmem": 0,
  • "total_shmem": 0
}

MemoryStatsStatsV1

active_anon
required
integer <int64> >= 0
active_file
required
integer <int64> >= 0
cache
required
integer <int64> >= 0
dirty
required
integer <int64> >= 0
hierarchical_memory_limit
required
integer <int64> >= 0
hierarchical_memsw_limit
integer or null <int64> >= 0
inactive_anon
required
integer <int64> >= 0
inactive_file
required
integer <int64> >= 0
mapped_file
required
integer <int64> >= 0
pgfault
required
integer <int64> >= 0
pgmajfault
required
integer <int64> >= 0
pgpgin
required
integer <int64> >= 0
pgpgout
required
integer <int64> >= 0
rss
required
integer <int64> >= 0
rss_huge
required
integer <int64> >= 0
shmem
integer or null <int64> >= 0
total_active_anon
required
integer <int64> >= 0
total_active_file
required
integer <int64> >= 0
total_cache
required
integer <int64> >= 0
total_dirty
required
integer <int64> >= 0
total_inactive_anon
required
integer <int64> >= 0
total_inactive_file
required
integer <int64> >= 0
total_mapped_file
required
integer <int64> >= 0
total_pgfault
required
integer <int64> >= 0
total_pgmajfault
required
integer <int64> >= 0
total_pgpgin
required
integer <int64> >= 0
total_pgpgout
required
integer <int64> >= 0
total_rss
required
integer <int64> >= 0
total_rss_huge
required
integer <int64> >= 0
total_shmem
integer or null <int64> >= 0
total_unevictable
required
integer <int64> >= 0
total_writeback
required
integer <int64> >= 0
unevictable
required
integer <int64> >= 0
writeback
required
integer <int64> >= 0
{
  • "cache": 0,
  • "dirty": 0,
  • "mapped_file": 0,
  • "total_inactive_file": 0,
  • "pgpgout": 0,
  • "rss": 0,
  • "total_mapped_file": 0,
  • "writeback": 0,
  • "unevictable": 0,
  • "pgpgin": 0,
  • "total_unevictable": 0,
  • "pgmajfault": 0,
  • "total_rss": 0,
  • "total_rss_huge": 0,
  • "total_writeback": 0,
  • "total_inactive_anon": 0,
  • "rss_huge": 0,
  • "hierarchical_memory_limit": 0,
  • "total_pgfault": 0,
  • "total_active_file": 0,
  • "active_anon": 0,
  • "total_active_anon": 0,
  • "total_pgpgout": 0,
  • "total_cache": 0,
  • "total_dirty": 0,
  • "inactive_anon": 0,
  • "active_file": 0,
  • "pgfault": 0,
  • "inactive_file": 0,
  • "total_pgmajfault": 0,
  • "total_pgpgin": 0,
  • "hierarchical_memsw_limit": 0,
  • "shmem": 0,
  • "total_shmem": 0
}

MemoryStatsStatsV2

active_anon
required
integer <int64> >= 0
active_file
required
integer <int64> >= 0
anon
required
integer <int64> >= 0
anon_thp
required
integer <int64> >= 0
file
required
integer <int64> >= 0
file_dirty
required
integer <int64> >= 0
file_mapped
required
integer <int64> >= 0
file_writeback
required
integer <int64> >= 0
inactive_anon
required
integer <int64> >= 0
inactive_file
required
integer <int64> >= 0
kernel_stack
required
integer <int64> >= 0
pgactivate
required
integer <int64> >= 0
pgdeactivate
required
integer <int64> >= 0
pgfault
required
integer <int64> >= 0
pglazyfree
required
integer <int64> >= 0
pglazyfreed
required
integer <int64> >= 0
pgmajfault
required
integer <int64> >= 0
pgrefill
required
integer <int64> >= 0
pgscan
required
integer <int64> >= 0
pgsteal
required
integer <int64> >= 0
shmem
required
integer <int64> >= 0
slab
required
integer <int64> >= 0
slab_reclaimable
required
integer <int64> >= 0
slab_unreclaimable
required
integer <int64> >= 0
sock
required
integer <int64> >= 0
thp_collapse_alloc
required
integer <int64> >= 0
thp_fault_alloc
required
integer <int64> >= 0
unevictable
required
integer <int64> >= 0
workingset_activate
required
integer <int64> >= 0
workingset_nodereclaim
required
integer <int64> >= 0
workingset_refault
required
integer <int64> >= 0
{
  • "anon": 0,
  • "file": 0,
  • "kernel_stack": 0,
  • "slab": 0,
  • "sock": 0,
  • "shmem": 0,
  • "file_mapped": 0,
  • "file_dirty": 0,
  • "file_writeback": 0,
  • "anon_thp": 0,
  • "inactive_anon": 0,
  • "active_anon": 0,
  • "inactive_file": 0,
  • "active_file": 0,
  • "unevictable": 0,
  • "slab_reclaimable": 0,
  • "slab_unreclaimable": 0,
  • "pgfault": 0,
  • "pgmajfault": 0,
  • "workingset_refault": 0,
  • "workingset_activate": 0,
  • "workingset_nodereclaim": 0,
  • "pgrefill": 0,
  • "pgscan": 0,
  • "pgsteal": 0,
  • "pgactivate": 0,
  • "pgdeactivate": 0,
  • "pglazyfree": 0,
  • "pglazyfreed": 0,
  • "thp_fault_alloc": 0,
  • "thp_collapse_alloc": 0
}

Metric

CreatedAt
required
string <date-time>

指标创建时间。

Data
required
any

指标数据。

ExpiresAt
required
string <date-time>

指标到期时间。

Key
required
string <uuid>

数据库中指标的键,类型为 UUID。

Kind
required
string

指标类型。

NodeName
required
string

指标来源节点。

Note
string or null

指标的可选备注。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ExpiresAt": "2019-08-24T14:15:22Z",
  • "NodeName": "string",
  • "Kind": "string",
  • "Data": null,
  • "Note": "string"
}

MetricPartial

Data
required
any

指标数据。

Kind
required
string

指标类型。

Note
string or null

指标的可选备注。

{
  • "Kind": "string",
  • "Data": null,
  • "Note": "string"
}

Mount

null or MountBindOptions (object)
One of
null
Consistency
string or null

挂载一致性要求:default、consistent、cached 或 delegated。

ReadOnly
boolean or null

挂载是否应为只读。

Source
string or null

挂载源,例如卷名称或主机路径。

Target
string or null

容器路径。

null or MountTmpfsOptions (object)
One of
null
null or MountTypeEnum (string)
One of
null
null or MountVolumeOptions (object)
One of
null
{
  • "Target": "string",
  • "Source": "string",
  • "Type": { },
  • "ReadOnly": true,
  • "Consistency": "string",
  • "BindOptions": { },
  • "VolumeOptions": { },
  • "TmpfsOptions": { }
}

MountBindOptions

CreateMountpoint
boolean or null

主机挂载点缺失时创建。

NonRecursive
boolean or null

禁用递归绑定挂载。

null or MountBindOptionsPropagationEnum (string)
One of
null
ReadOnlyForceRecursive
boolean or null

无法将挂载设为递归只读时返回错误。

ReadOnlyNonRecursive
boolean or null

让挂载自身只读而非递归只读,但仍保留递归挂载(除非同时将 NonRecursive 设为 true)。v1.44 新增;此前所有只读挂载默认非递归。为兼容此前行为,v1.44 之前的客户端默认设为 true。

{
  • "Propagation": { },
  • "NonRecursive": true,
  • "CreateMountpoint": true,
  • "ReadOnlyNonRecursive": true,
  • "ReadOnlyForceRecursive": true
}

MountBindOptionsPropagationEnum

string (MountBindOptionsPropagationEnum)
枚举值: "EMPTY" "private" "rprivate" "shared" "rshared" "slave" "rslave"
"EMPTY"

MountPoint

Destination
string or null

Destination 是相对于容器根目录(/)的路径,Source 会挂载到容器内的此位置。

Driver
string or null

Driver 是创建卷使用的卷驱动(当挂载类型为卷时)。

Mode
string or null

Mode 是创建绑定挂载或卷挂载时用户提供的逗号分隔选项。默认值因平台而异(Linux 为 \"z\",Windows 为空)。

Name
string or null

Name 是 Source 定义的底层数据的名称引用,例如卷名称。

Propagation
string or null

Propagation 描述挂载如何从主机传播到挂载点,以及反向传播方式。详情见 Linux 内核文档。Windows 不使用此字段。

RW
boolean or null

挂载是否可写,即读写挂载。

Source
string or null

挂载源位置。卷挂载保存卷的存储位置(在 /var/lib/docker/volumes/ 内);绑定挂载和 npipe 保存主机源路径;tmpfs 挂载此字段为空。

null or MountPointTypeEnum (string)
One of
null
{
  • "Type": { },
  • "Name": "string",
  • "Source": "string",
  • "Destination": "string",
  • "Driver": "string",
  • "Mode": "string",
  • "RW": true,
  • "Propagation": "string"
}

MountPointTypeEnum

string (MountPointTypeEnum)
枚举值: "EMPTY" "bind" "volume" "tmpfs" "npipe" "cluster"
"EMPTY"

MountTmpfsOptions

Mode
integer or null <int64>

tmpfs 挂载的权限模式,以整数表示。

SizeBytes
integer or null <int64>

tmpfs 挂载大小,单位字节。

{
  • "SizeBytes": 0,
  • "Mode": 0
}

MountTypeEnum

string (MountTypeEnum)
枚举值: "EMPTY" "bind" "volume" "tmpfs" "npipe" "cluster"
"EMPTY"

MountVolumeOptions

null or MountVolumeOptionsDriverConfig (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
NoCopy
boolean or null

使用目标数据填充卷。

Subpath
string or null

卷内的源路径,必须是相对路径,且不能包含向父目录回退的片段。

{
  • "NoCopy": true,
  • "Labels": {
    },
  • "DriverConfig": { },
  • "Subpath": "string"
}

MountVolumeOptionsDriverConfig

Name
string or null

创建卷所用驱动名称。

object or null

驱动专属选项的键值映射。

property name*
additional property
string
{
  • "Name": "string",
  • "Options": {
    }
}

Namespace

CreatedAt
required
string <date-time>

命名空间创建时间。

Metadata
any

用户定义的元数据。

Name
required
string

作为命名空间主键的名称。

{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Metadata": null
}

NamespaceInspect

required
数组元素类型 objects (CargoInspect)

Cargo 数量。

Array
CreatedAt
required
string <date-time>

Cargo 创建时间。

InstanceRunning
required
integer >= 0

运行实例数。

required
数组元素类型 objects (Process)

实例列表。

InstanceTotal
required
integer >= 0

实例数量。

NamespaceName
required
string

命名空间名称。

required
object (CargoSpecRevision)

Cargo 规格。

required
object (ObjPsStatus)

Cargo 状态。

Name
required
string

命名空间名称。

{
  • "Name": "string",
  • "Cargoes": [
    ]
}

NamespacePartial

Metadata
any

用户定义的元数据。

Name
required
string

命名空间名称。

{
  • "Name": "string",
  • "Metadata": null
}

NamespaceSummary

Cargoes
required
integer >= 0

Cargo 数量。

CreatedAt
required
string <date-time>

命名空间创建时间。

Instances
required
integer >= 0

实例数量。

Name
required
string

命名空间名称。

{
  • "Name": "string",
  • "Cargoes": 0,
  • "Instances": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z"
}

NativeEventAction

One of
string
值: "create"

Action 是触发事件的操作。

{
  • "other": "string"
}

Network

Attachable
boolean or null
object or null
additional property
object (NetworkContainer)
null or String (string)
One of
null
Driver
string or null
EnableIPv6
boolean or null
Id
string or null
Ingress
boolean or null
Internal
boolean or null
null or Ipam (object)
One of
null
object or null
property name*
additional property
string
Name
string or null
object or null
property name*
additional property
string
Scope
string or null
{
  • "Name": "string",
  • "Id": "string",
  • "Created": { },
  • "Scope": "string",
  • "Driver": "string",
  • "EnableIPv6": true,
  • "IPAM": { },
  • "Internal": true,
  • "Attachable": true,
  • "Ingress": true,
  • "Containers": {
    },
  • "Options": {
    },
  • "Labels": {
    }
}

NetworkContainer

EndpointID
string or null
IPv4Address
string or null
IPv6Address
string or null
MacAddress
string or null
Name
string or null
{
  • "Name": "string",
  • "EndpointID": "string",
  • "MacAddress": "string",
  • "IPv4Address": "string",
  • "IPv6Address": "string"
}

NetworkKind

One of
string

保留选择器、IP 地址或用户定义的网络名称。

{
  • "Other": "string"
}

NetworkSettings

Bridge
string or null

设置 dockerd 的 --bridge 参数时,默认桥接接口名称。

EndpointID
string or null

EndpointID 唯一标识沙箱中的服务端点。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

Gateway
string or null

默认 "bridge" 网络的网关地址。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

GlobalIPv6Address
string or null

默认 "bridge" 网络的全局 IPv6 地址。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

GlobalIPv6PrefixLen
integer or null <int64>

全局 IPv6 地址掩码长度。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

HairpinMode
boolean or null

表示虚拟接口是否启用 hairpin NAT。已弃用:此字段从不设置,将在后续版本移除。

IPAddress
string or null

默认 "bridge" 网络的 IPv4 地址。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

IPPrefixLen
integer or null <int64>

IPv4 地址掩码长度。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

IPv6Gateway
string or null

此网络的 IPv6 网关地址。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

LinkLocalIPv6Address
string or null

使用链路本地前缀的 IPv6 单播地址。已弃用:此字段从不设置,将在后续版本移除。

LinkLocalIPv6PrefixLen
integer or null <int64>

IPv6 单播地址的前缀长度。已弃用:此字段从不设置,将在后续版本移除。

MacAddress
string or null

默认 "bridge" 网络上容器的 MAC 地址。


> 已弃用:仅在连接默认 "bridge" 网络时传递此字段。请改用 Networks 映射中的 "bridge" 网络信息,它包含相同信息。此字段在 Docker 1.9 弃用,计划在 Docker 17.12.0 移除。

object or null

容器连接的全部网络的信息。

additional property
object (EndpointSettings)

网络端点配置。

null or HashMap (object)
One of
null
SandboxID
string or null

SandboxID 唯一标识容器网络栈。

SandboxKey
string or null

SandboxKey 是 netns 句柄的完整路径。

数组元素类型 objects or null (Address)

已弃用:此字段从不设置,将在后续版本移除。

Array
Addr
string or null

IP 地址。

PrefixLen
integer or null <int64>

IP 地址掩码长度。

数组元素类型 objects or null (Address)

已弃用:此字段从不设置,将在后续版本移除。

Array
Addr
string or null

IP 地址。

PrefixLen
integer or null <int64>

IP 地址掩码长度。

{
  • "Bridge": "string",
  • "SandboxID": "string",
  • "HairpinMode": true,
  • "LinkLocalIPv6Address": "string",
  • "LinkLocalIPv6PrefixLen": 0,
  • "Ports": { },
  • "SandboxKey": "string",
  • "SecondaryIPAddresses": [
    ],
  • "SecondaryIPv6Addresses": [
    ],
  • "EndpointID": "string",
  • "Gateway": "string",
  • "GlobalIPv6Address": "string",
  • "GlobalIPv6PrefixLen": 0,
  • "IPAddress": "string",
  • "IPPrefixLen": 0,
  • "IPv6Gateway": "string",
  • "MacAddress": "string",
  • "Networks": {
    }
}

NetworkStats

rx_bytes
required
integer <int64> >= 0
rx_dropped
required
integer <int64> >= 0
rx_errors
required
integer <int64> >= 0
rx_packets
required
integer <int64> >= 0
tx_bytes
required
integer <int64> >= 0
tx_dropped
required
integer <int64> >= 0
tx_errors
required
integer <int64> >= 0
tx_packets
required
integer <int64> >= 0
{
  • "rx_dropped": 0,
  • "rx_bytes": 0,
  • "rx_errors": 0,
  • "tx_packets": 0,
  • "tx_dropped": 0,
  • "rx_packets": 0,
  • "tx_errors": 0,
  • "tx_bytes": 0
}

NetworkingConfig_String

required
object
additional property
object (EndpointSettings)

网络端点配置。

{
  • "EndpointsConfig": {
    }
}

NginxDuration

string (NginxDuration)

经过验证的 Nginx 超时值,如 900s 或 5m。

"string"

NginxSize

string (NginxSize)

经过验证的 Nginx 大小值,如 0、10m 或 2g。

"string"

Node

CreatedAt
required
string <date-time>

创建时间。

Endpoint
required
string

连接节点的端点。

Metadata
any

用户定义的元数据。

Name
required
string

节点名称。

Version
required
string

节点版本。

{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Endpoint": "string",
  • "Version": "string",
  • "Metadata": null
}

NodeConstraint

Key
required
string

约束键(如 "region"、"label"、"group" 等)。

Operator
required
string (ConstraintOp)
枚举值: "Eq" "Ne"

约束运算符(Eq/Ne)。

Value
required
string

约束值。

{
  • "Key": "string",
  • "Operator": "Eq",
  • "Value": "string"
}

ObjPsHealthStatusKind

string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
"healthy"

ObjPsStatus

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Wanted": "create",
  • "PrevWanted": "create",
  • "Actual": "create",
  • "PrevActual": "create",
  • "Health": "healthy"
}

ObjPsStatusKind

string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
"create"

ObjectVersion

Index
integer or null <int64> >= 0
{
  • "Index": 0
}

PeerNode

Addr
string or null

访问此节点的 IP 地址和端口。

NodeID
string or null

节点在 Swarm 中的唯一标识。

{
  • "NodeID": "string",
  • "Addr": "string"
}

PidsStats

current
integer or null <int64> >= 0
limit
integer or null <int64> >= 0
{
  • "current": 0,
  • "limit": 0
}

PluginsInfo

Authorization
数组元素类型 strings or null

可用授权插件名称。

Log
数组元素类型 strings or null

可用日志驱动和日志驱动插件名称。

Network
数组元素类型 strings or null

可用网络驱动和网络驱动插件名称。

Volume
数组元素类型 strings or null

可用卷驱动和网络驱动插件名称。

{
  • "Volume": [
    ],
  • "Network": [
    ],
  • "Authorization": [
    ],
  • "Log": [
    ]
}

Primitive

One of
string
true

Process

CreatedAt
required
string <date-time>

创建时间。

required
object (ContainerInspectResponse)

进程数据,类型为 ContainerInspect。

AppArmorProfile
string or null
Args
数组元素类型 strings or null

正在运行命令的参数。

null or ContainerConfig (object)
Created
string or null

容器创建时间。

Driver
string or null
ExecIDs
数组元素类型 strings or null

容器中运行的 exec 实例 ID。

null or GraphDriverData (object)
null or HostConfig (object)
HostnamePath
string or null
HostsPath
string or null
Id
string or null

容器 ID。

Image
string or null

容器镜像 ID。

LogPath
string or null
MountLabel
string or null
数组元素类型 objects or null (MountPoint)
Name
string or null
null or NetworkSettings (object)
Path
string or null

正在运行命令的路径。

Platform
string or null
ProcessLabel
string or null
ResolvConfPath
string or null
RestartCount
integer or null <int64>
SizeRootFs
integer or null <int64>

容器中全部文件总大小。

SizeRw
integer or null <int64>

容器创建或修改的文件大小。

null or ContainerState (object)
IpAddress
string or null

从最近观察到的进程状态解析的有效 IP 地址。

Key
required
string

进程键。

Kind
required
string (ProcessKind)
枚举值: "vm" "job" "cargo"

进程类型(Job、Vm、Cargo)。

KindKey
required
string

Cargo 和 VM 的规范资源键;任务使用名称。

Name
required
string

进程名称。

NodeName
required
string

容器运行所在节点的名称。

UpdatedAt
required
string <date-time>

实例最近更新时间。

{
  • "Key": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "Kind": "vm",
  • "NodeName": "string",
  • "KindKey": "string",
  • "IpAddress": "string",
  • "Data": {
    }
}

ProcessExecCreateOptions

AttachStderr
boolean or null

连接标准错误。

AttachStdin
boolean or null

连接标准输入。

AttachStdout
boolean or null

连接标准输出。

Cmd
数组元素类型 strings or null

要执行的命令及参数。

DetachKeys
string or null

兼容 Docker 的分离按键序列。

Env
数组元素类型 strings or null

环境变量,格式为 NAME=value。

Privileged
boolean or null

以扩展权限运行命令。

Tty
boolean or null

分配伪终端。

User
string or null

命令使用的用户和可选用户组。

WorkingDir
string or null

进程内部工作目录。

{
  • "AttachStdin": true,
  • "AttachStdout": true,
  • "AttachStderr": true,
  • "Tty": true,
  • "DetachKeys": "string",
  • "Env": [
    ],
  • "Cmd": [
    ],
  • "Privileged": true,
  • "User": "string",
  • "WorkingDir": "string"
}

ProcessExecCreated

Id
required
string

Docker 拥有的 exec 实例 ID。

{
  • "Id": "string"
}

ProcessKillOptions

signal
required
string

发送给进程的信号,默认 SIGKILL。

{
  • "signal": "string"
}

ProcessKind

string (ProcessKind)
枚举值: "vm" "job" "cargo"

进程类型(Vm、Job、Cargo)。

"vm"

ProcessStats

Name
required
string
required
object (Stats)

容器统计。

required
object (BlkioStats)

容器 I/O 统计。

required
object (CPUStats)

容器通用 CPU 统计。

id
string
required
object (MemoryStats)

容器通用内存统计。

name
string
null or NetworkStats (object)
object or null
num_procs
required
integer <int32> >= 0
required
object (PidsStats)

容器进程 ID 统计。

required
object (CPUStats)

容器通用 CPU 统计。

preread
required
string
read
required
string
required
object (StorageStats)

容器文件 I/O 统计。

{
  • "Name": "string",
  • "Stats": {
    }
}

ProxyCache

string (ProxyCache)

经过验证的 Nginx 代理缓存值:off 或已配置的缓存区域。

"string"

ProxyHttp3

One of
boolean

使用默认设置启用 HTTP/3。

Example
true

ProxyHttp3Config

ActiveConnectionIdLimit
integer or null >= 0

QUIC 的 active_connection_id_limit 传输参数。

Bpf
boolean or null

使用 eBPF 路由 QUIC 数据包(Linux 5.7+)。

Gso
boolean or null

为 QUIC 启用通用分段卸载(Linux 的 UDP_SEGMENT)。

HostKey
string or null

QUIC 主机密钥文件路径。

Hq
boolean or null

启用 QUIC 互操作测试使用的 HTTP/0.9 协议协商。

MaxConcurrentStreams
integer or null >= 0

每个连接的最大并发 HTTP/3 流数。

Retry
boolean or null

启用 QUIC 地址验证(重试)。

StreamBufferSize
string or null

QUIC 流缓冲大小(如 "64k"、"8k")。

{
  • "Hq": true,
  • "MaxConcurrentStreams": 0,
  • "StreamBufferSize": "string",
  • "ActiveConnectionIdLimit": 0,
  • "Bpf": true,
  • "Gso": true,
  • "HostKey": "string",
  • "Retry": true
}

ProxyHttpLocation

AllowedIps
数组元素类型 strings or null

允许的 IP 地址。

null or ProxyCache (string)
One of
null
null or NginxDuration (string)
One of
null
null or NginxSize (string)
One of
null
null or NginxDuration (string)
One of
null
Headers
数组元素类型 strings or null

要添加的附加请求头。

InterceptErrors
boolean or null

拦截上游错误。

null or LimitReq (object)
One of
null
null or ProxyNextUpstream (string)
One of
null
Path
required
string

路径。

null or NginxDuration (string)
One of
null
RequestBuffering
boolean or null

缓冲客户端请求体。

ResponseBuffering
boolean or null

缓冲上游响应。

null or NginxDuration (string)
One of
null
required
object or object or object (LocationTarget)
One of
DisableLogging
boolean or null

禁用此目标的日志。

Key
required
string

目标 Cargo 或 VM 的键。

Path
string or null

使用 HTTP 时的目标路径。

Port
required
integer <int32> >= 0

目标 Cargo 或 VM 的端口。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
Version
number or null <double>

使用的 HTTP 版本。

{
  • "Path": "string",
  • "Target": {
    },
  • "LimitReq": { },
  • "AllowedIps": [
    ],
  • "Headers": [
    ],
  • "Version": 0,
  • "ClientMaxBodySize": { },
  • "ClientBodyTimeout": { },
  • "RequestBuffering": true,
  • "ResponseBuffering": true,
  • "Cache": { },
  • "ReadTimeout": { },
  • "SendTimeout": { },
  • "ConnectTimeout": { },
  • "NextUpstream": { },
  • "InterceptErrors": true
}

ProxyNextUpstream

string (ProxyNextUpstream)
值: "off"

location 级支持的 proxy_next_upstream 值。

"off"

ProxyRule

One of
Domain
string or null

域名。

null or (Hsts (Hsts (string) or Hsts (string) or Hsts (object)))
One of
null
null or (ProxyHttp3 (ProxyHttp3 (boolean) or ProxyHttp3Config (object)))
One of
null
Includes
数组元素类型 strings or null

要包含的额外配置文件路径。

null or LimitReqZone (object)
One of
null
required
数组元素类型 objects (ProxyHttpLocation)

处理多个路径的 location。

Array
AllowedIps
数组元素类型 strings or null

允许的 IP 地址。

null or ProxyCache (string)
null or NginxDuration (string)
null or NginxSize (string)
null or NginxDuration (string)
Headers
数组元素类型 strings or null

要添加的附加请求头。

InterceptErrors
boolean or null

拦截上游错误。

null or LimitReq (object)
null or ProxyNextUpstream (string)
Path
required
string

路径。

null or NginxDuration (string)
RequestBuffering
boolean or null

缓冲客户端请求体。

ResponseBuffering
boolean or null

缓冲上游响应。

null or NginxDuration (string)
required
object or object or object (LocationTarget)
Version
number or null <double>

使用的 HTTP 版本。

required
string or object or object (NetworkKind)
One of
string

网络绑定类型。

Port
integer or null <int32> >= 0

监听端口(默认 80 或 443)。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
Example
{
  • "Domain": "string",
  • "Port": 0,
  • "Hsts": { },
  • "Network": "string",
  • "LimitReqZone": { },
  • "Locations": [
    ],
  • "Ssl": { },
  • "Http3": { },
  • "Includes": [
    ]
}

ProxyRuleHttp

Domain
string or null

域名。

null or (Hsts (Hsts (string) or Hsts (string) or Hsts (object)))
One of
null
null or (ProxyHttp3 (ProxyHttp3 (boolean) or ProxyHttp3Config (object)))
One of
null
Includes
数组元素类型 strings or null

要包含的额外配置文件路径。

null or LimitReqZone (object)
One of
null
required
数组元素类型 objects (ProxyHttpLocation)

处理多个路径的 location。

Array
AllowedIps
数组元素类型 strings or null

允许的 IP 地址。

null or ProxyCache (string)
null or NginxDuration (string)
null or NginxSize (string)
null or NginxDuration (string)
Headers
数组元素类型 strings or null

要添加的附加请求头。

InterceptErrors
boolean or null

拦截上游错误。

null or LimitReq (object)
null or ProxyNextUpstream (string)
Path
required
string

路径。

null or NginxDuration (string)
RequestBuffering
boolean or null

缓冲客户端请求体。

ResponseBuffering
boolean or null

缓冲上游响应。

null or NginxDuration (string)
required
object or object or object (LocationTarget)
Version
number or null <double>

使用的 HTTP 版本。

required
string or object or object (NetworkKind)
One of
string

网络绑定类型。

Port
integer or null <int32> >= 0

监听端口(默认 80 或 443)。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
{
  • "Domain": "string",
  • "Port": 0,
  • "Hsts": { },
  • "Network": "string",
  • "LimitReqZone": { },
  • "Locations": [
    ],
  • "Ssl": { },
  • "Http3": { },
  • "Includes": [
    ]
}

ProxyRuleStream

required
string or object or object (NetworkKind)
One of
string

网络绑定类型。

Port
required
integer <int32> >= 0

节点上要开放的端口。

Protocol
required
string (ProxyStreamProtocol)
枚举值: "Tcp" "Udp"

使用的协议:Tcp 或 Udp。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
required
object or object or object (StreamTarget)
One of
DisableLogging
boolean or null

禁用此目标的日志。

Key
required
string

目标 Cargo 或 VM 的键。

Path
string or null

使用 HTTP 时的目标路径。

Port
required
integer <int32> >= 0

目标 Cargo 或 VM 的端口。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
{
  • "Network": "string",
  • "Protocol": "Tcp",
  • "Port": 0,
  • "Ssl": { },
  • "Target": {
    }
}

ProxySsl

One of
Certificate
required
string

在 TLS Secret 中保存的证书内容。

CertificateClient
string or null

在 TLS Secret 中保存的证书颁发机构内容。

CertificateKey
required
string

在 TLS Secret 中保存的私钥内容。

Dhparam
string or null

在 TLS Secret 中保存的 DH 参数内容。

VerifyClient
boolean or null

启用或禁用客户端验证。

Example
{
  • "Certificate": "string",
  • "CertificateKey": "string",
  • "CertificateClient": "string",
  • "VerifyClient": true,
  • "Dhparam": "string"
}

ProxySslConfig

Certificate
required
string

在 TLS Secret 中保存的证书内容。

CertificateClient
string or null

在 TLS Secret 中保存的证书颁发机构内容。

CertificateKey
required
string

在 TLS Secret 中保存的私钥内容。

Dhparam
string or null

在 TLS Secret 中保存的 DH 参数内容。

VerifyClient
boolean or null

启用或禁用客户端验证。

{
  • "Certificate": "string",
  • "CertificateKey": "string",
  • "CertificateClient": "string",
  • "VerifyClient": true,
  • "Dhparam": "string"
}

ProxyStreamProtocol

string (ProxyStreamProtocol)
枚举值: "Tcp" "Udp"

代理规则模式。

"Tcp"

RegistryServiceConfig

AllowNondistributableArtifactsCIDRs
数组元素类型 strings or null

允许推送不可分发内容的 IP 范围列表,使用 CIDR 语法 RFC 4632。某些镜像(如 Windows 基础镜像)包含受许可证分发限制的内容,推送镜像时通常不包含这些内容。此配置覆盖该行为,允许向解析 IP 位于指定 CIDR 子网内的仓库推送不可分发内容。隔离网络中的仓库可以借此保存镜像,让主机无需连接其他服务器即可拉取。> 警告:不可分发内容通常对分发和共享方式、位置有限制。仅向私有仓库推送,并确保遵守相关再分发条款。

AllowNondistributableArtifactsHostnames
数组元素类型 strings or null

允许推送不可分发内容的仓库主机名列表,格式为 <hostname>[:<port>] 或 <IP address>[:<port>]。某些镜像(如 Windows 基础镜像)包含受许可证分发限制的内容,推送时通常不包含这些内容。此配置为指定仓库覆盖该行为。隔离网络中的仓库可借此保存镜像,让主机无需连接其他服务器即可拉取。> 警告:不可分发内容通常对分发和共享方式、位置有限制。仅向私有仓库推送,并确保遵守相关再分发条款。

object or null
additional property
object (IndexInfo)

IndexInfo 包含镜像仓库信息。

InsecureRegistryCIDRs
数组元素类型 strings or null

不安全镜像仓库的 IP 范围列表,使用 CIDR 语法(RFC 4632)。不安全仓库允许未加密的 HTTP,或不可信的 HTTPS(未知 CA 证书)通信。默认本地仓库(127.0.0.0/8)为不安全,其余仓库为安全。如果守护进程认为仓库安全,则无法进行不安全通信。此配置覆盖该行为,允许对解析 IP 位于指定 CIDR 子网内的仓库进行不安全通信。也可按主机名标记不安全仓库,列在 IndexConfigs 中,Secure 为 false。> 警告:本地仓库测试时此选项可能有用,但存在安全漏洞,只应用于测试。应将 CA 加入系统可信 CA 列表,而不是启用此选项。

Mirrors
数组元素类型 strings or null

作为官方 docker.io 仓库镜像源的仓库 URL 列表。

{
  • "AllowNondistributableArtifactsCIDRs": [
    ],
  • "AllowNondistributableArtifactsHostnames": [
    ],
  • "InsecureRegistryCIDRs": [
    ],
  • "IndexConfigs": {
    },
  • "Mirrors": [
    ]
}

Resource

CreatedAt
required
string <date-time>

资源创建时间。

Kind
required
string

资源类型。

required
object (ResourceSpec)

资源规格。

CreatedAt
required
string <date-time>

资源创建时间。

required
object

以 JSON 对象表示的资源数据。

Key
required
string <uuid>

资源键。

object

资源的用户定义元数据。

ResourceKey
required
string

与数据关联的资源键。

Version
required
string

资源版本。

{
  • "Kind": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Spec": {
    }
}

ResourceDnsRule

required
数组元素类型 objects (DnsEntry)
Array
required
string or object or object (NetworkKind)
Name
required
string
required
string or object or object (NetworkKind)
One of
string

网络绑定选择器。

{
  • "Network": "string",
  • "Entries": [
    ]
}

ResourceKind

CreatedAt
required
string <date-time>

类型创建时间。

required
object (ResourceKindSpec)

类型创建时间。

object

此类型和版本资源的 JSONSchema。

Url
string or null

创建、更新或删除此类型和版本的资源时调用的服务。

Metadata
any

类型创建时间。

Name
required
string

类型名称。

Version
required
string

类型创建时间。

{
  • "Name": "string",
  • "Version": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Metadata": null,
  • "Data": {
    }
}

ResourceKindInspect

CreatedAt
required
string <date-time>

类型创建时间。

Name
required
string

类型名称。

required
数组元素类型 objects (ResourceKindVersion)

可用版本列表。

Array
CreatedAt
required
string <date-time>

版本创建时间。

required
object (ResourceKindSpec)

类型规格。

Key
required
string <uuid>

版本键。

KindKey
required
string

与此版本关联的类型。

object

用户定义的元数据。

Version
required
string

版本。

{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Versions": [
    ]
}

ResourceKindPartial

required
object (ResourceKindSpec)

资源类型规格。

object

此类型和版本资源的 JSONSchema。

Url
string or null

创建、更新或删除此类型和版本的资源时调用的服务。

object

资源类型的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

资源类型名称。

Version
required
string

资源类型版本。

{
  • "Name": "string",
  • "Version": "string",
  • "Metadata": {
    },
  • "Data": {
    }
}

ResourceKindSpec

object

此类型和版本资源的 JSONSchema。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Url
string or null

创建、更新或删除此类型和版本的资源时调用的服务。

{
  • "Schema": {
    },
  • "Url": "string"
}

ResourceKindVersion

CreatedAt
required
string <date-time>

版本创建时间。

required
object (ResourceKindSpec)

类型规格。

object

此类型和版本资源的 JSONSchema。

Url
string or null

创建、更新或删除此类型和版本的资源时调用的服务。

Key
required
string <uuid>

版本键。

KindKey
required
string

与此版本关联的类型。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Version
required
string

版本。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "KindKey": "string",
  • "Version": "string",
  • "Metadata": {
    },
  • "Data": {
    }
}

ResourcePartial

required
object

资源数据,JSON 对象。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Kind
required
string

资源类型。

object

资源的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

资源名称。

{
  • "Name": "string",
  • "Kind": "string",
  • "Data": {
    },
  • "Metadata": {
    }
}

ResourceProxyRule

required
数组元素类型 ProxyRuleHttp (object) or ProxyRuleStream (object) (ProxyRule)

要应用的规则。

Array
One of
Domain
string or null

域名。

null or (Hsts (Hsts (string) or Hsts (string) or Hsts (object)))
null or (ProxyHttp3 (ProxyHttp3 (boolean) or ProxyHttp3Config (object)))
Includes
数组元素类型 strings or null

要包含的额外配置文件路径。

null or LimitReqZone (object)
required
数组元素类型 objects (ProxyHttpLocation)

处理多个路径的 location。

required
string or object or object (NetworkKind)
Port
integer or null <int32> >= 0

监听端口(默认 80 或 443)。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
{
  • "Rules": [
    ]
}

ResourceSpec

CreatedAt
required
string <date-time>

资源创建时间。

required
object

以 JSON 对象表示的资源数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Key
required
string <uuid>

资源键。

object

资源的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

ResourceKey
required
string

与数据关联的资源键。

Version
required
string

资源版本。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "Version": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "ResourceKey": "string",
  • "Data": {
    },
  • "Metadata": {
    }
}

ResourceUpdate

required
object

以 JSON 对象表示的资源规格。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

object

以 JSON 对象表示的资源元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

{
  • "Data": {
    },
  • "Metadata": {
    }
}

ResourcesBlkioWeightDevice

Path
string or null
Weight
integer or null >= 0
{
  • "Path": "string",
  • "Weight": 0
}

ResourcesUlimits

Hard
integer or null <int64>

硬限制。

Name
string or null

ulimit 名称。

Soft
integer or null <int64>

软限制。

{
  • "Name": "string",
  • "Soft": 0,
  • "Hard": 0
}

RestartPolicy

MaximumRetryCount
integer or null <int64>

使用 on-failure 时,放弃前的重试次数。

null or RestartPolicyNameEnum (string)
One of
null
{
  • "Name": { },
  • "MaximumRetryCount": 0
}

RestartPolicyNameEnum

string (RestartPolicyNameEnum)
枚举值: "EMPTY" "no" "always" "unless-stopped" "on-failure"
"EMPTY"

Runtime

path
string or null

OCI 可执行二进制文件名称及可选路径。省略路径时,守护进程搜索主机 $PATH 并使用首个结果。

runtimeArgs
数组元素类型 strings or null

调用运行时时传入的命令行参数列表。

object or null

运行时专属信息。本 API 规范不定义各运行时提供的数据,但运行时可能提供以下已知属性:org.opencontainers.runtime-spec.features,即 OCI 运行时规范定义的 features 结构,以 JSON 字符串表示。


> 注意:此字段返回的信息,包括值和标签格式,不应视为稳定,可能不经通知而改变。

property name*
additional property
string
{
  • "path": "string",
  • "runtimeArgs": [
    ],
  • "status": {
    }
}

Secret

CreatedAt
required
string <date-time>

创建时间。

required
object

Secret 数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Immutable
required
boolean

无法更新 Secret。

Kind
required
string

Secret 类型。

object
additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Secret 名称。

UpdatedAt
required
string <date-time>

最近更新时间。

{
  • "Name": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

SecretEnv

Array
string
[
  • "string"
]

SecretPartial

required
object

Secret 数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Immutable
boolean

无法更新 Secret。

Kind
required
string

Secret 类型。

object

资源的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

Secret 名称。

{
  • "Name": "string",
  • "Kind": "string",
  • "Immutable": true,
  • "Metadata": {
    },
  • "Data": {
    }
}

SecretUpdate

required
object

以 JSON 对象表示的 Secret 数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

object

Secret 的用户定义元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

{
  • "Metadata": {
    },
  • "Data": {
    }
}

SslConfig

Cert
string or null

证书内容。

CertCa
string or null

证书颁发机构内容。

CertKey
string or null

证书私钥内容。

Password
string or null

证书密码(如果有)。

Verify
required
boolean

验证证书颁发机构。

{
  • "Cert": "string",
  • "CertKey": "string",
  • "CertCa": "string",
  • "Verify": true,
  • "Password": "string"
}

StartNodeCargoParams

CargoKey
required
string

规范 Cargo 键,格式为 {namespace}.{name}。

required
数组元素类型 objects (CargoReplicaTask)

分配给此节点的具体持久化副本,按序号排序。

Array
Key
required
string <uuid>

稳定且持久化的 Cargo 副本标识。

Ordinal
required
integer <int32>

副本在 Cargo 内稳定的序号。

{
  • "CargoKey": "string",
  • "Replicas": [
    ]
}

Statefile

ApiVersion
required
string

使用的 API 版本或远程 URL。

数组元素类型 objects or null (StatefileArg)

传给 Statefile 的参数。

Array
null or (StatefileArgsValue (StatefileArgsValue (number) or StatefileArgsValue (string) or StatefileArgsValue (boolean) or 数组元素类型 StatefileArgsValue (numbers) or 数组元素类型 StatefileArgsValue (strings)))
Description
string or null

参数简短说明。

Example
string or null

参数示例值。

Kind
required
string (StatefileArgKind)
枚举值: "String" "Number" "Boolean"

构建参数类型。

Multiple
boolean

参数接受多个值。

Name
required
string

构建参数名称。

Required
boolean

必填参数。

数组元素类型 objects or null (CargoSpec)

要创建并运行的 Cargo 列表。

Array
required
数组元素类型 objects (ContainerSpec)

每个 Cargo 副本中的应用容器。

Dns
数组元素类型 strings or null

分配给 Cargo 网络所有者的 DNS 服务器。

Hostname
string or null

分配给 Cargo 网络所有者的 Docker 主机名。

数组元素类型 objects (ContainerSpec)

按声明顺序在应用容器之前执行的初始化容器。

object

Cargo 的用户定义元数据。

Name
required
string

Cargo 名称。

null or CargoNetworkMode (string)
null or CargoPlacementSpec (object)
null or HashMap (object)
Replicas
integer >= 1
默认值: 1

持久化 Cargo 副本数。

null or CargoResourceRequirementSpec (object)
Secrets
数组元素类型 strings

由所有普通容器和初始化容器继承的 Secret。

Group
string or null

设置定义对象的组,默认为 {name_of_directory}.{name_of_file}。

数组元素类型 objects or null (JobPartial)

要创建并运行的任务列表。

Array
required
数组元素类型 objects (Config)

要运行的容器列表。

null or ImagePullPolicy (string)
ImagePullSecret
string or null

拉取镜像时使用的 Secret。

object

用户定义的元数据。

Name
required
string

任务名称。

Schedule
string or null

五字段 cron 表达式或支持的快捷形式;参见 [crate::cron::validate_schedule]。

Secrets
数组元素类型 strings or null

作为环境变量加载的 Secret。

Ttl
integer or null >= 0

执行完成 x 秒后移除任务。

null or StatefileMetadata (object)
One of
null
Namespace
string or null

Cargo 和虚拟机部署所在的命名空间。

数组元素类型 objects or null (ResourcePartial)

要创建的资源列表。

Array
required
object

资源数据,JSON 对象。

Kind
required
string

资源类型。

object

资源的用户定义元数据。

Name
required
string

资源名称。

数组元素类型 objects or null (SecretPartial)

要创建的 Secret 列表。

Array
required
object

Secret 数据。

Immutable
boolean

无法更新 Secret。

Kind
required
string

Secret 类型。

object

资源的用户定义元数据。

Name
required
string

Secret 名称。

数组元素类型 strings or SubStateDef (object) or null (SubState)

包含在当前状态之前应用的子状态。

Array
One of
string
数组元素类型 objects or null (VmSpecPartial)

要创建并运行的虚拟机列表。

Array
null or VmHostConfig (object)
Hostname
string or null

VM 主机名(默认:根据名称生成)。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
object or null

用户定义的键值元数据。

MacAddress
string or null

VM 的 MAC 地址(默认自动生成)。

object

用户定义的元数据。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(默认:cloud)。

SshKey
string or null

用户默认 SSH 公钥(推荐)。

User
string or null

VM 默认用户(默认:cloud)。

{
  • "ApiVersion": "string",
  • "Metadata": { },
  • "Args": [
    ],
  • "SubStates": [
    ],
  • "Group": "string",
  • "Namespace": "string",
  • "Secrets": [
    ],
  • "Resources": [
    ],
  • "Cargoes": [
    ],
  • "VirtualMachines": [
    ],
  • "Jobs": [
    ]
}

StatefileArg

null or (StatefileArgsValue (StatefileArgsValue (number) or StatefileArgsValue (string) or StatefileArgsValue (boolean) or 数组元素类型 StatefileArgsValue (numbers) or 数组元素类型 StatefileArgsValue (strings)))
One of
null
Description
string or null

参数简短说明。

Example
string or null

参数示例值。

Kind
required
string (StatefileArgKind)
枚举值: "String" "Number" "Boolean"

构建参数类型。

Multiple
boolean

参数接受多个值。

Name
required
string

构建参数名称。

Required
boolean

必填参数。

{
  • "Name": "string",
  • "Kind": "String",
  • "Default": { },
  • "Required": true,
  • "Multiple": true,
  • "Description": "string",
  • "Example": "string"
}

StatefileArgKind

string (StatefileArgKind)
枚举值: "String" "Number" "Boolean"

传给 Statefile 的参数定义。

"String"

StatefileArgsValue

One of
number <double>

传给 Statefile 的参数定义。

[ ]

StatefileMetadata

About
string or null

Statefile 的介绍,显示在名称部分下面。

LongAbout
string or null

Statefile 的详细介绍,显示在说明部分下面。

ManContent
string or null

覆盖此 Statefile 的手册页内容。

Name
string or null

Statefile 文档的可选标题。

Tags
数组元素类型 strings or null

与 Statefile 关联的可选标签。

{
  • "Name": "string",
  • "About": "string",
  • "LongAbout": "string",
  • "Tags": [
    ],
  • "ManContent": "string"
}

Stats

required
object (BlkioStats)

容器 I/O 统计。

数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
数组元素类型 objects or null (BlkioStatsEntry)
required
object (CPUStats)

容器通用 CPU 统计。

required
object (CPUUsage)

容器 CPU 使用统计。

online_cpus
integer or null <int64> >= 0
system_cpu_usage
integer or null <int64> >= 0
required
object (ThrottlingData)

CPU 节流统计。

id
string
required
object (MemoryStats)

容器通用内存统计。

commit
integer or null <int64> >= 0
commit_peak
integer or null <int64> >= 0
commitbytes
integer or null <int64> >= 0
commitpeakbytes
integer or null <int64> >= 0
failcnt
integer or null <int64> >= 0
limit
integer or null <int64> >= 0
max_usage
integer or null <int64> >= 0
privateworkingset
integer or null <int64> >= 0
null or (MemoryStatsStats (MemoryStatsStatsV1 (object) or MemoryStatsStatsV2 (object)))
usage
integer or null <int64> >= 0
name
string
null or NetworkStats (object)
One of
null
object or null
additional property
object (NetworkStats)

容器网络统计。

num_procs
required
integer <int32> >= 0
required
object (PidsStats)

容器进程 ID 统计。

current
integer or null <int64> >= 0
limit
integer or null <int64> >= 0
required
object (CPUStats)

容器通用 CPU 统计。

required
object (CPUUsage)

容器 CPU 使用统计。

online_cpus
integer or null <int64> >= 0
system_cpu_usage
integer or null <int64> >= 0
required
object (ThrottlingData)

CPU 节流统计。

preread
required
string
read
required
string
required
object (StorageStats)

容器文件 I/O 统计。

read_count_normalized
integer or null <int64> >= 0
read_size_bytes
integer or null <int64> >= 0
write_count_normalized
integer or null <int64> >= 0
write_size_bytes
integer or null <int64> >= 0
{
  • "read": "string",
  • "preread": "string",
  • "num_procs": 0,
  • "pids_stats": {
    },
  • "network": { },
  • "networks": {
    },
  • "memory_stats": {
    },
  • "blkio_stats": {
    },
  • "cpu_stats": {
    },
  • "precpu_stats": {
    },
  • "storage_stats": {
    },
  • "name": "string",
  • "id": "string"
}

StorageStats

read_count_normalized
integer or null <int64> >= 0
read_size_bytes
integer or null <int64> >= 0
write_count_normalized
integer or null <int64> >= 0
write_size_bytes
integer or null <int64> >= 0
{
  • "read_count_normalized": 0,
  • "read_size_bytes": 0,
  • "write_count_normalized": 0,
  • "write_size_bytes": 0
}

StreamTarget

One of
DisableLogging
boolean or null

禁用此目标的日志。

Key
required
string

目标 Cargo 或 VM 的键。

Path
string or null

使用 HTTP 时的目标路径。

Port
required
integer <int32> >= 0

目标 Cargo 或 VM 的端口。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
Example
{
  • "Key": "string",
  • "Port": 0,
  • "Path": "string",
  • "DisableLogging": true,
  • "Ssl": { }
}

String

string (String)
"string"

SubState

One of
string
Example
"string"

SubStateArg

Name
required
string

参数名称。

required
number or string or boolean or 数组元素类型 numbers or 数组元素类型 strings (StatefileArgsValue)
One of
number <double>

参数值。

{
  • "Name": "string",
  • "Value": 0.1
}

SubStateDef

数组元素类型 objects or null (SubStateArg)
Array
Name
required
string

参数名称。

required
number or string or boolean or 数组元素类型 numbers or 数组元素类型 strings (StatefileArgsValue)
Path
required
string
{
  • "Path": "string",
  • "Args": [
    ]
}

SwarmInfo

null or ClusterInfo (object)
One of
null
ControlAvailable
boolean or null
Error
string or null
null or LocalNodeState (string)
One of
null
Managers
integer or null <int64>

Swarm 管理节点总数。

NodeAddr
string or null

Swarm 中其他节点访问此节点的 IP 地址。

NodeID
string or null

节点在 Swarm 中的唯一标识。

Nodes
integer or null <int64>

Swarm 节点总数。

数组元素类型 objects or null (PeerNode)

Swarm 中其他管理节点的 ID 和地址列表。

Array
Addr
string or null

访问此节点的 IP 地址和端口。

NodeID
string or null

节点在 Swarm 中的唯一标识。

{
  • "NodeID": "string",
  • "NodeAddr": "string",
  • "LocalNodeState": { },
  • "ControlAvailable": true,
  • "Error": "string",
  • "RemoteManagers": [
    ],
  • "Nodes": 0,
  • "Managers": 0,
  • "Cluster": { }
}

SwarmSpec

null or SwarmSpecCaConfig (object)
One of
null
null or SwarmSpecDispatcher (object)
One of
null
null or SwarmSpecEncryptionConfig (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
Name
string or null

Swarm 名称。

null or SwarmSpecOrchestration (object)
One of
null
null or SwarmSpecRaft (object)
One of
null
null or SwarmSpecTaskDefaults (object)
One of
null
{
  • "Name": "string",
  • "Labels": {
    },
  • "Orchestration": { },
  • "Raft": { },
  • "Dispatcher": { },
  • "CAConfig": { },
  • "EncryptionConfig": { },
  • "TaskDefaults": { }
}

SwarmSpecCaConfig

数组元素类型 objects or null (SwarmSpecCaConfigExternalCas)

将签名请求转发给外部证书颁发机构的配置。

Array
CACert
string or null

外部 CA 签发 TLS 证书使用的根 CA 证书,PEM 格式。未提供时假定使用当前 Swarm 根 CA 证书。

object or null

包含键值对的对象,作为外部 CA 驱动的协议专属选项解释。

null or SwarmSpecCaConfigExternalCasProtocolEnum (string)
URL
string or null

证书签名请求发送的 URL。

ForceRotate
integer or null <int64> >= 0

用于强制 Swarm 生成新签名 CA 证书和密钥的整数;仅在未指定 SigningCACert 和 SigningCAKey 时生效。

NodeCertExpiry
integer or null <int64>

节点证书的签发有效期。

SigningCACert
string or null

为全部 Swarm 节点 TLS 叶证书签名的目标 CA 证书,PEM 格式。

SigningCAKey
string or null

为全部 Swarm 节点 TLS 叶证书签名的目标 CA 私钥,PEM 格式。

{
  • "NodeCertExpiry": 0,
  • "ExternalCAs": [
    ],
  • "SigningCACert": "string",
  • "SigningCAKey": "string",
  • "ForceRotate": 0
}

SwarmSpecCaConfigExternalCas

CACert
string or null

外部 CA 签发 TLS 证书使用的根 CA 证书,PEM 格式。未提供时假定使用当前 Swarm 根 CA 证书。

object or null

包含键值对的对象,作为外部 CA 驱动的协议专属选项解释。

property name*
additional property
string
null or SwarmSpecCaConfigExternalCasProtocolEnum (string)
One of
null
URL
string or null

证书签名请求发送的 URL。

{
  • "Protocol": { },
  • "URL": "string",
  • "Options": {
    },
  • "CACert": "string"
}

SwarmSpecCaConfigExternalCasProtocolEnum

string (SwarmSpecCaConfigExternalCasProtocolEnum)
枚举值: "EMPTY" "cfssl"
"EMPTY"

SwarmSpecDispatcher

HeartbeatPeriod
integer or null <int64>

代理向调度器发送心跳的间隔。

{
  • "HeartbeatPeriod": 0
}

SwarmSpecEncryptionConfig

AutoLockManagers
boolean or null

设置后生成密钥,用于锁定管理节点保存的数据。

{
  • "AutoLockManagers": true
}

SwarmSpecOrchestration

TaskHistoryRetentionLimit
integer or null <int64>

每个实例或节点保留的历史任务数。负数表示永不删除完成或失败的任务。

{
  • "TaskHistoryRetentionLimit": 0
}

SwarmSpecRaft

ElectionTick
integer or null <int64>

跟随节点等待领导节点消息的 tick 数,超过后成为候选并启动选举。ElectionTick 必须大于 HeartbeatTick。目前 tick 默认为一秒,所以当前可直接对应秒数,但不保证始终如此。

HeartbeatTick
integer or null <int64>

心跳之间的 tick 数。每经过 HeartbeatTick 个 tick,领导节点向跟随节点发送心跳。目前 tick 默认为一秒,所以当前可直接对应秒数,但不保证始终如此。

KeepOldSnapshots
integer or null <int64> >= 0

除当前快照之外要保留的快照数量。

LogEntriesForSlowFollowers
integer or null <int64> >= 0

创建快照后,为同步落后的跟随节点保留的日志条目数。

SnapshotInterval
integer or null <int64> >= 0

快照之间的日志条目数。

{
  • "SnapshotInterval": 0,
  • "KeepOldSnapshots": 0,
  • "LogEntriesForSlowFollowers": 0,
  • "ElectionTick": 0,
  • "HeartbeatTick": 0
}

SwarmSpecTaskDefaults

null or SwarmSpecTaskDefaultsLogDriver (object)
One of
null
{
  • "LogDriver": { }
}

SwarmSpecTaskDefaultsLogDriver

Name
string or null

新任务默认使用的日志驱动。

object or null

所选日志驱动的专属选项,以键值对指定。

property name*
additional property
string
{
  • "Name": "string",
  • "Options": {
    }
}

SystemInfo

Architecture
string or null

主机硬件架构,由 Go 运行时(GOARCH)返回。完整取值见 Go 文档。

BridgeNfIp6tables
boolean or null

表示主机是否提供 bridge-nf-call-ip6tables。

BridgeNfIptables
boolean or null

表示主机是否提供 bridge-nf-call-iptables。

CDISpecDirs
数组元素类型 strings or null

CDI(Container Device Interface)规范所在目录列表。规范定义创建容器时,对 OCI 运行时规格所做的厂商专属修改。列表为空表示禁用 CDI 设备注入。CDI 注入要求守护进程启用实验性功能,非实验性守护进程始终返回空列表。

null or SystemInfoCgroupDriverEnum (string)
One of
null
null or SystemInfoCgroupVersionEnum (string)
One of
null
null or Commit (object)
One of
null
Containers
integer or null <int64>

主机容器总数。

ContainersPaused
integer or null <int64>

状态为 \"paused\" 的容器数量。

ContainersRunning
integer or null <int64>

状态为 \"running\" 的容器数量。

ContainersStopped
integer or null <int64>

状态为 \"stopped\" 的容器数量。

CpuCfsPeriod
boolean or null

表示主机是否支持 CPU CFS(完全公平调度器)周期。

CpuCfsQuota
boolean or null

表示主机是否支持 CPU CFS(完全公平调度器)配额。

CPUSet
boolean or null

表示主机是否支持 CPUset(cpuset.cpus、cpuset.mems)。参见 cpuset(7)。

CPUShares
boolean or null

表示主机是否支持 CPU Shares 限制。

Debug
boolean or null

表示守护进程是否在调试模式运行,或启用了调试级日志。

数组元素类型 objects or null (SystemInfoDefaultAddressPools)

本地网络的自定义默认地址池列表,可在 daemon.json 或 dockerd 选项中指定。例如 Base 为 "10.10.0.0/16"、Size 为 24 时,会定义 256 个 10.10.[0-255].0/24 地址池。

Array
Base
string or null

CIDR 格式网络地址。

Size
integer or null <int64>

网络池大小。

DefaultRuntime
string or null

启动容器时默认使用的 OCI 运行时名称,可在创建各容器时覆盖。

DockerRootDir
string or null

Docker 持久化状态根目录。Linux 默认为 /var/lib/docker,Windows 默认为 C:\\ProgramData\\docker。

Driver
string or null

正在使用的存储驱动名称。

DriverStatus
数组元素类型 strings or null[ items ]

存储驱动专属信息,由驱动提供 "label" / "value" 对,格式与命令行 docker info 输出一致。


> 注意:此字段返回的信息,包括值和标签格式,不应视为稳定,可能不经通知而改变。

ExperimentalBuild
boolean or null

表示守护进程是否启用实验性功能。

null or GenericResourcesInner (object)
One of
null
HttpProxy
string or null

守护进程的 HTTP 代理配置,来自 HTTP_PROXY 环境变量。API 响应会遮蔽代理 URL 中的凭据(用户信息部分)。容器不会自动继承此配置。

HttpsProxy
string or null

守护进程的 HTTPS 代理配置,来自 HTTPS_PROXY 环境变量。API 响应会遮蔽代理 URL 中的凭据(用户信息部分)。容器不会自动继承此配置。

ID
string or null

守护进程唯一标识。


> 注意:ID 格式本身不属于 API,不应视为稳定。

Images
integer or null <int64>

主机镜像总数,包括_有标签_和_无标签_(悬空)镜像。

IndexServerAddress
string or null

镜像搜索所用索引服务器的地址或 URL,也作为 Docker Hub 和 Docker Cloud 用户认证的默认服务器。

InitBinary
string or null

docker-init 二进制文件名称及可选路径。省略路径时,守护进程搜索主机 $PATH 并使用首个结果。

null or Commit (object)
One of
null
IPv4Forwarding
boolean or null

表示是否启用 IPv4 转发。

null or SystemInfoIsolationEnum (string)
One of
null
KernelMemoryTCP
boolean or null

表示主机是否启用内核 TCP 内存限制,不支持时省略。cgroup v2 不支持内核 TCP 内存限制及对应的 memory.kmem.tcp.limit_in_bytes cgroup。

KernelVersion
string or null

主机内核版本。Linux 从 uname 获取;Windows 从注册表 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ 获取,例如 _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_。

Labels
数组元素类型 strings or null

守护进程上设置的用户自定义标签(键值元数据)。


> 注意:Swarm 节点可同时具有通过守护进程配置设置的_守护进程_标签,以及通过 Swarm 管理节点设置的_节点_标签。此字段不包含节点标签,可通过管理节点的 /nodes/(id) 端点获取。

LiveRestoreEnabled
boolean or null

表示是否启用 live restore。启用后,守护进程关闭时容器继续运行;守护进程启动并检测到运行中的容器时也保持运行。

LoggingDriver
string or null

新容器默认使用的日志驱动。

MemoryLimit
boolean or null

表示主机是否支持内存限制。

MemTotal
integer or null <int64>

主机可用物理内存总量,单位字节。

Name
string or null

主机的主机名。

NCPU
integer or null <int64>

守护进程可使用的逻辑 CPU 数量,启动时通过操作系统查询。启动后操作系统 CPU 分配变化不会反映在此值中。

NEventsListener
integer or null <int64>

已订阅的事件监听器数量。

NFd
integer or null <int64>

守护进程使用的文件描述符总数,仅在启用调试模式时返回。

NGoroutines
integer or null <int64>

当前 goroutine 数量,仅在启用调试模式时返回。

NoProxy
string or null

不使用代理的域名后缀列表,以逗号分隔。此值来自 NO_PROXY 环境变量。容器不会自动继承此配置。

OomKillDisable
boolean or null

表示主机是否支持禁用 OOM killer。

OperatingSystem
string or null

主机操作系统名称,如 "Ubuntu 16.04.2 LTS" 或 "Windows Server 2016 Datacenter"。

OSType
string or null

主机操作系统的通用类型,由 Go 运行时(GOOS)返回。目前值为 "linux" 和 "windows"。完整取值列表见 Go 文档。

OSVersion
string or null

主机操作系统版本。


> 注意:此字段返回的信息,包括字段是否存在和取值格式,不应视为稳定,可能不经通知而改变。

PidsLimit
boolean or null

表示主机内核是否支持 PID 限制。

null or PluginsInfo (object)
One of
null
ProductLicense
string or null

报告守护进程的产品许可证摘要。如果应用了商业许可证,会包含节点数量和到期时间等信息。

null or RegistryServiceConfig (object)
One of
null
null or Commit (object)
One of
null
object or null

守护进程配置的 OCI 兼容运行时列表,键保存引用运行时的名称。Docker 守护进程依靠经 containerd 调用的 OCI 运行时连接 Linux 内核命名空间、cgroup 和 SELinux。默认运行时是自动配置的 runc;用户可配置额外运行时,并在此列出。

additional property
object (Runtime)

Runtime 描述 OCI 兼容运行时。守护进程通过 containerd 调用运行时,连接 Linux 内核命名空间、cgroup 和 SELinux。

SecurityOptions
数组元素类型 strings or null

守护进程启用的安全功能列表,如 apparmor、seccomp、SELinux、用户命名空间 userns、rootless 和 no-new-privileges。各功能可能包含额外配置,以逗号分隔的键值对列出。

ServerVersion
string or null

守护进程版本字符串。

SwapLimit
boolean or null

表示主机是否支持交换内存限制。

null or SwarmInfo (object)
One of
null
SystemTime
string or null

当前系统时间,使用纳秒精度的 RFC 3339 格式。

Warnings
数组元素类型 strings or null

缺失功能或守护进程配置问题的警告和信息消息列表,客户端可将这些消息展示给用户。

{
  • "ID": "string",
  • "Containers": 0,
  • "ContainersRunning": 0,
  • "ContainersPaused": 0,
  • "ContainersStopped": 0,
  • "Images": 0,
  • "Driver": "string",
  • "DriverStatus": [
    ],
  • "DockerRootDir": "string",
  • "Plugins": { },
  • "MemoryLimit": true,
  • "SwapLimit": true,
  • "KernelMemoryTCP": true,
  • "CpuCfsPeriod": true,
  • "CpuCfsQuota": true,
  • "CPUShares": true,
  • "CPUSet": true,
  • "PidsLimit": true,
  • "OomKillDisable": true,
  • "IPv4Forwarding": true,
  • "BridgeNfIptables": true,
  • "BridgeNfIp6tables": true,
  • "Debug": true,
  • "NFd": 0,
  • "NGoroutines": 0,
  • "SystemTime": "string",
  • "LoggingDriver": "string",
  • "CgroupDriver": { },
  • "CgroupVersion": { },
  • "NEventsListener": 0,
  • "KernelVersion": "string",
  • "OperatingSystem": "string",
  • "OSVersion": "string",
  • "OSType": "string",
  • "Architecture": "string",
  • "NCPU": 0,
  • "MemTotal": 0,
  • "IndexServerAddress": "string",
  • "RegistryConfig": { },
  • "GenericResources": { },
  • "HttpProxy": "string",
  • "HttpsProxy": "string",
  • "NoProxy": "string",
  • "Name": "string",
  • "Labels": [
    ],
  • "ExperimentalBuild": true,
  • "ServerVersion": "string",
  • "Runtimes": {
    },
  • "DefaultRuntime": "string",
  • "Swarm": { },
  • "LiveRestoreEnabled": true,
  • "Isolation": { },
  • "InitBinary": "string",
  • "ContainerdCommit": { },
  • "RuncCommit": { },
  • "InitCommit": { },
  • "SecurityOptions": [
    ],
  • "ProductLicense": "string",
  • "DefaultAddressPools": [
    ],
  • "Warnings": [
    ],
  • "CDISpecDirs": [
    ]
}

SystemInfoCgroupDriverEnum

string (SystemInfoCgroupDriverEnum)
枚举值: "EMPTY" "cgroupfs" "systemd" "none"
"EMPTY"

SystemInfoCgroupVersionEnum

string (SystemInfoCgroupVersionEnum)
枚举值: "EMPTY" "1" "2"
"EMPTY"

SystemInfoDefaultAddressPools

Base
string or null

CIDR 格式网络地址。

Size
integer or null <int64>

网络池大小。

{
  • "Base": "string",
  • "Size": 0
}

SystemInfoIsolationEnum

string (SystemInfoIsolationEnum)
枚举值: "EMPTY" "default" "hyperv" "process"
"EMPTY"

ThrottleDevice

Path
string or null

设备路径。

Rate
integer or null <int64>

速率。

{
  • "Path": "string",
  • "Rate": 0
}

ThrottlingData

periods
required
integer <int64> >= 0
throttled_periods
required
integer <int64> >= 0
throttled_time
required
integer <int64> >= 0
{
  • "periods": 0,
  • "throttled_periods": 0,
  • "throttled_time": 0
}

TlsInfo

CertIssuerPublicKey
string or null

颁发者的原始公钥字节,使用 URL 安全 Base64 编码。

CertIssuerSubject
string or null

颁发者的原始 subject 字节,使用 URL 安全 Base64 编码。

TrustRoot
string or null

验证叶 TLS 证书的根 CA 证书。

{
  • "TrustRoot": "string",
  • "CertIssuerSubject": "string",
  • "CertIssuerPublicKey": "string"
}

UnixTarget

UnixPath
required
string
{
  • "UnixPath": "string"
}

UpstreamTarget

DisableLogging
boolean or null

禁用此目标的日志。

Key
required
string

目标 Cargo 或 VM 的键。

Path
string or null

使用 HTTP 时的目标路径。

Port
required
integer <int32> >= 0

目标 Cargo 或 VM 的端口。

null or (ProxySsl (ProxySslConfig (object) or ProxySsl (string)))
One of
null
{
  • "Key": "string",
  • "Port": 0,
  • "Path": "string",
  • "DisableLogging": true,
  • "Ssl": { }
}

UriTarget

Uri
required
string

目标 URI。

{
  • "Uri": "string"
}

UrlRedirect

string (UrlRedirect)
枚举值: "MovedPermanently" "Permanent" "Temporary"
"MovedPermanently"

Vm

CreatedAt
required
string <date-time>

VM 创建时间。

NamespaceName
required
string

命名空间名称。

required
object (VmSpec)

VM 规格。

CreatedAt
required
string <date-time>

VM 规格创建时间。

required
object (VmHostConfig)

VM 的资源(CPU、内存、网络)。

Hostname
string or null

VM 主机名。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
Key
required
string <uuid>

VM 规格唯一标识。

object or null

用户定义的键值元数据。

MacAddress
string or null

VM 的 MAC 地址。

object

用户定义的元数据。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

Version
required
string

规格版本。

VmKey
required
string

规范 VM 键,格式为 {namespace}.{name}。

required
object (ObjPsStatus)

VM 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Status": {
    },
  • "Spec": {
    }
}

VmHostConfig

Cpu
required
integer <int64> >= 0

VM 的 CPU 数量(默认:1)。

Dns
数组元素类型 strings or null

VM 使用的 DNS 服务器列表。

HostTun
boolean or null

使用主机 TUN 设备。

Kvm
boolean or null

启用 KVM 加速(默认:false)。

LinkNetIface
string or null

连接 VM 的网络接口(默认:eth0)。

Memory
required
integer <int64> >= 0

VM 内存,单位 MB(默认:512)。

NetIface
string or null

要配置的 VM 网络接口(默认:ens3)。

NetworkMode
string or null

VM 运行时使用的容器网络。

Runtime
string or null

VM 使用的容器镜像名称(默认:nanocl-qemu)。

{
  • "Cpu": 0,
  • "Memory": 0,
  • "NetIface": "string",
  • "LinkNetIface": "string",
  • "Kvm": true,
  • "Dns": [
    ],
  • "Runtime": "string",
  • "NetworkMode": "string",
  • "HostTun": true
}

VmInspect

CreatedAt
required
string <date-time>

VM 创建时间。

InstanceRunning
required
integer >= 0

运行实例数。

required
数组元素类型 objects (Process)

实例列表。

Array
CreatedAt
required
string <date-time>

创建时间。

required
object (ContainerInspectResponse)

进程数据,类型为 ContainerInspect。

IpAddress
string or null

从最近观察到的进程状态解析的有效 IP 地址。

Key
required
string

进程键。

Kind
required
string (ProcessKind)
枚举值: "vm" "job" "cargo"

进程类型(Job、Vm、Cargo)。

KindKey
required
string

Cargo 和 VM 的规范资源键;任务使用名称。

Name
required
string

进程名称。

NodeName
required
string

容器运行所在节点的名称。

UpdatedAt
required
string <date-time>

实例最近更新时间。

InstanceTotal
required
integer >= 0

实例数量。

NamespaceName
required
string

命名空间名称。

required
object (VmSpec)

VM 规格。

CreatedAt
required
string <date-time>

VM 规格创建时间。

required
object (VmHostConfig)

VM 的资源(CPU、内存、网络)。

Hostname
string or null

VM 主机名。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
Key
required
string <uuid>

VM 规格唯一标识。

object or null

用户定义的键值元数据。

MacAddress
string or null

VM 的 MAC 地址。

object

用户定义的元数据。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

Version
required
string

规格版本。

VmKey
required
string

规范 VM 键,格式为 {namespace}.{name}。

required
object (ObjPsStatus)

VM 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Status": {
    },
  • "Spec": {
    },
  • "Instances": [
    ]
}

VmSpec

CreatedAt
required
string <date-time>

VM 规格创建时间。

required
object (VmHostConfig)

VM 的资源(CPU、内存、网络)。

Cpu
required
integer <int64> >= 0

VM 的 CPU 数量(默认:1)。

Dns
数组元素类型 strings or null

VM 使用的 DNS 服务器列表。

HostTun
boolean or null

使用主机 TUN 设备。

Kvm
boolean or null

启用 KVM 加速(默认:false)。

LinkNetIface
string or null

连接 VM 的网络接口(默认:eth0)。

Memory
required
integer <int64> >= 0

VM 内存,单位 MB(默认:512)。

NetIface
string or null

要配置的 VM 网络接口(默认:ens3)。

NetworkMode
string or null

VM 运行时使用的容器网络。

Runtime
string or null

VM 使用的容器镜像名称(默认:nanocl-qemu)。

Hostname
string or null

VM 主机名。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
One of
null
Key
required
string <uuid>

VM 规格唯一标识。

object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

VM 的 MAC 地址。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

Version
required
string

规格版本。

VmKey
required
string

规范 VM 键,格式为 {namespace}.{name}。

{
  • "Key": "5eb041b0-19c9-4022-bd51-0e723885f5dd",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "Version": "string",
  • "VmKey": "string",
  • "Metadata": {
    },
  • "Hostname": "string",
  • "Password": "string",
  • "SshKey": "string",
  • "InitContainer": { },
  • "User": "string",
  • "Image": "string",
  • "MacAddress": "string",
  • "Labels": {
    },
  • "HostConfig": {
    }
}

VmSpecPartial

null or VmHostConfig (object)
One of
null
Hostname
string or null

VM 主机名(默认:根据名称生成)。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
MacAddress
string or null

VM 的 MAC 地址(默认自动生成)。

object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(默认:cloud)。

SshKey
string or null

用户默认 SSH 公钥(推荐)。

User
string or null

VM 默认用户(默认:cloud)。

{
  • "Name": "string",
  • "Metadata": {
    },
  • "Hostname": "string",
  • "User": "string",
  • "Password": "string",
  • "SshKey": "string",
  • "InitContainer": { },
  • "Image": "string",
  • "MacAddress": "string",
  • "Labels": {
    },
  • "HostConfig": { }
}

VmSpecUpdate

null or VmHostConfig (object)
One of
null
Hostname
string or null

VM 主机名。

null or Config (object)
One of
null
object or null

用户定义的键值元数据。

property name*
additional property
string
object

用户定义的元数据。

additional property
string or number or boolean or (数组元素类型 Primitive (strings or numbers or booleans)) or object (Any)

为 OpenApi 生成 Any 类型的辅助工具,适用于 ResourceSpec 等动态 JSON 对象。

Name
string or null

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

{
  • "Name": "string",
  • "Metadata": {
    },
  • "Hostname": "string",
  • "User": "string",
  • "Password": "string",
  • "SshKey": "string",
  • "InitContainer": { },
  • "Labels": {
    },
  • "HostConfig": { }
}

VmSummary

CreatedAt
required
string <date-time>

VM 创建时间。

InstanceRunning
required
integer >= 0

运行实例数。

InstanceTotal
required
integer >= 0

实例数量。

NamespaceName
required
string

命名空间名称。

required
object (VmSpec)

VM 规格。

CreatedAt
required
string <date-time>

VM 规格创建时间。

required
object (VmHostConfig)

VM 的资源(CPU、内存、网络)。

Hostname
string or null

VM 主机名。

Image
required
string

VM 使用的镜像,必须提供完整路径,如 /var/lib/nanocl/vm/image.qcow2。

null or Config (object)
Key
required
string <uuid>

VM 规格唯一标识。

object or null

用户定义的键值元数据。

MacAddress
string or null

VM 的 MAC 地址。

object

用户定义的元数据。

Name
required
string

VM 名称。

Password
string or null

VM 默认密码(cloud)。

SshKey
string or null

用户默认 SSH 密钥。

User
string or null

VM 默认用户(cloud)。

Version
required
string

规格版本。

VmKey
required
string

规范 VM 键,格式为 {namespace}.{name}。

required
object (ObjPsStatus)

VM 状态。

Actual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
Health
required
string (ObjPsHealthStatusKind)
枚举值: "healthy" "unhealthy" "unknown"
PrevActual
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
PrevWanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
UpdatedAt
required
string <date-time>
Wanted
required
string (ObjPsStatusKind)
枚举值: "create" "starting" "start" "updating" "update" "destroying" "destroy" "stopping" "stop" "fail" "finish" "unknown"
{
  • "NamespaceName": "string",
  • "Status": {
    },
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "InstanceTotal": 0,
  • "InstanceRunning": 0,
  • "Spec": {
    }
}

nanocl.Network

CreatedAt
required
string <date-time>

网络首次记录时间。

required
object (Network)

完整的 Docker 网络检查响应。

Attachable
boolean or null
object or null
null or String (string)
Driver
string or null
EnableIPv6
boolean or null
Id
string or null
Ingress
boolean or null
Internal
boolean or null
null or Ipam (object)
object or null
Name
string or null
object or null
Scope
string or null
Key
required
string

稳定键,格式为 {node_name}.{network_name}。

Metadata
any

刷新快照时保留的用户自定义元数据。

Name
required
string

Docker 网络名称。

NodeName
required
string

Docker 守护进程拥有此网络的节点。

UpdatedAt
required
string <date-time>

Docker 检查快照最近刷新时间。

{
  • "Key": "string",
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "UpdatedAt": "2019-08-24T14:15:22Z",
  • "Name": "string",
  • "NodeName": "string",
  • "Data": {
    },
  • "Metadata": null
}