GET /docker/api/v2/containers
列出所有容器

GET /docker/api/v2/compute_resources/:compute_resource_id/containers
List all containers on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

compute_resource_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


GET /docker/api/v2/containers/:id
显示容器

GET /docker/api/v2/compute_resources/:compute_resource_id/containers/:id
Show container on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /docker/api/v2/containers
生成容器

POST /docker/api/v2/compute_resources/:compute_resource_id/containers
Create container on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

container
必填

Validations:

  • Must be a Hash

container[name]
选填 , 允许空值

Validations:

  • Must be a String

container[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

container[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type

container[compute_resource_id]
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

container[registry_id]
选填 , 允许空值

Registry this container will have to use to get the image

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

container[repository_name]
必填

Name of the repository to use to create the container. e.g. centos

Validations:

  • Must be a String

container[tag]
必填

Tag to use to create the container. e.g. latest

Validations:

  • Must be a String

container[tty]
选填 , 允许空值

Validations:

  • Must be one of: true, false, 1, 0

container[entrypoint]
选填 , 允许空值

Validations:

  • Must be a String

container[command]
必填

Validations:

  • Must be a String

container[memory]
选填 , 允许空值

Validations:

  • Must be a String

container[cpu_shares]
选填 , 允许空值

Validations:

  • Must be a number.

container[cpu_set]
选填 , 允许空值

Validations:

  • Must be a String

container[environment_variables]
选填 , 允许空值

Optional array of environment variables hashes. e.g. 'environment_variables': [{'name' => 'example', 'value' => '123'}]

Validations:

  • Must be an array of any type

container[attach_stdout]
选填 , 允许空值

Validations:

  • Must be one of: true, false, 1, 0

container[attach_stdin]
选填 , 允许空值

Validations:

  • Must be one of: true, false, 1, 0

container[attach_stderr]
选填 , 允许空值

Validations:

  • Must be one of: true, false, 1, 0

container[capsule_id]
选填 , 允许空值

The capsule this container will have to use to get the image. Relevant for images retrieved from katello registry.

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


DELETE /docker/api/v2/containers/:id
删除容器

DELETE /docker/api/v2/compute_resources/:compute_resource_id/containers/:id
Delete container on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /docker/api/v2/containers/:id/logs
显示容器日志

GET /docker/api/v2/compute_resources/:compute_resource_id/containers/:id/logs
Show logs from a container on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

stdout
选填

Validations:

  • Must be one of: true, false, 1, 0

stderr
选填

Validations:

  • Must be one of: true, false, 1, 0

tail
选填

查看的行数。默认为 100。

Validations:

  • Must be a Integer


PUT /docker/api/v2/containers/:id/power
在容器中运行电源操作

PUT /docker/api/v2/compute_resources/:compute_resource_id/containers/:id/power
Run power operation on a container on a compute resource

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
选填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

power_action
必填

电源操作,有效操作为 (start), (stop), (status)

Validations:

  • Must be a String