Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 5ba0889

Browse files
committed
swagger: sync updates to v1.39
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit a8b2272ab372cde394227d193dbb985b58b13bfa) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 4d9397c26889fea024b151b770e67077c4145995 Component: engine
1 parent 7d189e5 commit 5ba0889

1 file changed

Lines changed: 219 additions & 77 deletions

File tree

components/engine/docs/api/v1.39.yaml

Lines changed: 219 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,71 @@ definitions:
663663
1000000 (1 ms). 0 means inherit.
664664
type: "integer"
665665

666+
Health:
667+
description: |
668+
Health stores information about the container's healthcheck results.
669+
type: "object"
670+
properties:
671+
Status:
672+
description: |
673+
Status is one of `none`, `starting`, `healthy` or `unhealthy`
674+
675+
- "none" Indicates there is no healthcheck
676+
- "starting" Starting indicates that the container is not yet ready
677+
- "healthy" Healthy indicates that the container is running correctly
678+
- "unhealthy" Unhealthy indicates that the container has a problem
679+
type: "string"
680+
enum:
681+
- "none"
682+
- "starting"
683+
- "healthy"
684+
- "unhealthy"
685+
example: "healthy"
686+
FailingStreak:
687+
description: "FailingStreak is the number of consecutive failures"
688+
type: "integer"
689+
example: 0
690+
Log:
691+
type: "array"
692+
description: |
693+
Log contains the last few results (oldest first)
694+
items:
695+
x-nullable: true
696+
$ref: "#/definitions/HealthcheckResult"
697+
698+
HealthcheckResult:
699+
description: |
700+
HealthcheckResult stores information about a single run of a healthcheck probe
701+
type: "object"
702+
properties:
703+
Start:
704+
description: |
705+
Date and time at which this check started in
706+
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
707+
type: "string"
708+
format: "date-time"
709+
example: "2020-01-04T10:44:24.496525531Z"
710+
End:
711+
description: |
712+
Date and time at which this check ended in
713+
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
714+
type: "string"
715+
format: "dateTime"
716+
example: "2020-01-04T10:45:21.364524523Z"
717+
ExitCode:
718+
description: |
719+
ExitCode meanings:
720+
721+
- `0` healthy
722+
- `1` unhealthy
723+
- `2` reserved (considered unhealthy)
724+
- other values: error running probe
725+
type: "integer"
726+
example: 0
727+
Output:
728+
description: "Output from last check"
729+
type: "string"
730+
666731
HostConfig:
667732
description: "Container configuration that depends on the host we are running on"
668733
allOf:
@@ -1078,6 +1143,42 @@ definitions:
10781143
items:
10791144
type: "string"
10801145

1146+
NetworkingConfig:
1147+
description: |
1148+
NetworkingConfig represents the container's networking configuration for
1149+
each of its interfaces.
1150+
It is used for the networking configs specified in the `docker create`
1151+
and `docker network connect` commands.
1152+
type: "object"
1153+
properties:
1154+
EndpointsConfig:
1155+
description: |
1156+
A mapping of network name to endpoint configuration for that network.
1157+
type: "object"
1158+
additionalProperties:
1159+
$ref: "#/definitions/EndpointSettings"
1160+
example:
1161+
# putting an example here, instead of using the example values from
1162+
# /definitions/EndpointSettings, because containers/create currently
1163+
# does not support attaching to multiple networks, so the example request
1164+
# would be confusing if it showed that multiple networks can be contained
1165+
# in the EndpointsConfig.
1166+
# TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
1167+
EndpointsConfig:
1168+
isolated_nw:
1169+
IPAMConfig:
1170+
IPv4Address: "172.20.30.33"
1171+
IPv6Address: "2001:db8:abcd::3033"
1172+
LinkLocalIPs:
1173+
- "169.254.34.68"
1174+
- "fe80::3468"
1175+
Links:
1176+
- "container_1"
1177+
- "container_2"
1178+
Aliases:
1179+
- "server_x"
1180+
- "server_y"
1181+
10811182
NetworkSettings:
10821183
description: "NetworkSettings exposes the network settings in the API"
10831184
type: "object"
@@ -3165,14 +3266,7 @@ definitions:
31653266
description: "Specifies which networks the service should attach to."
31663267
type: "array"
31673268
items:
3168-
type: "object"
3169-
properties:
3170-
Target:
3171-
type: "string"
3172-
Aliases:
3173-
type: "array"
3174-
items:
3175-
type: "string"
3269+
$ref: "#/definitions/NetworkAttachmentConfig"
31763270
LogDriver:
31773271
description: |
31783272
Specifies the log driver to use for tasks created from this spec. If
@@ -3449,14 +3543,8 @@ definitions:
34493543
description: "Specifies which networks the service should attach to."
34503544
type: "array"
34513545
items:
3452-
type: "object"
3453-
properties:
3454-
Target:
3455-
type: "string"
3456-
Aliases:
3457-
type: "array"
3458-
items:
3459-
type: "string"
3546+
$ref: "#/definitions/NetworkAttachmentConfig"
3547+
34603548
EndpointSpec:
34613549
$ref: "#/definitions/EndpointSpec"
34623550

