GET /docker/api/v2/containers
List all containers

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

Params

Param name Description
compute_resource_id
optional

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

paginate results


Value: Must be String
per_page
optional

number of entries per request


Value: Must be String

GET /docker/api/v2/containers/:id
Show a container

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

Params

Param name Description
id
required

Value: 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
optional

Value: 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
Create a container

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

Params

Param name Description
container
required

Value: Must be a Hash
container[name]
required

Value: Must be String
container[compute_resource_id]
required

Value: 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]
optional , nil allowed

Registry this container will have to use

to get the image

Value: Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.
container[image]
optional , nil allowed

Image to use to create the container.

Format should be repository:tag, e.g: centos:7

Value: Must be String
container[tty]
optional , nil allowed

Value: Must be 'true' or 'false'
container[entrypoint]
optional , nil allowed

Value: Must be String
container[cmd]
optional , nil allowed

Value: Must be String
container[memory]
optional , nil allowed

Value: Must be String
container[cpu_shares]
optional , nil allowed

Value: Must be a number.
container[cpu_sets]
optional , nil allowed

Value: Must be String
container[environment_variables]
optional , nil allowed

Value: Must be Hash
container[attach_stdout]
optional , nil allowed

Value: Must be 'true' or 'false'
container[attach_stdin]
optional , nil allowed

Value: Must be 'true' or 'false'
container[attach_stderr]
optional , nil allowed

Value: Must be 'true' or 'false'
container[katello]
optional , nil allowed

Value: Must be 'true' or 'false'

DELETE /docker/api/v2/containers/:id
Delete a container

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

Params

Param name Description
id
required

Value: 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
optional

Value: 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
Show container logs

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

Params

Param name Description
id
required

Value: 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
optional

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

Value: Must be 'true' or 'false'
stderr
optional

Value: Must be 'true' or 'false'
tail
optional

Number of lines to tail. Default: 100


Value: Must be Fixnum

PUT /docker/api/v2/containers/:id/power
Run power operation on a container

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

Params

Param name Description
id
required

Value: 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
optional

Value: 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
required

power action, valid actions are (start), (stop), (status)


Value: Must be String