Skip to content

Commit bceb740

Browse files
authored
Merge pull request #1 from Rid/4.1.37
Add 1.37 api version
2 parents 6591301 + dd94a4f commit bceb740

25 files changed

+381
-46
lines changed

docker-swagger.yaml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ produces:
1919
consumes:
2020
- "application/json"
2121
- "text/plain"
22-
basePath: "/v1.36"
22+
basePath: "/v1.37"
2323
info:
2424
title: "Docker Engine API"
25-
version: "1.36"
25+
version: "1.37"
2626
x-logo:
2727
url: "https://docs.docker.com/images/logo-docker-main.png"
2828
description: |
@@ -49,7 +49,7 @@ info:
4949
the URL is not supported by the daemon, a HTTP `400 Bad Request` error message
5050
is returned.
5151
52-
If you omit the version-prefix, the current version of the API (v1.36) is used.
52+
If you omit the version-prefix, the current version of the API (v1.37) is used.
5353
For example, calling `/info` is the same as calling `/v1.36/info`. Using the
5454
API without a version-prefix is deprecated and will be removed in a future release.
5555
@@ -167,7 +167,7 @@ definitions:
167167
Type:
168168
type: "string"
169169
x-nullable: false
170-
enum: ["tcp", "udp"]
170+
enum: ["tcp", "udp", "sctp"]
171171
example:
172172
PrivatePort: 8080
173173
PublicPort: 80
@@ -443,6 +443,10 @@ definitions:
443443
OomKillDisable:
444444
description: "Disable OOM Killer for the container."
445445
type: "boolean"
446+
Init:
447+
description: "Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used."
448+
type: "boolean"
449+
x-nullable: true
446450
PidsLimit:
447451
description: "Tune a container's pids limit. Set -1 for unlimited."
448452
type: "integer"
@@ -797,7 +801,7 @@ definitions:
797801
description: |
798802
An object mapping ports to an empty object in the form:
799803
800-
`{"<port>/<tcp|udp>": {}}`
804+
`{"<port>/<tcp|udp|sctp>": {}}`
801805
type: "object"
802806
additionalProperties:
803807
type: "object"
@@ -1062,8 +1066,8 @@ definitions:
10621066
container's port-number and protocol as key in the format `<port>/<protocol>`,
10631067
for example, `80/udp`.
10641068
1065-
If a container's port is mapped for both `tcp` and `udp`, two separate
1066-
entries are added to the mapping table.
1069+
If a container's port is mapped for multiple protocols, separate entries
1070+
are added to the mapping table.
10671071
type: "object"
10681072
additionalProperties:
10691073
type: "array"
@@ -2800,6 +2804,8 @@ definitions:
28002804
- "shutdown"
28012805
- "failed"
28022806
- "rejected"
2807+
- "remove"
2808+
- "orphaned"
28032809

28042810
Task:
28052811
type: "object"
@@ -3040,6 +3046,7 @@ definitions:
30403046
enum:
30413047
- "tcp"
30423048
- "udp"
3049+
- "sctp"
30433050
TargetPort:
30443051
description: "The port inside the container."
30453052
type: "integer"
@@ -3331,6 +3338,13 @@ definitions:
33313338
Driver:
33323339
description: "Name of the secrets driver used to fetch the secret's value from an external secret store"
33333340
$ref: "#/definitions/Driver"
3341+
Templating:
3342+
description: |
3343+
Templating driver, if applicable
3344+
3345+
Templating controls whether and how to evaluate the config payload as
3346+
a template. If no driver is set, no templating is used.
3347+
$ref: "#/definitions/Driver"
33343348

33353349
Secret:
33363350
type: "object"
@@ -3367,6 +3381,13 @@ definitions:
33673381
Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-3.2))
33683382
config data.
33693383
type: "string"
3384+
Templating:
3385+
description: |
3386+
Templating driver, if applicable
3387+
3388+
Templating controls whether and how to evaluate the config payload as
3389+
a template. If no driver is set, no templating is used.
3390+
$ref: "#/definitions/Driver"
33703391