@@ -3834,6 +3922,71 @@ definitions:
38343922
Spec:
38353923
$ref: "#/definitions/ConfigSpec"
38363924

3925+
ContainerState:
3926+
description: |
3927+
ContainerState stores container's running state. It's part of ContainerJSONBase
3928+
and will be returned by the "inspect" command.
3929+
type: "object"
3930+
properties:
3931+
Status:
3932+
description: |
3933+
String representation of the container state. Can be one of "created",
3934+
"running", "paused", "restarting", "removing", "exited", or "dead".
3935+
type: "string"
3936+
enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
3937+
example: "running"
3938+
Running:
3939+
description: |
3940+
Whether this container is running.
3941+
3942+
Note that a running container can be _paused_. The `Running` and `Paused`
3943+
booleans are not mutually exclusive:
3944+
3945+
When pausing a container (on Linux), the freezer cgroup is used to suspend
3946+
all processes in the container. Freezing the process requires the process to
3947+
be running. As a result, paused containers are both `Running` _and_ `Paused`.
3948+
3949+
Use the `Status` field instead to determine if a container's state is "running".
3950+
type: "boolean"
3951+
example: true
3952+
Paused:
3953+
description: "Whether this container is paused."
3954+
type: "boolean"
3955+
example: false
3956+
Restarting:
3957+
description: "Whether this container is restarting."
3958+
type: "boolean"
3959+
example: false
3960+
OOMKilled:
3961+
description: |
3962+
Whether this container has been killed because it ran out of memory.
3963+
type: "boolean"
3964+
example: false
3965+
Dead:
3966+
type: "boolean"
3967+
example: false
3968+
Pid:
3969+
description: "The process ID of this container"
3970+
type: "integer"
3971+
example: 1234
3972+
ExitCode:
3973+
description: "The last exit code of this container"
3974+
type: "integer"
3975+
example: 0
3976+
Error:
3977+
type: "string"
3978+
StartedAt:
3979+
description: "The time when this container was last started."
3980+
type: "string"
3981+
example: "2020-01-06T09:06:59.461876391Z"
3982+
FinishedAt:
3983+
description: "The time when this container last exited."
3984+
type: "string"
3985+
example: "2020-01-06T09:07:59.461876391Z"
3986+
Health:
3987+
x-nullable: true
3988+
$ref: "#/definitions/Health"
3989+
38373990
SystemInfo:
38383991
type: "object"
38393992
properties:
@@ -4634,6 +4787,28 @@ definitions:
46344787
IP address and ports at which this node can be reached.
46354788
type: "string"
46364789

4790+
NetworkAttachmentConfig:
4791+
description: |
4792+
Specifies how a service should be attached to a particular network.
4793+
type: "object"
4794+
properties:
4795+
Target:
4796+
description: |
4797+
The target network for attachment. Must be a network name or ID.
4798+
type: "string"
4799+
Aliases:
4800+
description: |
4801+
Discoverable alternate names for the service on this network.
4802+
type: "array"
4803+
items:
4804+
type: "string"
4805+
DriverOpts:
4806+
description: |
4807+
Driver attachment options for the network target.
4808+
type: "object"
4809+
additionalProperties:
4810+
type: "string"
4811+
46374812
paths:
46384813
/containers/json:
46394814
get:
@@ -4861,16 +5036,7 @@ paths:
48615036
HostConfig:
48625037
$ref: "#/definitions/HostConfig"
48635038
NetworkingConfig:
4864-
description: "This container's networking configuration."
4865-
type: "object"
4866-
properties:
4867-
EndpointsConfig:
4868-
description: |
4869-
A mapping of network name to endpoint configuration
4870-
for that network.
4871-
type: "object"
4872-
additionalProperties:
4873-
$ref: "#/definitions/EndpointSettings"
5039+
$ref: "#/definitions/NetworkingConfig"
48745040
example:
48755041
Hostname: ""
48765042
Domainname: ""
@@ -5063,54 +5229,10 @@ paths:
50635229
items:
50645230
type: "string"
50655231
State:
5066-
description: "The state of the container."
5067-
type: "object"
5068-
properties:
5069-
Status:
5070-
description: |
5071-
The status of the container. For example, `"running"` or `"exited"`.
5072-
type: "string"
5073-
enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"]
5074-
Running:
5075-
description: |
5076-
Whether this container is running.
5077-
5078-
Note that a running container can be _paused_. The `Running` and `Paused`
5079-
booleans are not mutually exclusive:
5080-
5081-
When pausing a container (on Linux), the cgroups freezer is used to suspend
5082-
all processes in the container. Freezing the process requires the process to
5083-
be running. As a result, paused containers are both `Running` _and_ `Paused`.
5084-
5085-
Use the `Status` field instead to determine if a container's state is "running".
5086-
type: "boolean"
5087-
Paused:
5088-
description: "Whether this container is paused."
5089-
type: "boolean"
5090-
Restarting:
5091-
description: "Whether this container is restarting."
5092-
type: "boolean"
5093-
OOMKilled:
5094-
description: "Whether this container has been killed because it ran out of memory."
5095-
type: "boolean"
5096-
Dead:
5097-
type: "boolean"
5098-
Pid:
5099-
description: "The process ID of this container"
5100-
type: "integer"
5101-
ExitCode:
5102-
description: "The last exit code of this container"
5103-
type: "integer"
5104-
Error:
5105-
type: "string"
5106-
StartedAt:
5107-
description: "The time when this container was last started."
5108-
type: "string"
5109-
FinishedAt:
5110-
description: "The time when this container last exited."
5111-
type: "string"
5232+
x-nullable: true
5233+
$ref: "#/definitions/ContainerState"
51125234
Image:
5113-
description: "The container's image"
5235+
description: "The container's image ID"
51145236
type: "string"
51155237
ResolvConfPath:
51165238
type: "string"
@@ -5180,6 +5302,8 @@ paths:
51805302
Domainname: ""
51815303
Env:
51825304
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
5305+
Healthcheck:
5306+
Test: ["CMD-SHELL", "exit 0"]
51835307
Hostname: "ba033ac44011"
51845308
Image: "ubuntu"
51855309
Labels:
@@ -5291,6 +5415,14 @@ paths:
52915415
Error: ""
52925416
ExitCode: 9
52935417
FinishedAt: "2015-01-06T15:47:32.080254511Z"
5418+
Health:
5419+
Status: "healthy"
5420+
FailingStreak: 0
5421+
Log:
5422+
- Start: "2019-12-22T10:59:05.6385933Z"
5423+
End: "2019-12-22T10:59:05.8078452Z"
5424+
ExitCode: 0
5425+
Output: ""
52945426
OOMKilled: false
52955427
Dead: false
52965428
Paused: false
@@ -5591,6 +5723,16 @@ paths:
55915723
If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
55925724
nil then for compatibility with older daemons the length of the
55935725
corresponding `cpu_usage.percpu_usage` array should be used.
5726+
5727+
To calculate the values shown by the `stats` command of the docker cli tool
5728+
the following formulas can be used:
5729+
* used_memory = `memory_stats.usage - memory_stats.stats.cache`
5730+
* available_memory = `memory_stats.limit`
5731+
* Memory usage % = `(used_memory / available_memory) * 100.0`
5732+
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
5733+
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
5734+
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
5735+
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
55945736
operationId: "ContainerStats"
55955737
produces: ["application/json"]
55965738
responses:
@@ -5762,8 +5904,6 @@ paths:
57625904
description: "no error"
57635905
304:
57645906
description: "container already started"
5765-
schema:
5766-
$ref: "#/definitions/ErrorResponse"
57675907
404:
57685908
description: "no such container"
57695909
schema:
@@ -5798,8 +5938,6 @@ paths:
57985938
description: "no error"
57995939
304:
58005940
description: "container already stopped"
5801-
schema:
5802-
$ref: "#/definitions/ErrorResponse"
58035941
404:
58045942
description: "no such container"
58055943
schema:
@@ -6924,6 +7062,10 @@ paths:
69247062
in: "query"
69257063
description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
69267064
type: "string"
7065+
- name: "message"
7066+
in: "query"
7067+
description: "Set commit message for imported image."
7068+
type: "string"
69277069
- name: "inputImage"
69287070
in: "body"
69297071
description: "Image content if the value `-` has been specified in fromSrc query parameter"

0 commit comments

Comments
 (0)