33713392
Config:
33723393
type: "object"
@@ -4640,7 +4661,7 @@ paths:
46404661
AppArmorProfile:
46414662
type: "string"
46424663
ExecIDs:
4643-
type: "string"
4664+
type: "array"
46444665
HostConfig:
46454666
$ref: "#/definitions/HostConfig"
46464667
GraphDriver:
@@ -5349,6 +5370,13 @@ paths:
53495370
examples:
53505371
application/json:
53515372
message: "No such container: c2ada9df5af8"
5373+
409:
5374+
description: "container is not running"
5375+
schema:
5376+
$ref: "#/definitions/ErrorResponse"
5377+
examples:
5378+
application/json:
5379+
message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
53525380
500:
53535381
description: "server error"
53545382
schema:
@@ -6159,7 +6187,18 @@ paths:
61596187
type: "integer"
61606188
- name: "buildargs"
61616189
in: "query"
6162-
description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)"
6190+
description: >
6191+
JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker
6192+
uses the buildargs as the environment context for commands run via the `Dockerfile` RUN
6193+
instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for
6194+
passing secret values.
6195+
6196+
6197+
For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the
6198+
the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded.
6199+
6200+
6201+
[Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
61636202
type: "string"
61646203
- name: "shmsize"
61656204
in: "query"

src/Client.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ public function containerRestart(string $id, array $queryParameters = [], string
293293
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
294294
*
295295
* @throws \Docker\API\Exception\ContainerKillNotFoundException
296+
* @throws \Docker\API\Exception\ContainerKillConflictException
296297
* @throws \Docker\API\Exception\ContainerKillInternalServerErrorException
297298
*
298299
* @return null|\Psr\Http\Message\ResponseInterface
@@ -683,7 +684,8 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET
683684
* @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`).
684685
* @var int $cpuperiod the length of a CPU period in microseconds
685686
* @var int $cpuquota microseconds of CPU time that the container can get in a CPU period
686-
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
687+
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values.
688+
687689
* @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
688690
* @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)*
689691
* @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs
@@ -2200,7 +2202,7 @@ public static function create($httpClient = null)
22002202
if (null === $httpClient) {
22012203
$httpClient = \Http\Discovery\HttpClientDiscovery::find();
22022204
$plugins = [];
2203-
$uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('v1.36');
2205+
$uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('v1.37');
22042206
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
22052207
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
22062208
}

src/ClientAsync.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ public function containerRestart(string $id, array $queryParameters = [], string
293293
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
294294
*
295295
* @throws \Docker\API\Exception\ContainerKillNotFoundException
296+
* @throws \Docker\API\Exception\ContainerKillConflictException
296297
* @throws \Docker\API\Exception\ContainerKillInternalServerErrorException
297298
*
298299
* @return \Amp\Promise<null|\Amp\Artax\Response>
@@ -683,7 +684,8 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET
683684
* @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`).
684685
* @var int $cpuperiod the length of a CPU period in microseconds
685686
* @var int $cpuquota microseconds of CPU time that the container can get in a CPU period
686-
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
687+
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values.
688+
687689
* @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
688690
* @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)*
689691
* @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs

src/Endpoint/ContainerKill.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver
6666
* {@inheritdoc}
6767
*
6868
* @throws \Docker\API\Exception\ContainerKillNotFoundException
69+
* @throws \Docker\API\Exception\ContainerKillConflictException
6970
* @throws \Docker\API\Exception\ContainerKillInternalServerErrorException
7071
*/
7172
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer)
@@ -76,6 +77,9 @@ protected function transformResponseBody(string $body, int $status, \Symfony\Com
7677
if (404 === $status) {
7778
throw new \Docker\API\Exception\ContainerKillNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
7879
}
80+
if (409 === $status) {
81+
throw new \Docker\API\Exception\ContainerKillConflictException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
82+
}
7983
if (500 === $status) {
8084
throw new \Docker\API\Exception\ContainerKillInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'));
8185
}

src/Endpoint/ImageBuild.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class ImageBuild extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Ja
4141
* @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`).
4242
* @var int $cpuperiod the length of a CPU period in microseconds
4343
* @var int $cpuquota microseconds of CPU time that the container can get in a CPU period
44-
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)
44+
* @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values.
45+
4546
* @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
4647
* @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)*
4748
* @var string $labels arbitrary key/value labels to set on the image, as a JSON map of string pairs
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file has been auto generated by Jane,
7+
*
8+
* Do no edit it directly.
9+
*/
10+
11+
namespace Docker\API\Exception;
12+
13+
class ContainerKillConflictException extends \RuntimeException implements ClientException
14+
{
15+
private $errorResponse;
16+
17+
public function __construct(\Docker\API\Model\ErrorResponse $errorResponse)
18+
{
19+
parent::__construct('container is not running', 409);
20+
$this->errorResponse = $errorResponse;
21+
}
22+
23+
public function getErrorResponse()
24+
{
25+
return $this->errorResponse;
26+
}
27+
}

src/Model/ConfigSpec.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class ConfigSpec
3232
* @var string
3333
*/
3434
protected $data;
35+
/**
36+
* Driver represents a driver (network, logging, secrets).
37+
*
38+
* @var Driver
39+
*/
40+
protected $templating;
3541

3642
/**
3743
* User-defined name of the config.
@@ -108,4 +114,28 @@ public function setData(?string $data): self
108114

109115
return $this;
110116
}
117+
118+
/**
119+
* Driver represents a driver (network, logging, secrets).
120+
*
121+
* @return Driver
122+
*/
123+
public function getTemplating(): ?Driver
124+
{
125+
return $this->templating;
126+
}
127+
128+
/**
129+
* Driver represents a driver (network, logging, secrets).
130+
*
131+
* @param Driver $templating
132+
*
133+
* @return self
134+
*/
135+
public function setTemplating(?Driver $templating): self
136+
{
137+
$this->templating = $templating;
138+
139+
return $this;
140+
}
111141
}

src/Model/ConfigsCreatePostBody.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class ConfigsCreatePostBody
3232
* @var string
3333
*/
3434
protected $data;
35+
/**
36+
* Driver represents a driver (network, logging, secrets).
37+
*
38+
* @var Driver
39+
*/
40+
protected $templating;
3541

3642
/**
3743
* User-defined name of the config.
@@ -108,4 +114,28 @@ public function setData(?string $data): self
108114

109115
return $this;
110116
}
117+
118+
/**
119+
* Driver represents a driver (network, logging, secrets).
120+
*
121+
* @return Driver
122+
*/
123+
public function getTemplating(): ?Driver
124+
{
125+
return $this->templating;
126+
}
127+
128+
/**
129+
* Driver represents a driver (network, logging, secrets).
130+
*
131+
* @param Driver $templating
132+
*
133+
* @return self
134+
*/
135+
public function setTemplating(?Driver $templating): self
136+
{
137+
$this->templating = $templating;
138+
139+
return $this;
140+
}
111141
}

src/Model/ContainerConfig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ContainerConfig
5151
/**
5252
* An object mapping ports to an empty object in the form:.
5353
54-
`{"<port>/<tcp|udp>": {}}`
54+
`{"<port>/<tcp|udp|sctp>": {}}`
5555
5656
*
5757
* @var mixed[]
@@ -316,7 +316,7 @@ public function setAttachStderr(?bool $attachStderr): self
316316
/**
317317
* An object mapping ports to an empty object in the form:.
318318
319-
`{"<port>/<tcp|udp>": {}}`
319+
`{"<port>/<tcp|udp|sctp>": {}}`
320320
321321
*
322322
* @return mixed[]
@@ -329,7 +329,7 @@ public function getExposedPorts(): ?\ArrayObject
329329
/**
330330
* An object mapping ports to an empty object in the form:.
331331
332-
`{"<port>/<tcp|udp>": {}}`
332+
`{"<port>/<tcp|udp|sctp>": {}}`
333333
334334
*
335335
* @param mixed[] $exposedPorts

src/Model/ContainersCreatePostBody.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ContainersCreatePostBody
5151
/**
5252
* An object mapping ports to an empty object in the form:.
5353
54-
`{"<port>/<tcp|udp>": {}}`
54+
`{"<port>/<tcp|udp|sctp>": {}}`
5555
5656
*
5757
* @var mixed[]
@@ -328,7 +328,7 @@ public function setAttachStderr(?bool $attachStderr): self
328328
/**
329329
* An object mapping ports to an empty object in the form:.
330330
331-
`{"<port>/<tcp|udp>": {}}`
331+
`{"<port>/<tcp|udp|sctp>": {}}`
332332
333333
*
334334
* @return mixed[]
@@ -341,7 +341,7 @@ public function getExposedPorts(): ?\ArrayObject
341341
/**
342342
* An object mapping ports to an empty object in the form:.
343343
344-
`{"<port>/<tcp|udp>": {}}`
344+
`{"<port>/<tcp|udp|sctp>": {}}`
345345
346346
*
347347
* @param mixed[] $exposedPorts

0 commit comments

Comments
 (0)