diff --git a/.jane-openapi b/.jane-openapi index 31404ee..ae7c500 100644 --- a/.jane-openapi +++ b/.jane-openapi @@ -2,7 +2,7 @@ declare(strict_types=1); return [ - 'openapi-file' => __DIR__ . '/spec/docker-v1.48-patched.yaml', + 'openapi-file' => __DIR__ . '/spec/docker-v1.51-patched.yaml', 'namespace' => 'WebProject\DockerApi\Library\Generated', 'directory' => __DIR__ . '/generated', 'strict' => true, @@ -11,5 +11,5 @@ return [ 'clean-generated' => true, 'reference' => true, 'use-cacheable-supports-method' => true, - 'validation' => false, + 'validation' => false, // needs more patches to fully work ]; diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index f486926..39655fe 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -29,10 +29,9 @@ /** symfony set @see \PhpCsFixer\RuleSet\Sets\SymfonyRiskySet */ '@Symfony:risky' => true, '@PhpCsFixer:risky' => true, - '@PHP83Migration' => true, + '@PHP8x3Migration' => true, '@DoctrineAnnotation' => true, - // OEG Set: - 'binary_operator_spaces' => [ + 'binary_operator_spaces' => [ 'default' => 'align', 'operators' => [ '??' => 'single_space', diff --git a/README.md b/README.md index e8fe1c4..24d2081 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # php-docker-api-client - A PHP docker API client -## Based on Docker API Version spec [docker-v1.48.yaml](spec/docker-v1.48.yaml) -> patched types from real world [docker-v1.48-patched.yaml](spec/docker-v1.48-patched.yaml) responses and minor code patches (WIP) +## Based on Docker API Version spec [docker-v1.51.yaml](spec/docker-v1.51.yaml) +> converted to openapi v3.1.0 [docker-v1.51-patched.yaml](spec/docker-v1.51-patched.yaml) see [UPDATE.md](spec/UPDATE.md) how to upgrade client ## Example ```shell diff --git a/bin/docker-api b/bin/docker-api index a288480..0e72dfe 100755 --- a/bin/docker-api +++ b/bin/docker-api @@ -3,6 +3,7 @@ declare(strict_types=1); use Symfony\Component\Console\Application; +use WebProject\DockerApiClient\Command\EventsListenCommand; use WebProject\DockerApiClient\Command\ListContainersCommand; if (!is_dir(dirname(__DIR__) . '/vendor')) { @@ -18,7 +19,8 @@ require_once dirname(__DIR__) . '/vendor/autoload_runtime.php'; return static function (array $context) { $application = new Application('Docker API', '@package_version@'); $application->add(new ListContainersCommand()); - $application->setDefaultCommand('synchronize-hosts'); + $application->add(new EventsListenCommand()); + $application->setDefaultCommand('docker:list-containers'); return $application; }; diff --git a/composer.json b/composer.json index 944dd4c..ba1f184 100644 --- a/composer.json +++ b/composer.json @@ -46,6 +46,7 @@ } }, "scripts": { - "generate": "XDEBUG_MODE=off jane-openapi generate" + "generate": "XDEBUG_MODE=off jane-openapi generate", + "tests": "vendor/bin/codecept run" } } diff --git a/composer.lock b/composer.lock index 3e09eee..f0c8635 100644 --- a/composer.lock +++ b/composer.lock @@ -247,33 +247,38 @@ }, { "name": "league/uri", - "version": "7.5.1", + "version": "7.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "81fb5145d2644324614cc532b28efd0215bda430" + "reference": "f625804987a0a9112d954f9209d91fec52182344" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", - "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/f625804987a0a9112d954f9209d91fec52182344", + "reference": "f625804987a0a9112d954f9209d91fec52182344", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.5", - "php": "^8.1" + "league/uri-interfaces": "^7.6", + "php": "^8.1", + "psr/http-factory": "^1" }, "conflict": { "league/uri-schemes": "^1.0" }, "suggest": { "ext-bcmath": "to improve IPV4 host parsing", + "ext-dom": "to convert the URI into an HTML anchor tag", "ext-fileinfo": "to create Data URI from file contennts", "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", + "ext-uri": "to use the PHP native URI class", "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", "league/uri-components": "Needed to easily manipulate URI objects components", + "league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle WHATWG URL", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -301,6 +306,7 @@ "description": "URI manipulation library", "homepage": "https://uri.thephpleague.com", "keywords": [ + "URN", "data-uri", "file-uri", "ftp", @@ -313,9 +319,11 @@ "psr-7", "query-string", "querystring", + "rfc2141", "rfc3986", "rfc3987", "rfc6570", + "rfc8141", "uri", "uri-template", "url", @@ -325,7 +333,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.5.1" + "source": "https://github.com/thephpleague/uri/tree/7.6.0" }, "funding": [ { @@ -333,26 +341,25 @@ "type": "github" } ], - "time": "2024-12-08T08:40:02+00:00" + "time": "2025-11-18T12:17:23+00:00" }, { "name": "league/uri-interfaces", - "version": "7.5.0", + "version": "7.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", - "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/ccbfb51c0445298e7e0b7f4481b942f589665368", + "reference": "ccbfb51c0445298e7e0b7f4481b942f589665368", "shasum": "" }, "require": { "ext-filter": "*", "php": "^8.1", - "psr/http-factory": "^1", "psr/http-message": "^1.1 || ^2.0" }, "suggest": { @@ -360,6 +367,7 @@ "ext-gmp": "to improve IPV4 host parsing", "ext-intl": "to handle IDN host with the best performance", "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle WHATWG URL", "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", @@ -384,7 +392,7 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interfaces and classes for URI representation and interaction", + "description": "Common tools for parsing and resolving RFC3987/RFC3986 URI", "homepage": "https://uri.thephpleague.com", "keywords": [ "data-uri", @@ -409,7 +417,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.6.0" }, "funding": [ { @@ -417,7 +425,7 @@ "type": "github" } ], - "time": "2024-12-08T08:18:47+00:00" + "time": "2025-11-18T12:17:23+00:00" }, { "name": "nyholm/psr7", @@ -1054,16 +1062,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.10.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + "reference": "431c02da15e566adb0ad9c5030fa6f6204d9de9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/431c02da15e566adb0ad9c5030fa6f6204d9de9e", + "reference": "431c02da15e566adb0ad9c5030fa6f6204d9de9e", "shasum": "" }, "require": { @@ -1106,9 +1114,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.1" }, - "time": "2024-11-09T15:12:26+00:00" + "time": "2025-11-18T07:51:16+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -5461,16 +5469,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.4.2", + "version": "12.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a94ea4d26d865875803b23aaf78c3c2c670ea2ea" + "reference": "d8f644d8d9bb904867f7a0aeb1bd306e0d966949" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a94ea4d26d865875803b23aaf78c3c2c670ea2ea", - "reference": "a94ea4d26d865875803b23aaf78c3c2c670ea2ea", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d8f644d8d9bb904867f7a0aeb1bd306e0d966949", + "reference": "d8f644d8d9bb904867f7a0aeb1bd306e0d966949", "shasum": "" }, "require": { @@ -5538,7 +5546,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.4.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.4.3" }, "funding": [ { @@ -5562,7 +5570,7 @@ "type": "tidelift" } ], - "time": "2025-10-30T08:41:39+00:00" + "time": "2025-11-13T07:20:26+00:00" }, { "name": "psr/event-dispatcher", @@ -5886,16 +5894,16 @@ }, { "name": "react/dns", - "version": "v1.13.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3", "shasum": "" }, "require": { @@ -5950,7 +5958,7 @@ ], "support": { "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.13.0" + "source": "https://github.com/reactphp/dns/tree/v1.14.0" }, "funding": [ { @@ -5958,20 +5966,20 @@ "type": "open_collective" } ], - "time": "2024-06-13T14:18:03+00:00" + "time": "2025-11-18T19:34:28+00:00" }, { "name": "react/event-loop", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { @@ -6022,7 +6030,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, "funding": [ { @@ -6030,7 +6038,7 @@ "type": "open_collective" } ], - "time": "2023-11-13T13:48:05+00:00" + "time": "2025-11-17T20:46:25+00:00" }, { "name": "react/promise", @@ -6107,16 +6115,16 @@ }, { "name": "react/socket", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08", "shasum": "" }, "require": { @@ -6175,7 +6183,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.16.0" + "source": "https://github.com/reactphp/socket/tree/v1.17.0" }, "funding": [ { @@ -6183,7 +6191,7 @@ "type": "open_collective" } ], - "time": "2024-07-26T10:38:09+00:00" + "time": "2025-11-19T20:47:34+00:00" }, { "name": "react/stream", @@ -6269,12 +6277,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "f5e6f173e6c76902cae38eeb8b208bd7e5333063" + "reference": "9a206edc1506db473b98aa05574bed12fe204a8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f5e6f173e6c76902cae38eeb8b208bd7e5333063", - "reference": "f5e6f173e6c76902cae38eeb8b208bd7e5333063", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/9a206edc1506db473b98aa05574bed12fe204a8a", + "reference": "9a206edc1506db473b98aa05574bed12fe204a8a", "shasum": "" }, "conflict": { @@ -6457,6 +6465,7 @@ "drupal/core-recommended": ">=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", "drupal/currency": "<3.5", "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", + "drupal/email_tfa": "<2.0.6", "drupal/formatter_suite": "<2.1", "drupal/gdpr": "<3.0.1|>=3.1,<3.1.2", "drupal/google_tag": "<1.8|>=2,<2.0.8", @@ -6745,6 +6754,7 @@ "modx/revolution": "<=3.1", "mojo42/jirafeau": "<4.4", "mongodb/mongodb": ">=1,<1.9.2", + "mongodb/mongodb-extension": "<1.21.2", "monolog/monolog": ">=1.8,<1.12", "moodle/moodle": "<4.4.11|>=4.5.0.0-beta,<4.5.7|>=5.0.0.0-beta,<5.0.3", "moonshine/moonshine": "<=3.12.5", @@ -6752,10 +6762,9 @@ "movim/moxl": ">=0.8,<=0.10", "movingbytes/social-network": "<=1.2.1", "mpdf/mpdf": "<=7.1.7", - "munkireport/comment": "<4.1", + "munkireport/comment": "<4", "munkireport/managedinstalls": "<2.6", "munkireport/munki_facts": "<1.5", - "munkireport/munkireport": ">=2.5.3,<5.6.3", "munkireport/reportdata": "<3.5", "munkireport/softwareupdate": "<1.6", "mustache/mustache": ">=2,<2.14.1", @@ -7254,7 +7263,7 @@ "type": "tidelift" } ], - "time": "2025-11-18T22:05:34+00:00" + "time": "2025-11-19T19:05:15+00:00" }, { "name": "sebastian/cli-parser", @@ -9195,16 +9204,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.3", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", "shasum": "" }, "require": { @@ -9233,7 +9242,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" }, "funding": [ { @@ -9241,7 +9250,7 @@ "type": "github" } ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2025-11-17T20:03:58+00:00" } ], "aliases": [], @@ -9255,5 +9264,5 @@ "php": "~8.3.0 || ~8.4.0" }, "platform-dev": {}, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } diff --git a/generated/Client.php b/generated/Client.php index ff9c351..d95adea 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -1116,9 +1116,13 @@ public function imageTag(string $name, array $queryParameters = [], string $fetc * @param string $name Image name or ID * @param array $queryParameters { * - * @var bool $force Remove the image even if it is being used by stopped containers or has other tags - * @var bool $noprune Do not delete untagged parent images - * } + * @var bool $force Remove the image even if it is being used by stopped containers or has other tags + * @var bool $noprune Do not delete untagged parent images + * @var array $platforms Select platform-specific content to delete. + * Multiple values are accepted. + * Each platform is a OCI platform encoded as a JSON string. + * + * } * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @@ -1353,13 +1357,9 @@ public function systemDataUsage(array $queryParameters = [], string $fetch = sel * * ### Image tarball format * - * An image tarball contains one directory per image layer (named using its long ID), each containing these files: - * - * - `VERSION`: currently `1.0` - the file format version - * - `json`: detailed layer information, similar to `docker inspect layer_id` - * - `layer.tar`: A tarfile containing the filesystem changes in this layer + * An image tarball contains [Content as defined in the OCI Image Layout Specification](https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#content). * - * The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + * Additionally, includes the manifest.json file associated with a backwards compatible docker save format. * * If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. * @@ -1406,8 +1406,15 @@ public function imageGet(string $name, array $queryParameters = [], string $fetc * * @param array $queryParameters { * - * @var array $names Image names to filter by - * } + * @var array $names Image names to filter by + * @var string $platform JSON encoded OCI platform describing a platform which will be used + * to select a platform-specific image to be saved if the image is + * multi-platform. + * If not provided, the full multi-platform image will be saved. + * + * Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + * + * } * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @@ -2735,7 +2742,7 @@ public static function create($httpClient = null, array $additionalPlugins = [], if (null === $httpClient) { $httpClient = \Http\Discovery\Psr18ClientDiscovery::find(); $plugins = []; - $uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('/v1.48'); + $uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('/v1.51'); $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri); if (count($additionalPlugins) > 0) { $plugins = array_merge($plugins, $additionalPlugins); diff --git a/generated/Endpoint/ConfigDelete.php b/generated/Endpoint/ConfigDelete.php index 3449b64..98ba0f2 100644 --- a/generated/Endpoint/ConfigDelete.php +++ b/generated/Endpoint/ConfigDelete.php @@ -50,6 +50,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ConfigUpdate.php b/generated/Endpoint/ConfigUpdate.php index eac70d7..5c30318 100644 --- a/generated/Endpoint/ConfigUpdate.php +++ b/generated/Endpoint/ConfigUpdate.php @@ -86,6 +86,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ConfigUpdateBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerArchive.php b/generated/Endpoint/ContainerArchive.php index 655e97a..f2a216d 100644 --- a/generated/Endpoint/ContainerArchive.php +++ b/generated/Endpoint/ContainerArchive.php @@ -74,6 +74,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if (400 === $status) { } diff --git a/generated/Endpoint/ContainerArchiveInfo.php b/generated/Endpoint/ContainerArchiveInfo.php index a63a6d9..438d919 100644 --- a/generated/Endpoint/ContainerArchiveInfo.php +++ b/generated/Endpoint/ContainerArchiveInfo.php @@ -78,6 +78,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerArchiveInfoBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerAttach.php b/generated/Endpoint/ContainerAttach.php index 7fa18b2..c0fecea 100644 --- a/generated/Endpoint/ContainerAttach.php +++ b/generated/Endpoint/ContainerAttach.php @@ -186,8 +186,10 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (101 === $status) { + return null; } if (200 === $status) { + return null; } if (400 === $status) { } diff --git a/generated/Endpoint/ContainerAttachWebsocket.php b/generated/Endpoint/ContainerAttachWebsocket.php index 28b370c..fb0b11a 100644 --- a/generated/Endpoint/ContainerAttachWebsocket.php +++ b/generated/Endpoint/ContainerAttachWebsocket.php @@ -86,8 +86,10 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (101 === $status) { + return null; } if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerAttachWebsocketBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerCreate.php b/generated/Endpoint/ContainerCreate.php index 07908b2..98bf8c2 100644 --- a/generated/Endpoint/ContainerCreate.php +++ b/generated/Endpoint/ContainerCreate.php @@ -70,7 +70,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver $optionsResolver = parent::getQueryOptionsResolver(); $optionsResolver->setDefined(['name', 'platform']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults([]); + $optionsResolver->setDefaults(['platform' => '']); $optionsResolver->addAllowedTypes('name', ['string']); $optionsResolver->addAllowedTypes('platform', ['string']); diff --git a/generated/Endpoint/ContainerDelete.php b/generated/Endpoint/ContainerDelete.php index 6a32759..6ee2406 100644 --- a/generated/Endpoint/ContainerDelete.php +++ b/generated/Endpoint/ContainerDelete.php @@ -79,6 +79,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerDeleteBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerExport.php b/generated/Endpoint/ContainerExport.php index de71a98..aa9a85d 100644 --- a/generated/Endpoint/ContainerExport.php +++ b/generated/Endpoint/ContainerExport.php @@ -57,6 +57,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerExportNotFoundException($response); diff --git a/generated/Endpoint/ContainerKill.php b/generated/Endpoint/ContainerKill.php index fe4c198..dd8185b 100644 --- a/generated/Endpoint/ContainerKill.php +++ b/generated/Endpoint/ContainerKill.php @@ -78,6 +78,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerKillNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerPause.php b/generated/Endpoint/ContainerPause.php index e8b62a8..5864979 100644 --- a/generated/Endpoint/ContainerPause.php +++ b/generated/Endpoint/ContainerPause.php @@ -63,6 +63,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerPauseNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerRename.php b/generated/Endpoint/ContainerRename.php index ad032f7..617bf19 100644 --- a/generated/Endpoint/ContainerRename.php +++ b/generated/Endpoint/ContainerRename.php @@ -74,6 +74,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerRenameNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerResize.php b/generated/Endpoint/ContainerResize.php index 53c8e15..3292bcb 100644 --- a/generated/Endpoint/ContainerResize.php +++ b/generated/Endpoint/ContainerResize.php @@ -76,6 +76,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerResizeNotFoundException($response); diff --git a/generated/Endpoint/ContainerRestart.php b/generated/Endpoint/ContainerRestart.php index 8d14a0f..6c59e66 100644 --- a/generated/Endpoint/ContainerRestart.php +++ b/generated/Endpoint/ContainerRestart.php @@ -75,6 +75,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerRestartNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerStart.php b/generated/Endpoint/ContainerStart.php index 8022eca..710f063 100644 --- a/generated/Endpoint/ContainerStart.php +++ b/generated/Endpoint/ContainerStart.php @@ -76,8 +76,10 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if (304 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerStartNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerStop.php b/generated/Endpoint/ContainerStop.php index f18cfe5..eabe461 100644 --- a/generated/Endpoint/ContainerStop.php +++ b/generated/Endpoint/ContainerStop.php @@ -75,8 +75,10 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if (304 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerStopNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerUnpause.php b/generated/Endpoint/ContainerUnpause.php index 548099a..1d50a0c 100644 --- a/generated/Endpoint/ContainerUnpause.php +++ b/generated/Endpoint/ContainerUnpause.php @@ -58,6 +58,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ContainerUnpauseNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ExecResize.php b/generated/Endpoint/ExecResize.php index db14748..9e86879 100644 --- a/generated/Endpoint/ExecResize.php +++ b/generated/Endpoint/ExecResize.php @@ -79,6 +79,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ExecResizeBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ExecStart.php b/generated/Endpoint/ExecStart.php index a1c9678..61bae31 100644 --- a/generated/Endpoint/ExecStart.php +++ b/generated/Endpoint/ExecStart.php @@ -63,6 +63,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if (404 === $status) { } diff --git a/generated/Endpoint/ImageBuild.php b/generated/Endpoint/ImageBuild.php index 39f519a..f68ea3d 100644 --- a/generated/Endpoint/ImageBuild.php +++ b/generated/Endpoint/ImageBuild.php @@ -120,7 +120,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver $optionsResolver = parent::getQueryOptionsResolver(); $optionsResolver->setDefined(['dockerfile', 't', 'extrahosts', 'remote', 'q', 'nocache', 'cachefrom', 'pull', 'rm', 'forcerm', 'memory', 'memswap', 'cpushares', 'cpusetcpus', 'cpuperiod', 'cpuquota', 'buildargs', 'shmsize', 'squash', 'labels', 'networkmode', 'platform', 'target', 'outputs', 'version']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['dockerfile' => 'Dockerfile', 'q' => false, 'nocache' => false, 'rm' => true, 'forcerm' => false, 'version' => '1']); + $optionsResolver->setDefaults(['dockerfile' => 'Dockerfile', 'q' => false, 'nocache' => false, 'rm' => true, 'forcerm' => false, 'platform' => '', 'target' => '', 'outputs' => '', 'version' => '1']); $optionsResolver->addAllowedTypes('dockerfile', ['string']); $optionsResolver->addAllowedTypes('t', ['string']); $optionsResolver->addAllowedTypes('extrahosts', ['string']); @@ -175,6 +175,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ImageBuildBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageCreate.php b/generated/Endpoint/ImageCreate.php index c33e8c8..1f9690e 100644 --- a/generated/Endpoint/ImageCreate.php +++ b/generated/Endpoint/ImageCreate.php @@ -97,7 +97,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver $optionsResolver = parent::getQueryOptionsResolver(); $optionsResolver->setDefined(['fromImage', 'fromSrc', 'repo', 'tag', 'message', 'changes', 'platform']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults([]); + $optionsResolver->setDefaults(['platform' => '']); $optionsResolver->addAllowedTypes('fromImage', ['string']); $optionsResolver->addAllowedTypes('fromSrc', ['string']); $optionsResolver->addAllowedTypes('repo', ['string']); @@ -133,6 +133,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ImageCreateNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageDelete.php b/generated/Endpoint/ImageDelete.php index dd3054d..cb5611d 100644 --- a/generated/Endpoint/ImageDelete.php +++ b/generated/Endpoint/ImageDelete.php @@ -18,9 +18,13 @@ class ImageDelete extends \WebProject\DockerApi\Library\Generated\Runtime\Client * @param string $name Image name or ID * @param array $queryParameters { * - * @var bool $force Remove the image even if it is being used by stopped containers or has other tags - * @var bool $noprune Do not delete untagged parent images - * } + * @var bool $force Remove the image even if it is being used by stopped containers or has other tags + * @var bool $noprune Do not delete untagged parent images + * @var array $platforms Select platform-specific content to delete. + * Multiple values are accepted. + * Each platform is a OCI platform encoded as a JSON string. + * + * } */ public function __construct(string $name, array $queryParameters = []) { @@ -51,11 +55,12 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['force', 'noprune']); + $optionsResolver->setDefined(['force', 'noprune', 'platforms']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults(['force' => false, 'noprune' => false]); $optionsResolver->addAllowedTypes('force', ['bool']); $optionsResolver->addAllowedTypes('noprune', ['bool']); + $optionsResolver->addAllowedTypes('platforms', ['array']); return $optionsResolver; } diff --git a/generated/Endpoint/ImageGet.php b/generated/Endpoint/ImageGet.php index 75430d6..10b4933 100644 --- a/generated/Endpoint/ImageGet.php +++ b/generated/Endpoint/ImageGet.php @@ -15,13 +15,9 @@ class ImageGet extends \WebProject\DockerApi\Library\Generated\Runtime\Client\Ba * * ### Image tarball format * - * An image tarball contains one directory per image layer (named using its long ID), each containing these files: + * An image tarball contains [Content as defined in the OCI Image Layout Specification](https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#content). * - * - `VERSION`: currently `1.0` - the file format version - * - `json`: detailed layer information, similar to `docker inspect layer_id` - * - `layer.tar`: A tarfile containing the filesystem changes in this layer - * - * The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + * Additionally, includes the manifest.json file associated with a backwards compatible docker save format. * * If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. * diff --git a/generated/Endpoint/ImageGetAll.php b/generated/Endpoint/ImageGetAll.php index aed16e9..844a5c1 100644 --- a/generated/Endpoint/ImageGetAll.php +++ b/generated/Endpoint/ImageGetAll.php @@ -21,8 +21,15 @@ class ImageGetAll extends \WebProject\DockerApi\Library\Generated\Runtime\Client * * @param array $queryParameters { * - * @var array $names Image names to filter by - * } + * @var array $names Image names to filter by + * @var string $platform JSON encoded OCI platform describing a platform which will be used + * to select a platform-specific image to be saved if the image is + * multi-platform. + * If not provided, the full multi-platform image will be saved. + * + * Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + * + * } */ public function __construct(array $queryParameters = []) { @@ -52,10 +59,11 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['names']); + $optionsResolver->setDefined(['names', 'platform']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults([]); $optionsResolver->addAllowedTypes('names', ['array']); + $optionsResolver->addAllowedTypes('platform', ['string']); return $optionsResolver; } diff --git a/generated/Endpoint/ImageLoad.php b/generated/Endpoint/ImageLoad.php index b8f3c31..c5c79d6 100644 --- a/generated/Endpoint/ImageLoad.php +++ b/generated/Endpoint/ImageLoad.php @@ -82,6 +82,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ImageLoadInternalServerErrorException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImagePush.php b/generated/Endpoint/ImagePush.php index 04bd7c8..3f9b0c4 100644 --- a/generated/Endpoint/ImagePush.php +++ b/generated/Endpoint/ImagePush.php @@ -122,6 +122,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ImagePushNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageTag.php b/generated/Endpoint/ImageTag.php index b91cdee..256a0c5 100644 --- a/generated/Endpoint/ImageTag.php +++ b/generated/Endpoint/ImageTag.php @@ -79,6 +79,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (201 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ImageTagBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NetworkConnect.php b/generated/Endpoint/NetworkConnect.php index 5eaabcb..a291b1b 100644 --- a/generated/Endpoint/NetworkConnect.php +++ b/generated/Endpoint/NetworkConnect.php @@ -66,6 +66,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\NetworkConnectBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NetworkDelete.php b/generated/Endpoint/NetworkDelete.php index 8255480..3d628ad 100644 --- a/generated/Endpoint/NetworkDelete.php +++ b/generated/Endpoint/NetworkDelete.php @@ -57,6 +57,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\NetworkDeleteForbiddenException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NetworkDisconnect.php b/generated/Endpoint/NetworkDisconnect.php index e4ddc56..33af66a 100644 --- a/generated/Endpoint/NetworkDisconnect.php +++ b/generated/Endpoint/NetworkDisconnect.php @@ -63,6 +63,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (403 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\NetworkDisconnectForbiddenException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NodeDelete.php b/generated/Endpoint/NodeDelete.php index 7e329f6..e8662e5 100644 --- a/generated/Endpoint/NodeDelete.php +++ b/generated/Endpoint/NodeDelete.php @@ -74,6 +74,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\NodeDeleteNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NodeUpdate.php b/generated/Endpoint/NodeUpdate.php index 634e06b..0973919 100644 --- a/generated/Endpoint/NodeUpdate.php +++ b/generated/Endpoint/NodeUpdate.php @@ -86,6 +86,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\NodeUpdateBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginCreate.php b/generated/Endpoint/PluginCreate.php index f22a22c..d4f6ac0 100644 --- a/generated/Endpoint/PluginCreate.php +++ b/generated/Endpoint/PluginCreate.php @@ -80,6 +80,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginCreateInternalServerErrorException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginDisable.php b/generated/Endpoint/PluginDisable.php index 58a222a..0145d5b 100644 --- a/generated/Endpoint/PluginDisable.php +++ b/generated/Endpoint/PluginDisable.php @@ -75,6 +75,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginDisableNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginEnable.php b/generated/Endpoint/PluginEnable.php index a065231..ed8779f 100644 --- a/generated/Endpoint/PluginEnable.php +++ b/generated/Endpoint/PluginEnable.php @@ -74,6 +74,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginEnableNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginPull.php b/generated/Endpoint/PluginPull.php index 0e367ef..59effad 100644 --- a/generated/Endpoint/PluginPull.php +++ b/generated/Endpoint/PluginPull.php @@ -104,6 +104,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginPullInternalServerErrorException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginPush.php b/generated/Endpoint/PluginPush.php index dbc7c59..90647dd 100644 --- a/generated/Endpoint/PluginPush.php +++ b/generated/Endpoint/PluginPush.php @@ -59,6 +59,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginPushNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginSet.php b/generated/Endpoint/PluginSet.php index 0251189..c02d351 100644 --- a/generated/Endpoint/PluginSet.php +++ b/generated/Endpoint/PluginSet.php @@ -65,6 +65,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginSetNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PluginUpgrade.php b/generated/Endpoint/PluginUpgrade.php index 6b71ce0..be63be9 100644 --- a/generated/Endpoint/PluginUpgrade.php +++ b/generated/Endpoint/PluginUpgrade.php @@ -110,6 +110,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PluginUpgradeNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/PutContainerArchive.php b/generated/Endpoint/PutContainerArchive.php index c3d077a..cab7326 100644 --- a/generated/Endpoint/PutContainerArchive.php +++ b/generated/Endpoint/PutContainerArchive.php @@ -99,6 +99,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\PutContainerArchiveBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SecretDelete.php b/generated/Endpoint/SecretDelete.php index 2c929b1..118654b 100644 --- a/generated/Endpoint/SecretDelete.php +++ b/generated/Endpoint/SecretDelete.php @@ -50,6 +50,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SecretDeleteNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SecretUpdate.php b/generated/Endpoint/SecretUpdate.php index 4b22349..8e7f87b 100644 --- a/generated/Endpoint/SecretUpdate.php +++ b/generated/Endpoint/SecretUpdate.php @@ -86,6 +86,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SecretUpdateBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ServiceDelete.php b/generated/Endpoint/ServiceDelete.php index 4df7a5a..0f40c76 100644 --- a/generated/Endpoint/ServiceDelete.php +++ b/generated/Endpoint/ServiceDelete.php @@ -57,6 +57,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\ServiceDeleteNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/Session.php b/generated/Endpoint/Session.php index 4700d3a..fe3c450 100644 --- a/generated/Endpoint/Session.php +++ b/generated/Endpoint/Session.php @@ -37,6 +37,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (101 === $status) { + return null; } if (400 === $status) { } diff --git a/generated/Endpoint/SwarmJoin.php b/generated/Endpoint/SwarmJoin.php index a6ccfaf..37142fa 100644 --- a/generated/Endpoint/SwarmJoin.php +++ b/generated/Endpoint/SwarmJoin.php @@ -63,6 +63,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SwarmJoinBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SwarmLeave.php b/generated/Endpoint/SwarmLeave.php index f3726f6..1829a66 100644 --- a/generated/Endpoint/SwarmLeave.php +++ b/generated/Endpoint/SwarmLeave.php @@ -72,6 +72,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SwarmLeaveInternalServerErrorException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SwarmUnlock.php b/generated/Endpoint/SwarmUnlock.php index 33d66fd..74bec1d 100644 --- a/generated/Endpoint/SwarmUnlock.php +++ b/generated/Endpoint/SwarmUnlock.php @@ -52,6 +52,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SwarmUnlockInternalServerErrorException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SwarmUpdate.php b/generated/Endpoint/SwarmUpdate.php index 70ed18e..2d51215 100644 --- a/generated/Endpoint/SwarmUpdate.php +++ b/generated/Endpoint/SwarmUpdate.php @@ -87,6 +87,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SwarmUpdateBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SystemAuth.php b/generated/Endpoint/SystemAuth.php index 1fff7a5..960347e 100644 --- a/generated/Endpoint/SystemAuth.php +++ b/generated/Endpoint/SystemAuth.php @@ -58,6 +58,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return $serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\AuthPostResponse200', 'json'); } if (204 === $status) { + return null; } if ((null === $contentType) === false && (401 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\SystemAuthUnauthorizedException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/VolumeDelete.php b/generated/Endpoint/VolumeDelete.php index 22eb8dd..a0ed63c 100644 --- a/generated/Endpoint/VolumeDelete.php +++ b/generated/Endpoint/VolumeDelete.php @@ -76,6 +76,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (204 === $status) { + return null; } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\VolumeDeleteNotFoundException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/VolumeUpdate.php b/generated/Endpoint/VolumeUpdate.php index 158e72a..f0827f3 100644 --- a/generated/Endpoint/VolumeUpdate.php +++ b/generated/Endpoint/VolumeUpdate.php @@ -76,6 +76,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { + return null; } if ((null === $contentType) === false && (400 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \WebProject\DockerApi\Library\Generated\Exception\VolumeUpdateBadRequestException($serializer->deserialize($body, 'WebProject\DockerApi\Library\Generated\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Model/AuthConfig.php b/generated/Model/AuthConfig.php index b168053..7806b5d 100644 --- a/generated/Model/AuthConfig.php +++ b/generated/Model/AuthConfig.php @@ -26,6 +26,10 @@ public function isInitialized($property): bool */ protected $password; /** + * Email is an optional value associated with the username. + * + * > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. + * * @var string */ protected $email; @@ -77,6 +81,10 @@ public function setPassword(string $password): self } /** + * Email is an optional value associated with the username. + * + * > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. + * * @return string */ public function getEmail(): string @@ -85,6 +93,10 @@ public function getEmail(): string } /** + * Email is an optional value associated with the username. + * + * > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. + * * @param string $email * * @return self diff --git a/generated/Model/ClusterInfo.php b/generated/Model/ClusterInfo.php index c40ee24..be49db0 100644 --- a/generated/Model/ClusterInfo.php +++ b/generated/Model/ClusterInfo.php @@ -78,7 +78,7 @@ public function isInitialized($property): bool * * @var int */ - protected $dataPathPort; + protected $dataPathPort = 4789; /** * Default Address Pool specifies default subnet pools for global scope * networks. @@ -92,7 +92,7 @@ public function isInitialized($property): bool * * @var int */ - protected $subnetSize; + protected $subnetSize = 24; /** * The ID of the swarm. diff --git a/generated/Model/ClusterVolumeSpecAccessMode.php b/generated/Model/ClusterVolumeSpecAccessMode.php index 00f1d1e..7bd6ae7 100644 --- a/generated/Model/ClusterVolumeSpecAccessMode.php +++ b/generated/Model/ClusterVolumeSpecAccessMode.php @@ -59,7 +59,7 @@ public function isInitialized($property): bool * Options for using this volume as a Block-type volume. * Intentionally empty. * - * @var ClusterVolumeSpecAccessModeMountVolume + * @var array */ protected $mountVolume; /** @@ -181,9 +181,9 @@ public function setSharing(string $sharing): self * Options for using this volume as a Block-type volume. * Intentionally empty. * - * @return ClusterVolumeSpecAccessModeMountVolume + * @return array */ - public function getMountVolume(): ClusterVolumeSpecAccessModeMountVolume + public function getMountVolume(): iterable { return $this->mountVolume; } @@ -211,11 +211,11 @@ public function getMountVolume(): ClusterVolumeSpecAccessModeMountVolume * Options for using this volume as a Block-type volume. * Intentionally empty. * - * @param ClusterVolumeSpecAccessModeMountVolume $mountVolume + * @param array $mountVolume * * @return self */ - public function setMountVolume(ClusterVolumeSpecAccessModeMountVolume $mountVolume): self + public function setMountVolume(iterable $mountVolume): self { $this->initialized['mountVolume'] = true; $this->mountVolume = $mountVolume; diff --git a/generated/Model/ClusterVolumeSpecAccessModeMountVolume.php b/generated/Model/ClusterVolumeSpecAccessModeMountVolume.php deleted file mode 100644 index b8ae786..0000000 --- a/generated/Model/ClusterVolumeSpecAccessModeMountVolume.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/Commit.php b/generated/Model/Commit.php index 8e00309..9645e72 100644 --- a/generated/Model/Commit.php +++ b/generated/Model/Commit.php @@ -23,13 +23,6 @@ public function isInitialized($property): bool * @var string */ protected $iD; - /** - * Commit ID of external tool expected by dockerd as set at build time. - **Deprecated**: This field is deprecated and will be omitted in a API v1.49. - * - * @var string - */ - protected $expected; /** * Actual commit ID of external tool. @@ -55,31 +48,4 @@ public function setID(string $iD): self return $this; } - - /** - * Commit ID of external tool expected by dockerd as set at build time. - **Deprecated**: This field is deprecated and will be omitted in a API v1.49. - * - * @return string - */ - public function getExpected(): string - { - return $this->expected; - } - - /** - * Commit ID of external tool expected by dockerd as set at build time. - **Deprecated**: This field is deprecated and will be omitted in a API v1.49. - * - * @param string $expected - * - * @return self - */ - public function setExpected(string $expected): self - { - $this->initialized['expected'] = true; - $this->expected = $expected; - - return $this; - } } diff --git a/generated/Model/ConfigSpec.php b/generated/Model/ConfigSpec.php index cb7eeb6..f9f6f08 100644 --- a/generated/Model/ConfigSpec.php +++ b/generated/Model/ConfigSpec.php @@ -30,8 +30,9 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @var string */ @@ -94,8 +95,9 @@ public function setLabels(iterable $labels): self } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @return string */ @@ -105,8 +107,9 @@ public function getData(): string } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @param string $data * diff --git a/generated/Model/ConfigsCreatePostBody.php b/generated/Model/ConfigsCreatePostBody.php index 54d2127..9ae1957 100644 --- a/generated/Model/ConfigsCreatePostBody.php +++ b/generated/Model/ConfigsCreatePostBody.php @@ -30,8 +30,9 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @var string */ @@ -94,8 +95,9 @@ public function setLabels(iterable $labels): self } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @return string */ @@ -105,8 +107,9 @@ public function getData(): string } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. + * Data is the data to store as a config, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). * * @param string $data * diff --git a/generated/Model/ContainerConfig.php b/generated/Model/ContainerConfig.php index 29821a1..91f6818 100644 --- a/generated/Model/ContainerConfig.php +++ b/generated/Model/ContainerConfig.php @@ -62,7 +62,7 @@ public function isInitialized($property): bool * * `{"/": {}}` * - * @var array|null + * @var array>|null */ protected $exposedPorts; /** @@ -88,7 +88,7 @@ public function isInitialized($property): bool * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @var list|null + * @var list */ protected $env; /** @@ -120,7 +120,7 @@ public function isInitialized($property): bool * An object mapping mount point paths inside the container to empty * objects. * - * @var array|null + * @var array>|null */ protected $volumes; /** @@ -176,7 +176,7 @@ public function isInitialized($property): bool * * @var int|null */ - protected $stopTimeout; + protected $stopTimeout = 10; /** * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. * @@ -347,7 +347,7 @@ public function setAttachStderr(bool $attachStderr): self * * `{"/": {}}` * - * @return array|null + * @return array>|null */ public function getExposedPorts(): ?iterable { @@ -359,7 +359,7 @@ public function getExposedPorts(): ?iterable * * `{"/": {}}` * - * @param array|null $exposedPorts + * @param array>|null $exposedPorts * * @return self */ @@ -451,9 +451,9 @@ public function setStdinOnce(bool $stdinOnce): self * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @return list|null + * @return list */ - public function getEnv(): ?array + public function getEnv(): array { return $this->env; } @@ -463,11 +463,11 @@ public function getEnv(): ?array * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @param list|null $env + * @param list $env * * @return self */ - public function setEnv(?array $env): self + public function setEnv(array $env): self { $this->initialized['env'] = true; $this->env = $env; @@ -581,7 +581,7 @@ public function setImage(string $image): self * An object mapping mount point paths inside the container to empty * objects. * - * @return array|null + * @return array>|null */ public function getVolumes(): ?iterable { @@ -592,7 +592,7 @@ public function getVolumes(): ?iterable * An object mapping mount point paths inside the container to empty * objects. * - * @param array|null $volumes + * @param array>|null $volumes * * @return self */ diff --git a/generated/Model/ContainerConfigExposedPortsItem.php b/generated/Model/ContainerConfigExposedPortsItem.php deleted file mode 100644 index 2aeec08..0000000 --- a/generated/Model/ContainerConfigExposedPortsItem.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ContainerConfigVolumesItem.php b/generated/Model/ContainerConfigVolumesItem.php deleted file mode 100644 index 63c05a8..0000000 --- a/generated/Model/ContainerConfigVolumesItem.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ContainerInspectResponse.php b/generated/Model/ContainerInspectResponse.php index 0397c89..486cd71 100644 --- a/generated/Model/ContainerInspectResponse.php +++ b/generated/Model/ContainerInspectResponse.php @@ -161,7 +161,7 @@ public function isInitialized($property): bool /** * Container configuration that depends on the host we are running on. * - * @var HostConfig + * @var HostConfig|null */ protected $hostConfig; /** @@ -741,9 +741,9 @@ public function setExecIDs(?array $execIDs): self /** * Container configuration that depends on the host we are running on. * - * @return HostConfig + * @return HostConfig|null */ - public function getHostConfig(): HostConfig + public function getHostConfig(): ?HostConfig { return $this->hostConfig; } @@ -751,11 +751,11 @@ public function getHostConfig(): HostConfig /** * Container configuration that depends on the host we are running on. * - * @param HostConfig $hostConfig + * @param HostConfig|null $hostConfig * * @return self */ - public function setHostConfig(HostConfig $hostConfig): self + public function setHostConfig(?HostConfig $hostConfig): self { $this->initialized['hostConfig'] = true; $this->hostConfig = $hostConfig; diff --git a/generated/Model/ContainerStatsResponse.php b/generated/Model/ContainerStatsResponse.php index 27a4a5c..48240d1 100644 --- a/generated/Model/ContainerStatsResponse.php +++ b/generated/Model/ContainerStatsResponse.php @@ -110,7 +110,7 @@ public function isInitialized($property): bool * * This field is omitted if the container has no networking enabled. * - * @var array|null + * @var mixed|null */ protected $networks; @@ -436,9 +436,9 @@ public function setMemoryStats(ContainerMemoryStats $memoryStats): self * * This field is omitted if the container has no networking enabled. * - * @return array|null + * @return mixed */ - public function getNetworks(): ?iterable + public function getNetworks() { return $this->networks; } @@ -448,11 +448,11 @@ public function getNetworks(): ?iterable * * This field is omitted if the container has no networking enabled. * - * @param array|null $networks + * @param mixed $networks * * @return self */ - public function setNetworks(?iterable $networks): self + public function setNetworks($networks): self { $this->initialized['networks'] = true; $this->networks = $networks; diff --git a/generated/Model/ContainerSummary.php b/generated/Model/ContainerSummary.php index 68d65fc..8265d34 100644 --- a/generated/Model/ContainerSummary.php +++ b/generated/Model/ContainerSummary.php @@ -78,7 +78,7 @@ public function isInitialized($property): bool /** * Port-mappings for the container. * - * @var list|null + * @var list */ protected $ports; /** @@ -349,9 +349,9 @@ public function setCreated(int $created): self /** * Port-mappings for the container. * - * @return list|null + * @return list */ - public function getPorts(): ?array + public function getPorts(): array { return $this->ports; } @@ -359,11 +359,11 @@ public function getPorts(): ?array /** * Port-mappings for the container. * - * @param list|null $ports + * @param list $ports * * @return self */ - public function setPorts(?array $ports): self + public function setPorts(array $ports): self { $this->initialized['ports'] = true; $this->ports = $ports; diff --git a/generated/Model/ContainersCreatePostBody.php b/generated/Model/ContainersCreatePostBody.php index c0384f2..d6e4df0 100644 --- a/generated/Model/ContainersCreatePostBody.php +++ b/generated/Model/ContainersCreatePostBody.php @@ -62,7 +62,7 @@ public function isInitialized($property): bool * * `{"/": {}}` * - * @var array|null + * @var array>|null */ protected $exposedPorts; /** @@ -88,7 +88,7 @@ public function isInitialized($property): bool * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @var list|null + * @var list */ protected $env; /** @@ -120,7 +120,7 @@ public function isInitialized($property): bool * An object mapping mount point paths inside the container to empty * objects. * - * @var array|null + * @var array>|null */ protected $volumes; /** @@ -176,7 +176,7 @@ public function isInitialized($property): bool * * @var int|null */ - protected $stopTimeout; + protected $stopTimeout = 10; /** * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. * @@ -186,7 +186,7 @@ public function isInitialized($property): bool /** * Container configuration that depends on the host we are running on. * - * @var HostConfig + * @var HostConfig|null */ protected $hostConfig; /** @@ -362,7 +362,7 @@ public function setAttachStderr(bool $attachStderr): self * * `{"/": {}}` * - * @return array|null + * @return array>|null */ public function getExposedPorts(): ?iterable { @@ -374,7 +374,7 @@ public function getExposedPorts(): ?iterable * * `{"/": {}}` * - * @param array|null $exposedPorts + * @param array>|null $exposedPorts * * @return self */ @@ -466,9 +466,9 @@ public function setStdinOnce(bool $stdinOnce): self * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @return list|null + * @return list */ - public function getEnv(): ?array + public function getEnv(): array { return $this->env; } @@ -478,11 +478,11 @@ public function getEnv(): ?array * form `["VAR=value", ...]`. A variable without `=` is removed from the * environment, rather than to have an empty value. * - * @param list|null $env + * @param list $env * * @return self */ - public function setEnv(?array $env): self + public function setEnv(array $env): self { $this->initialized['env'] = true; $this->env = $env; @@ -596,7 +596,7 @@ public function setImage(string $image): self * An object mapping mount point paths inside the container to empty * objects. * - * @return array|null + * @return array>|null */ public function getVolumes(): ?iterable { @@ -607,7 +607,7 @@ public function getVolumes(): ?iterable * An object mapping mount point paths inside the container to empty * objects. * - * @param array|null $volumes + * @param array>|null $volumes * * @return self */ @@ -859,9 +859,9 @@ public function setShell(?array $shell): self /** * Container configuration that depends on the host we are running on. * - * @return HostConfig + * @return HostConfig|null */ - public function getHostConfig(): HostConfig + public function getHostConfig(): ?HostConfig { return $this->hostConfig; } @@ -869,11 +869,11 @@ public function getHostConfig(): HostConfig /** * Container configuration that depends on the host we are running on. * - * @param HostConfig $hostConfig + * @param HostConfig|null $hostConfig * * @return self */ - public function setHostConfig(HostConfig $hostConfig): self + public function setHostConfig(?HostConfig $hostConfig): self { $this->initialized['hostConfig'] = true; $this->hostConfig = $hostConfig; diff --git a/generated/Model/ContainersIdUpdatePostBody.php b/generated/Model/ContainersIdUpdatePostBody.php index ab46908..9c82d98 100644 --- a/generated/Model/ContainersIdUpdatePostBody.php +++ b/generated/Model/ContainersIdUpdatePostBody.php @@ -104,27 +104,27 @@ public function isInitialized($property): bool /** * Microseconds of CPU time that the container can get in a CPU period. * - * @var int|null + * @var int */ protected $cpuQuota; /** * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimePeriod; /** * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimeRuntime; /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @var string|null + * @var string */ protected $cpusetCpus; /** @@ -159,6 +159,9 @@ public function isInitialized($property): bool * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @var int */ protected $kernelMemoryTCP; @@ -185,7 +188,7 @@ public function isInitialized($property): bool /** * CPU quota in units of 10-9 CPUs. * - * @var int + * @var int|null */ protected $nanoCpus; /** @@ -226,7 +229,7 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuCount; /** @@ -236,20 +239,20 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuPercent; /** * Maximum IOps for the container system drive (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumIOps; /** * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumBandwidth; /** @@ -564,9 +567,9 @@ public function setCpuPeriod(int $cpuPeriod): self /** * Microseconds of CPU time that the container can get in a CPU period. * - * @return int|null + * @return int */ - public function getCpuQuota(): ?int + public function getCpuQuota(): int { return $this->cpuQuota; } @@ -574,11 +577,11 @@ public function getCpuQuota(): ?int /** * Microseconds of CPU time that the container can get in a CPU period. * - * @param int|null $cpuQuota + * @param int $cpuQuota * * @return self */ - public function setCpuQuota(?int $cpuQuota): self + public function setCpuQuota(int $cpuQuota): self { $this->initialized['cpuQuota'] = true; $this->cpuQuota = $cpuQuota; @@ -590,9 +593,9 @@ public function setCpuQuota(?int $cpuQuota): self * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimePeriod(): ?int + public function getCpuRealtimePeriod(): int { return $this->cpuRealtimePeriod; } @@ -601,11 +604,11 @@ public function getCpuRealtimePeriod(): ?int * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimePeriod + * @param int $cpuRealtimePeriod * * @return self */ - public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + public function setCpuRealtimePeriod(int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; $this->cpuRealtimePeriod = $cpuRealtimePeriod; @@ -617,9 +620,9 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimeRuntime(): ?int + public function getCpuRealtimeRuntime(): int { return $this->cpuRealtimeRuntime; } @@ -628,11 +631,11 @@ public function getCpuRealtimeRuntime(): ?int * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimeRuntime + * @param int $cpuRealtimeRuntime * * @return self */ - public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + public function setCpuRealtimeRuntime(int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; @@ -643,9 +646,9 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @return string|null + * @return string */ - public function getCpusetCpus(): ?string + public function getCpusetCpus(): string { return $this->cpusetCpus; } @@ -653,11 +656,11 @@ public function getCpusetCpus(): ?string /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @param string|null $cpusetCpus + * @param string $cpusetCpus * * @return self */ - public function setCpusetCpus(?string $cpusetCpus): self + public function setCpusetCpus(string $cpusetCpus): self { $this->initialized['cpusetCpus'] = true; $this->cpusetCpus = $cpusetCpus; @@ -774,6 +777,9 @@ public function setDeviceRequests(?array $deviceRequests): self * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @return int */ public function getKernelMemoryTCP(): int @@ -788,6 +794,9 @@ public function getKernelMemoryTCP(): int * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @param int $kernelMemoryTCP * * @return self @@ -882,9 +891,9 @@ public function setMemorySwappiness(?int $memorySwappiness): self /** * CPU quota in units of 10-9 CPUs. * - * @return int + * @return int|null */ - public function getNanoCpus(): int + public function getNanoCpus(): ?int { return $this->nanoCpus; } @@ -892,11 +901,11 @@ public function getNanoCpus(): int /** * CPU quota in units of 10-9 CPUs. * - * @param int $nanoCpus + * @param int|null $nanoCpus * * @return self */ - public function setNanoCpus(int $nanoCpus): self + public function setNanoCpus(?int $nanoCpus): self { $this->initialized['nanoCpus'] = true; $this->nanoCpus = $nanoCpus; @@ -1025,9 +1034,9 @@ public function setUlimits(?array $ulimits): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuCount(): int + public function getCpuCount(): ?int { return $this->cpuCount; } @@ -1039,11 +1048,11 @@ public function getCpuCount(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuCount + * @param int|null $cpuCount * * @return self */ - public function setCpuCount(int $cpuCount): self + public function setCpuCount(?int $cpuCount): self { $this->initialized['cpuCount'] = true; $this->cpuCount = $cpuCount; @@ -1058,9 +1067,9 @@ public function setCpuCount(int $cpuCount): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuPercent(): int + public function getCpuPercent(): ?int { return $this->cpuPercent; } @@ -1072,11 +1081,11 @@ public function getCpuPercent(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuPercent + * @param int|null $cpuPercent * * @return self */ - public function setCpuPercent(int $cpuPercent): self + public function setCpuPercent(?int $cpuPercent): self { $this->initialized['cpuPercent'] = true; $this->cpuPercent = $cpuPercent; @@ -1087,9 +1096,9 @@ public function setCpuPercent(int $cpuPercent): self /** * Maximum IOps for the container system drive (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumIOps(): int + public function getIOMaximumIOps(): ?int { return $this->iOMaximumIOps; } @@ -1097,11 +1106,11 @@ public function getIOMaximumIOps(): int /** * Maximum IOps for the container system drive (Windows only). * - * @param int $iOMaximumIOps + * @param int|null $iOMaximumIOps * * @return self */ - public function setIOMaximumIOps(int $iOMaximumIOps): self + public function setIOMaximumIOps(?int $iOMaximumIOps): self { $this->initialized['iOMaximumIOps'] = true; $this->iOMaximumIOps = $iOMaximumIOps; @@ -1113,9 +1122,9 @@ public function setIOMaximumIOps(int $iOMaximumIOps): self * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumBandwidth(): int + public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } @@ -1124,11 +1133,11 @@ public function getIOMaximumBandwidth(): int * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @param int $iOMaximumBandwidth + * @param int|null $iOMaximumBandwidth * * @return self */ - public function setIOMaximumBandwidth(int $iOMaximumBandwidth): self + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; $this->iOMaximumBandwidth = $iOMaximumBandwidth; diff --git a/generated/Model/DeviceInfo.php b/generated/Model/DeviceInfo.php new file mode 100644 index 0000000..7f7fc9f --- /dev/null +++ b/generated/Model/DeviceInfo.php @@ -0,0 +1,85 @@ +initialized); + } + /** + * The origin device driver. + * + * @var string + */ + protected $source; + /** + * The unique identifier for the device within its source driver. + * For CDI devices, this would be an FQDN like "vendor.com/gpu=0". + * + * @var string + */ + protected $iD; + + /** + * The origin device driver. + * + * @return string + */ + public function getSource(): string + { + return $this->source; + } + + /** + * The origin device driver. + * + * @param string $source + * + * @return self + */ + public function setSource(string $source): self + { + $this->initialized['source'] = true; + $this->source = $source; + + return $this; + } + + /** + * The unique identifier for the device within its source driver. + * For CDI devices, this would be an FQDN like "vendor.com/gpu=0". + * + * @return string + */ + public function getID(): string + { + return $this->iD; + } + + /** + * The unique identifier for the device within its source driver. + * For CDI devices, this would be an FQDN like "vendor.com/gpu=0". + * + * @param string $iD + * + * @return self + */ + public function setID(string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + + return $this; + } +} diff --git a/generated/Model/EndpointIPAMConfig.php b/generated/Model/EndpointIPAMConfig.php index a3c8689..c14ffec 100644 --- a/generated/Model/EndpointIPAMConfig.php +++ b/generated/Model/EndpointIPAMConfig.php @@ -18,11 +18,11 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var string + * @var string|null */ protected $iPv4Address; /** - * @var string + * @var string|null */ protected $iPv6Address; /** @@ -31,19 +31,19 @@ public function isInitialized($property): bool protected $linkLocalIPs; /** - * @return string + * @return string|null */ - public function getIPv4Address(): string + public function getIPv4Address(): ?string { return $this->iPv4Address; } /** - * @param string $iPv4Address + * @param string|null $iPv4Address * * @return self */ - public function setIPv4Address(string $iPv4Address): self + public function setIPv4Address(?string $iPv4Address): self { $this->initialized['iPv4Address'] = true; $this->iPv4Address = $iPv4Address; @@ -52,19 +52,19 @@ public function setIPv4Address(string $iPv4Address): self } /** - * @return string + * @return string|null */ - public function getIPv6Address(): string + public function getIPv6Address(): ?string { return $this->iPv6Address; } /** - * @param string $iPv6Address + * @param string|null $iPv6Address * * @return self */ - public function setIPv6Address(string $iPv6Address): self + public function setIPv6Address(?string $iPv6Address): self { $this->initialized['iPv6Address'] = true; $this->iPv6Address = $iPv6Address; diff --git a/generated/Model/EndpointSettings.php b/generated/Model/EndpointSettings.php index 49c25e8..4b4994d 100644 --- a/generated/Model/EndpointSettings.php +++ b/generated/Model/EndpointSettings.php @@ -51,7 +51,7 @@ public function isInitialized($property): bool * lexicographically sorted based on their network name, and the one * that sorts first is picked. * - * @var float + * @var int */ protected $gwPriority; /** @@ -243,9 +243,9 @@ public function setDriverOpts(?iterable $driverOpts): self * lexicographically sorted based on their network name, and the one * that sorts first is picked. * - * @return float + * @return int */ - public function getGwPriority(): float + public function getGwPriority(): int { return $this->gwPriority; } @@ -257,11 +257,11 @@ public function getGwPriority(): float * lexicographically sorted based on their network name, and the one * that sorts first is picked. * - * @param float $gwPriority + * @param int $gwPriority * * @return self */ - public function setGwPriority(float $gwPriority): self + public function setGwPriority(int $gwPriority): self { $this->initialized['gwPriority'] = true; $this->gwPriority = $gwPriority; diff --git a/generated/Model/EndpointSpec.php b/generated/Model/EndpointSpec.php index 3d23345..13438d6 100644 --- a/generated/Model/EndpointSpec.php +++ b/generated/Model/EndpointSpec.php @@ -27,7 +27,7 @@ public function isInitialized($property): bool * List of exposed ports that this service is accessible on from the * outside. Ports can only be provided if `vip` resolution mode is used. * - * @var list|null + * @var list */ protected $ports; @@ -60,9 +60,9 @@ public function setMode(string $mode): self * List of exposed ports that this service is accessible on from the * outside. Ports can only be provided if `vip` resolution mode is used. * - * @return list|null + * @return list */ - public function getPorts(): ?array + public function getPorts(): array { return $this->ports; } @@ -71,11 +71,11 @@ public function getPorts(): ?array * List of exposed ports that this service is accessible on from the * outside. Ports can only be provided if `vip` resolution mode is used. * - * @param list|null $ports + * @param list $ports * * @return self */ - public function setPorts(?array $ports): self + public function setPorts(array $ports): self { $this->initialized['ports'] = true; $this->ports = $ports; diff --git a/generated/Model/FirewallInfo.php b/generated/Model/FirewallInfo.php new file mode 100644 index 0000000..8e1a3e9 --- /dev/null +++ b/generated/Model/FirewallInfo.php @@ -0,0 +1,103 @@ +initialized); + } + /** + * The name of the firewall backend driver. + * + * @var string + */ + protected $driver; + /** + * Information about the firewall backend, provided as + * "label" / "value" pairs. + * + *


+ * + * > **Note**: The information returned in this field, including the + * > formatting of values and labels, should not be considered stable, + * > and may change without notice. + * + * @var list> + */ + protected $info; + + /** + * The name of the firewall backend driver. + * + * @return string + */ + public function getDriver(): string + { + return $this->driver; + } + + /** + * The name of the firewall backend driver. + * + * @param string $driver + * + * @return self + */ + public function setDriver(string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + + return $this; + } + + /** + * Information about the firewall backend, provided as + * "label" / "value" pairs. + * + *


+ * + * > **Note**: The information returned in this field, including the + * > formatting of values and labels, should not be considered stable, + * > and may change without notice. + * + * @return list> + */ + public function getInfo(): array + { + return $this->info; + } + + /** + * Information about the firewall backend, provided as + * "label" / "value" pairs. + * + *


+ * + * > **Note**: The information returned in this field, including the + * > formatting of values and labels, should not be considered stable, + * > and may change without notice. + * + * @param list> $info + * + * @return self + */ + public function setInfo(array $info): self + { + $this->initialized['info'] = true; + $this->info = $info; + + return $this; + } +} diff --git a/generated/Model/Health.php b/generated/Model/Health.php index bac9b20..8d8eddc 100644 --- a/generated/Model/Health.php +++ b/generated/Model/Health.php @@ -37,7 +37,7 @@ public function isInitialized($property): bool /** * Log contains the last few results (oldest first). * - * @var list + * @var list|null */ protected $log; @@ -104,9 +104,9 @@ public function setFailingStreak(int $failingStreak): self /** * Log contains the last few results (oldest first). * - * @return list + * @return list|null */ - public function getLog(): array + public function getLog(): ?array { return $this->log; } @@ -114,11 +114,11 @@ public function getLog(): array /** * Log contains the last few results (oldest first). * - * @param list $log + * @param list|null $log * * @return self */ - public function setLog(array $log): self + public function setLog(?array $log): self { $this->initialized['log'] = true; $this->log = $log; diff --git a/generated/Model/HealthcheckResult.php b/generated/Model/HealthcheckResult.php index a75c4b8..c0a55fd 100644 --- a/generated/Model/HealthcheckResult.php +++ b/generated/Model/HealthcheckResult.php @@ -4,7 +4,6 @@ namespace WebProject\DockerApi\Library\Generated\Model; use ArrayObject; -use DateTime; use function array_key_exists; class HealthcheckResult extends ArrayObject @@ -22,14 +21,14 @@ public function isInitialized($property): bool * Date and time at which this check started in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @var DateTime|null + * @var string */ protected $start; /** * Date and time at which this check ended in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @var string|null + * @var string */ protected $end; /** @@ -40,7 +39,7 @@ public function isInitialized($property): bool * - `2` reserved (considered unhealthy) * - other values: error running probe * - * @var int|null + * @var int */ protected $exitCode; /** @@ -54,9 +53,9 @@ public function isInitialized($property): bool * Date and time at which this check started in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @return DateTime|null + * @return string */ - public function getStart(): ?DateTime + public function getStart(): string { return $this->start; } @@ -65,11 +64,11 @@ public function getStart(): ?DateTime * Date and time at which this check started in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @param DateTime|null $start + * @param string $start * * @return self */ - public function setStart(?DateTime $start): self + public function setStart(string $start): self { $this->initialized['start'] = true; $this->start = $start; @@ -81,9 +80,9 @@ public function setStart(?DateTime $start): self * Date and time at which this check ended in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @return string|null + * @return string */ - public function getEnd(): ?string + public function getEnd(): string { return $this->end; } @@ -92,11 +91,11 @@ public function getEnd(): ?string * Date and time at which this check ended in * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. * - * @param string|null $end + * @param string $end * * @return self */ - public function setEnd(?string $end): self + public function setEnd(string $end): self { $this->initialized['end'] = true; $this->end = $end; @@ -112,9 +111,9 @@ public function setEnd(?string $end): self * - `2` reserved (considered unhealthy) * - other values: error running probe * - * @return int|null + * @return int */ - public function getExitCode(): ?int + public function getExitCode(): int { return $this->exitCode; } @@ -127,11 +126,11 @@ public function getExitCode(): ?int * - `2` reserved (considered unhealthy) * - other values: error running probe * - * @param int|null $exitCode + * @param int $exitCode * * @return self */ - public function setExitCode(?int $exitCode): self + public function setExitCode(int $exitCode): self { $this->initialized['exitCode'] = true; $this->exitCode = $exitCode; diff --git a/generated/Model/HostConfig.php b/generated/Model/HostConfig.php index 39575c0..82357bd 100644 --- a/generated/Model/HostConfig.php +++ b/generated/Model/HostConfig.php @@ -104,27 +104,27 @@ public function isInitialized($property): bool /** * Microseconds of CPU time that the container can get in a CPU period. * - * @var int|null + * @var int */ protected $cpuQuota; /** * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimePeriod; /** * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimeRuntime; /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @var string|null + * @var string */ protected $cpusetCpus; /** @@ -159,6 +159,9 @@ public function isInitialized($property): bool * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @var int */ protected $kernelMemoryTCP; @@ -185,7 +188,7 @@ public function isInitialized($property): bool /** * CPU quota in units of 10-9 CPUs. * - * @var int + * @var int|null */ protected $nanoCpus; /** @@ -226,7 +229,7 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuCount; /** @@ -236,20 +239,20 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuPercent; /** * Maximum IOps for the container system drive (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumIOps; /** * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumBandwidth; /** @@ -262,7 +265,6 @@ public function isInitialized($property): bool * - `volume-name:container-dest[:options]` to bind-mount a volume * managed by a volume driver into the container. `container-dest` * must be an _absolute_ path. - * * `options` is an optional, comma-delimited list of: * * - `nocopy` disables automatic copying of data from the container @@ -324,7 +326,7 @@ public function isInitialized($property): bool * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @var array|null + * @var array|null */ protected $portBindings; /** @@ -373,7 +375,7 @@ public function isInitialized($property): bool * Arbitrary non-identifying metadata attached to container and * provided to the runtime when the container is started. * - * @var array + * @var array|null */ protected $annotations; /** @@ -399,7 +401,7 @@ public function isInitialized($property): bool * If not specified, the daemon default is used, which can either be `"private"` * or `"host"`, depending on daemon version, kernel support and configuration. * - * @var string|null + * @var string */ protected $cgroupnsMode; /** @@ -451,7 +453,7 @@ public function isInitialized($property): bool /** * Cgroup to use for the container. * - * @var string + * @var string|null */ protected $cgroup; /** @@ -464,7 +466,7 @@ public function isInitialized($property): bool * An integer value containing the score given to the container in * order to tune OOM killer preferences. * - * @var int + * @var int|null */ protected $oomScoreAdj; /** @@ -474,7 +476,7 @@ public function isInitialized($property): bool * - `"container:"`: joins another container's PID namespace * - `"host"`: use the host's PID namespace inside the container * - * @var string + * @var string|null */ protected $pidMode; /** @@ -578,7 +580,7 @@ public function isInitialized($property): bool * The list of paths to be set as read-only inside the container * (this overrides the default set of paths). * - * @var list|null + * @var list */ protected $readonlyPaths; @@ -883,9 +885,9 @@ public function setCpuPeriod(int $cpuPeriod): self /** * Microseconds of CPU time that the container can get in a CPU period. * - * @return int|null + * @return int */ - public function getCpuQuota(): ?int + public function getCpuQuota(): int { return $this->cpuQuota; } @@ -893,11 +895,11 @@ public function getCpuQuota(): ?int /** * Microseconds of CPU time that the container can get in a CPU period. * - * @param int|null $cpuQuota + * @param int $cpuQuota * * @return self */ - public function setCpuQuota(?int $cpuQuota): self + public function setCpuQuota(int $cpuQuota): self { $this->initialized['cpuQuota'] = true; $this->cpuQuota = $cpuQuota; @@ -909,9 +911,9 @@ public function setCpuQuota(?int $cpuQuota): self * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimePeriod(): ?int + public function getCpuRealtimePeriod(): int { return $this->cpuRealtimePeriod; } @@ -920,11 +922,11 @@ public function getCpuRealtimePeriod(): ?int * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimePeriod + * @param int $cpuRealtimePeriod * * @return self */ - public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + public function setCpuRealtimePeriod(int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; $this->cpuRealtimePeriod = $cpuRealtimePeriod; @@ -936,9 +938,9 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimeRuntime(): ?int + public function getCpuRealtimeRuntime(): int { return $this->cpuRealtimeRuntime; } @@ -947,11 +949,11 @@ public function getCpuRealtimeRuntime(): ?int * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimeRuntime + * @param int $cpuRealtimeRuntime * * @return self */ - public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + public function setCpuRealtimeRuntime(int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; @@ -962,9 +964,9 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @return string|null + * @return string */ - public function getCpusetCpus(): ?string + public function getCpusetCpus(): string { return $this->cpusetCpus; } @@ -972,11 +974,11 @@ public function getCpusetCpus(): ?string /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @param string|null $cpusetCpus + * @param string $cpusetCpus * * @return self */ - public function setCpusetCpus(?string $cpusetCpus): self + public function setCpusetCpus(string $cpusetCpus): self { $this->initialized['cpusetCpus'] = true; $this->cpusetCpus = $cpusetCpus; @@ -1093,6 +1095,9 @@ public function setDeviceRequests(?array $deviceRequests): self * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @return int */ public function getKernelMemoryTCP(): int @@ -1107,6 +1112,9 @@ public function getKernelMemoryTCP(): int * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @param int $kernelMemoryTCP * * @return self @@ -1201,9 +1209,9 @@ public function setMemorySwappiness(?int $memorySwappiness): self /** * CPU quota in units of 10-9 CPUs. * - * @return int + * @return int|null */ - public function getNanoCpus(): int + public function getNanoCpus(): ?int { return $this->nanoCpus; } @@ -1211,11 +1219,11 @@ public function getNanoCpus(): int /** * CPU quota in units of 10-9 CPUs. * - * @param int $nanoCpus + * @param int|null $nanoCpus * * @return self */ - public function setNanoCpus(int $nanoCpus): self + public function setNanoCpus(?int $nanoCpus): self { $this->initialized['nanoCpus'] = true; $this->nanoCpus = $nanoCpus; @@ -1344,9 +1352,9 @@ public function setUlimits(?array $ulimits): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuCount(): int + public function getCpuCount(): ?int { return $this->cpuCount; } @@ -1358,11 +1366,11 @@ public function getCpuCount(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuCount + * @param int|null $cpuCount * * @return self */ - public function setCpuCount(int $cpuCount): self + public function setCpuCount(?int $cpuCount): self { $this->initialized['cpuCount'] = true; $this->cpuCount = $cpuCount; @@ -1377,9 +1385,9 @@ public function setCpuCount(int $cpuCount): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuPercent(): int + public function getCpuPercent(): ?int { return $this->cpuPercent; } @@ -1391,11 +1399,11 @@ public function getCpuPercent(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuPercent + * @param int|null $cpuPercent * * @return self */ - public function setCpuPercent(int $cpuPercent): self + public function setCpuPercent(?int $cpuPercent): self { $this->initialized['cpuPercent'] = true; $this->cpuPercent = $cpuPercent; @@ -1406,9 +1414,9 @@ public function setCpuPercent(int $cpuPercent): self /** * Maximum IOps for the container system drive (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumIOps(): int + public function getIOMaximumIOps(): ?int { return $this->iOMaximumIOps; } @@ -1416,11 +1424,11 @@ public function getIOMaximumIOps(): int /** * Maximum IOps for the container system drive (Windows only). * - * @param int $iOMaximumIOps + * @param int|null $iOMaximumIOps * * @return self */ - public function setIOMaximumIOps(int $iOMaximumIOps): self + public function setIOMaximumIOps(?int $iOMaximumIOps): self { $this->initialized['iOMaximumIOps'] = true; $this->iOMaximumIOps = $iOMaximumIOps; @@ -1432,9 +1440,9 @@ public function setIOMaximumIOps(int $iOMaximumIOps): self * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumBandwidth(): int + public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } @@ -1443,11 +1451,11 @@ public function getIOMaximumBandwidth(): int * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @param int $iOMaximumBandwidth + * @param int|null $iOMaximumBandwidth * * @return self */ - public function setIOMaximumBandwidth(int $iOMaximumBandwidth): self + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; $this->iOMaximumBandwidth = $iOMaximumBandwidth; @@ -1465,7 +1473,6 @@ public function setIOMaximumBandwidth(int $iOMaximumBandwidth): self * - `volume-name:container-dest[:options]` to bind-mount a volume * managed by a volume driver into the container. `container-dest` * must be an _absolute_ path. - * * `options` is an optional, comma-delimited list of: * * - `nocopy` disables automatic copying of data from the container @@ -1512,7 +1519,6 @@ public function getBinds(): ?array * - `volume-name:container-dest[:options]` to bind-mount a volume * managed by a volume driver into the container. `container-dest` * must be an _absolute_ path. - * * `options` is an optional, comma-delimited list of: * * - `nocopy` disables automatic copying of data from the container @@ -1643,7 +1649,7 @@ public function setNetworkMode(string $networkMode): self * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @return array|null + * @return array|null */ public function getPortBindings(): ?iterable { @@ -1658,7 +1664,7 @@ public function getPortBindings(): ?iterable * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @param array|null $portBindings + * @param array|null $portBindings * * @return self */ @@ -1836,9 +1842,9 @@ public function setConsoleSize(?array $consoleSize): self * Arbitrary non-identifying metadata attached to container and * provided to the runtime when the container is started. * - * @return array + * @return array|null */ - public function getAnnotations(): iterable + public function getAnnotations(): ?iterable { return $this->annotations; } @@ -1847,11 +1853,11 @@ public function getAnnotations(): iterable * Arbitrary non-identifying metadata attached to container and * provided to the runtime when the container is started. * - * @param array $annotations + * @param array|null $annotations * * @return self */ - public function setAnnotations(iterable $annotations): self + public function setAnnotations(?iterable $annotations): self { $this->initialized['annotations'] = true; $this->annotations = $annotations; @@ -1922,9 +1928,9 @@ public function setCapDrop(?array $capDrop): self * If not specified, the daemon default is used, which can either be `"private"` * or `"host"`, depending on daemon version, kernel support and configuration. * - * @return string|null + * @return string */ - public function getCgroupnsMode(): ?string + public function getCgroupnsMode(): string { return $this->cgroupnsMode; } @@ -1938,11 +1944,11 @@ public function getCgroupnsMode(): ?string * If not specified, the daemon default is used, which can either be `"private"` * or `"host"`, depending on daemon version, kernel support and configuration. * - * @param string|null $cgroupnsMode + * @param string $cgroupnsMode * * @return self */ - public function setCgroupnsMode(?string $cgroupnsMode): self + public function setCgroupnsMode(string $cgroupnsMode): self { $this->initialized['cgroupnsMode'] = true; $this->cgroupnsMode = $cgroupnsMode; @@ -2123,9 +2129,9 @@ public function setIpcMode(?string $ipcMode): self /** * Cgroup to use for the container. * - * @return string + * @return string|null */ - public function getCgroup(): string + public function getCgroup(): ?string { return $this->cgroup; } @@ -2133,11 +2139,11 @@ public function getCgroup(): string /** * Cgroup to use for the container. * - * @param string $cgroup + * @param string|null $cgroup * * @return self */ - public function setCgroup(string $cgroup): self + public function setCgroup(?string $cgroup): self { $this->initialized['cgroup'] = true; $this->cgroup = $cgroup; @@ -2174,9 +2180,9 @@ public function setLinks(?array $links): self * An integer value containing the score given to the container in * order to tune OOM killer preferences. * - * @return int + * @return int|null */ - public function getOomScoreAdj(): int + public function getOomScoreAdj(): ?int { return $this->oomScoreAdj; } @@ -2185,11 +2191,11 @@ public function getOomScoreAdj(): int * An integer value containing the score given to the container in * order to tune OOM killer preferences. * - * @param int $oomScoreAdj + * @param int|null $oomScoreAdj * * @return self */ - public function setOomScoreAdj(int $oomScoreAdj): self + public function setOomScoreAdj(?int $oomScoreAdj): self { $this->initialized['oomScoreAdj'] = true; $this->oomScoreAdj = $oomScoreAdj; @@ -2204,9 +2210,9 @@ public function setOomScoreAdj(int $oomScoreAdj): self * - `"container:"`: joins another container's PID namespace * - `"host"`: use the host's PID namespace inside the container * - * @return string + * @return string|null */ - public function getPidMode(): string + public function getPidMode(): ?string { return $this->pidMode; } @@ -2218,11 +2224,11 @@ public function getPidMode(): string * - `"container:"`: joins another container's PID namespace * - `"host"`: use the host's PID namespace inside the container * - * @param string $pidMode + * @param string|null $pidMode * * @return self */ - public function setPidMode(string $pidMode): self + public function setPidMode(?string $pidMode): self { $this->initialized['pidMode'] = true; $this->pidMode = $pidMode; @@ -2597,9 +2603,9 @@ public function setMaskedPaths(?array $maskedPaths): self * The list of paths to be set as read-only inside the container * (this overrides the default set of paths). * - * @return list|null + * @return list */ - public function getReadonlyPaths(): ?array + public function getReadonlyPaths(): array { return $this->readonlyPaths; } @@ -2608,11 +2614,11 @@ public function getReadonlyPaths(): ?array * The list of paths to be set as read-only inside the container * (this overrides the default set of paths). * - * @param list|null $readonlyPaths + * @param list $readonlyPaths * * @return self */ - public function setReadonlyPaths(?array $readonlyPaths): self + public function setReadonlyPaths(array $readonlyPaths): self { $this->initialized['readonlyPaths'] = true; $this->readonlyPaths = $readonlyPaths; diff --git a/generated/Model/ImageConfig.php b/generated/Model/ImageConfig.php index 345d5bf..d9c54f3 100644 --- a/generated/Model/ImageConfig.php +++ b/generated/Model/ImageConfig.php @@ -17,108 +17,20 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @var string - */ - protected $hostname; - /** - * The domain name to use for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @var string - */ - protected $domainname; /** * The user that commands are run as inside the container. * * @var string */ protected $user; - /** - * Whether to attach to `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $attachStdin = false; - /** - * Whether to attach to `stdout`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $attachStdout = false; - /** - * Whether to attach to `stderr`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $attachStderr = false; /** * An object mapping ports to an empty object in the form: * * `{"/": {}}` * - * @var array|null + * @var array>|null */ protected $exposedPorts; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $tty = false; - /** - * Open `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $openStdin = false; - /** - * Close `stdin` after one attached client disconnects. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @var bool - */ - protected $stdinOnce = false; /** * A list of environment variables to set inside the container in the * form `["VAR=value", ...]`. A variable without `=` is removed from the @@ -145,23 +57,11 @@ public function isInitialized($property): bool * @var bool|null */ protected $argsEscaped = false; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @var string - */ - protected $image = ''; /** * An object mapping mount point paths inside the container to empty * objects. * - * @var array + * @var array> */ protected $volumes; /** @@ -177,31 +77,9 @@ public function isInitialized($property): bool * entry point is reset to system default (i.e., the entry point used by * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @var list|null + * @var list */ protected $entrypoint; - /** - * Disable networking for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @var bool|null - */ - protected $networkDisabled = false; - /** - * MAC address of the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @var string|null - */ - protected $macAddress = ''; /** * `ONBUILD` metadata that were defined in the image's `Dockerfile`. * @@ -220,17 +98,6 @@ public function isInitialized($property): bool * @var string|null */ protected $stopSignal; - /** - * Timeout to stop a container in seconds. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @var int|null - */ - protected $stopTimeout; /** * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. * @@ -238,76 +105,6 @@ public function isInitialized($property): bool */ protected $shell; - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @return string - */ - public function getHostname(): string - { - return $this->hostname; - } - - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @param string $hostname - * - * @return self - */ - public function setHostname(string $hostname): self - { - $this->initialized['hostname'] = true; - $this->hostname = $hostname; - - return $this; - } - - /** - * The domain name to use for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @return string - */ - public function getDomainname(): string - { - return $this->domainname; - } - - /** - * The domain name to use for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @param string $domainname - * - * @return self - */ - public function setDomainname(string $domainname): self - { - $this->initialized['domainname'] = true; - $this->domainname = $domainname; - - return $this; - } - /** * The user that commands are run as inside the container. * @@ -333,117 +130,12 @@ public function setUser(string $user): self return $this; } - /** - * Whether to attach to `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getAttachStdin(): bool - { - return $this->attachStdin; - } - - /** - * Whether to attach to `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $attachStdin - * - * @return self - */ - public function setAttachStdin(bool $attachStdin): self - { - $this->initialized['attachStdin'] = true; - $this->attachStdin = $attachStdin; - - return $this; - } - - /** - * Whether to attach to `stdout`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getAttachStdout(): bool - { - return $this->attachStdout; - } - - /** - * Whether to attach to `stdout`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $attachStdout - * - * @return self - */ - public function setAttachStdout(bool $attachStdout): self - { - $this->initialized['attachStdout'] = true; - $this->attachStdout = $attachStdout; - - return $this; - } - - /** - * Whether to attach to `stderr`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getAttachStderr(): bool - { - return $this->attachStderr; - } - - /** - * Whether to attach to `stderr`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $attachStderr - * - * @return self - */ - public function setAttachStderr(bool $attachStderr): self - { - $this->initialized['attachStderr'] = true; - $this->attachStderr = $attachStderr; - - return $this; - } - /** * An object mapping ports to an empty object in the form: * * `{"/": {}}` * - * @return array|null + * @return array>|null */ public function getExposedPorts(): ?iterable { @@ -455,7 +147,7 @@ public function getExposedPorts(): ?iterable * * `{"/": {}}` * - * @param array|null $exposedPorts + * @param array>|null $exposedPorts * * @return self */ @@ -467,111 +159,6 @@ public function setExposedPorts(?iterable $exposedPorts): self return $this; } - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getTty(): bool - { - return $this->tty; - } - - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $tty - * - * @return self - */ - public function setTty(bool $tty): self - { - $this->initialized['tty'] = true; - $this->tty = $tty; - - return $this; - } - - /** - * Open `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getOpenStdin(): bool - { - return $this->openStdin; - } - - /** - * Open `stdin`. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $openStdin - * - * @return self - */ - public function setOpenStdin(bool $openStdin): self - { - $this->initialized['openStdin'] = true; - $this->openStdin = $openStdin; - - return $this; - } - - /** - * Close `stdin` after one attached client disconnects. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @return bool - */ - public function getStdinOnce(): bool - { - return $this->stdinOnce; - } - - /** - * Close `stdin` after one attached client disconnects. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always false. It must not be used, and will be removed in API v1.48. - * - * @param bool $stdinOnce - * - * @return self - */ - public function setStdinOnce(bool $stdinOnce): self - { - $this->initialized['stdinOnce'] = true; - $this->stdinOnce = $stdinOnce; - - return $this; - } - /** * A list of environment variables to set inside the container in the * form `["VAR=value", ...]`. A variable without `=` is removed from the @@ -676,48 +263,11 @@ public function setArgsEscaped(?bool $argsEscaped): self return $this; } - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @return string - */ - public function getImage(): string - { - return $this->image; - } - - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always empty. It must not be used, and will be removed in API v1.48. - * - * @param string $image - * - * @return self - */ - public function setImage(string $image): self - { - $this->initialized['image'] = true; - $this->image = $image; - - return $this; - } - /** * An object mapping mount point paths inside the container to empty * objects. * - * @return array + * @return array> */ public function getVolumes(): iterable { @@ -728,7 +278,7 @@ public function getVolumes(): iterable * An object mapping mount point paths inside the container to empty * objects. * - * @param array $volumes + * @param array> $volumes * * @return self */ @@ -772,9 +322,9 @@ public function setWorkingDir(string $workingDir): self * entry point is reset to system default (i.e., the entry point used by * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @return list|null + * @return list */ - public function getEntrypoint(): ?array + public function getEntrypoint(): array { return $this->entrypoint; } @@ -786,11 +336,11 @@ public function getEntrypoint(): ?array * entry point is reset to system default (i.e., the entry point used by * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @param list|null $entrypoint + * @param list $entrypoint * * @return self */ - public function setEntrypoint(?array $entrypoint): self + public function setEntrypoint(array $entrypoint): self { $this->initialized['entrypoint'] = true; $this->entrypoint = $entrypoint; @@ -798,76 +348,6 @@ public function setEntrypoint(?array $entrypoint): self return $this; } - /** - * Disable networking for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @return bool|null - */ - public function getNetworkDisabled(): ?bool - { - return $this->networkDisabled; - } - - /** - * Disable networking for the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @param bool|null $networkDisabled - * - * @return self - */ - public function setNetworkDisabled(?bool $networkDisabled): self - { - $this->initialized['networkDisabled'] = true; - $this->networkDisabled = $networkDisabled; - - return $this; - } - - /** - * MAC address of the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @return string|null - */ - public function getMacAddress(): ?string - { - return $this->macAddress; - } - - /** - * MAC address of the container. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @param string|null $macAddress - * - * @return self - */ - public function setMacAddress(?string $macAddress): self - { - $this->initialized['macAddress'] = true; - $this->macAddress = $macAddress; - - return $this; - } - /** * `ONBUILD` metadata that were defined in the image's `Dockerfile`. * @@ -943,41 +423,6 @@ public function setStopSignal(?string $stopSignal): self return $this; } - /** - * Timeout to stop a container in seconds. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @return int|null - */ - public function getStopTimeout(): ?int - { - return $this->stopTimeout; - } - - /** - * Timeout to stop a container in seconds. - * - *


- * - * > **Deprecated**: this field is not part of the image specification and is - * > always omitted. It must not be used, and will be removed in API v1.48. - * - * @param int|null $stopTimeout - * - * @return self - */ - public function setStopTimeout(?int $stopTimeout): self - { - $this->initialized['stopTimeout'] = true; - $this->stopTimeout = $stopTimeout; - - return $this; - } - /** * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. * diff --git a/generated/Model/ImageConfigExposedPortsItem.php b/generated/Model/ImageConfigExposedPortsItem.php deleted file mode 100644 index a8aebb0..0000000 --- a/generated/Model/ImageConfigExposedPortsItem.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ImageConfigVolumesItem.php b/generated/Model/ImageConfigVolumesItem.php deleted file mode 100644 index 5c94661..0000000 --- a/generated/Model/ImageConfigVolumesItem.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ImageInspect.php b/generated/Model/ImageInspect.php index d0505c2..b006652 100644 --- a/generated/Model/ImageInspect.php +++ b/generated/Model/ImageInspect.php @@ -81,6 +81,11 @@ public function isInitialized($property): bool * is only set for images that were built/created locally. This field * is empty if the image was pulled from an image registry. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @var string */ protected $parent; @@ -105,6 +110,11 @@ public function isInitialized($property): bool * * Depending on how the image was created, this field may be empty. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @var string */ protected $dockerVersion; @@ -153,14 +163,6 @@ public function isInitialized($property): bool * @var int */ protected $size; - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @var int - */ - protected $virtualSize; /** * Information about the storage driver used to store the container's and * image's filesystem. @@ -368,6 +370,11 @@ public function setRepoDigests(array $repoDigests): self * is only set for images that were built/created locally. This field * is empty if the image was pulled from an image registry. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @return string */ public function getParent(): string @@ -382,6 +389,11 @@ public function getParent(): string * is only set for images that were built/created locally. This field * is empty if the image was pulled from an image registry. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @param string $parent * * @return self @@ -457,6 +469,11 @@ public function setCreated(?string $created): self * * Depending on how the image was created, this field may be empty. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @return string */ public function getDockerVersion(): string @@ -469,6 +486,11 @@ public function getDockerVersion(): string * * Depending on how the image was created, this field may be empty. * + * > **Deprecated**: This field is only set when using the deprecated + * > legacy builder. It is included in API responses for informational + * > purposes, but should not be depended on as it will be omitted + * > once the legacy builder is removed. + * * @param string $dockerVersion * * @return self @@ -662,35 +684,6 @@ public function setSize(int $size): self return $this; } - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @return int - */ - public function getVirtualSize(): int - { - return $this->virtualSize; - } - - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @param int $virtualSize - * - * @return self - */ - public function setVirtualSize(int $virtualSize): self - { - $this->initialized['virtualSize'] = true; - $this->virtualSize = $virtualSize; - - return $this; - } - /** * Information about the storage driver used to store the container's and * image's filesystem. diff --git a/generated/Model/ImageSummary.php b/generated/Model/ImageSummary.php index d1d03f9..ab4ca2a 100644 --- a/generated/Model/ImageSummary.php +++ b/generated/Model/ImageSummary.php @@ -86,14 +86,6 @@ public function isInitialized($property): bool * @var int */ protected $sharedSize; - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @var int - */ - protected $virtualSize; /** * User-defined key/value metadata. * @@ -104,8 +96,7 @@ public function isInitialized($property): bool * Number of containers using this image. Includes both stopped and running * containers. * - * This size is not calculated by default, and depends on which API endpoint - * is used. `-1` indicates that the value has not been set / calculated. + * `-1` indicates that the value has not been set / calculated. * * @var int */ @@ -358,35 +349,6 @@ public function setSharedSize(int $sharedSize): self return $this; } - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @return int - */ - public function getVirtualSize(): int - { - return $this->virtualSize; - } - - /** - * Total size of the image including all layers it is composed of. - * - * Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. - * - * @param int $virtualSize - * - * @return self - */ - public function setVirtualSize(int $virtualSize): self - { - $this->initialized['virtualSize'] = true; - $this->virtualSize = $virtualSize; - - return $this; - } - /** * User-defined key/value metadata. * @@ -416,8 +378,7 @@ public function setLabels(iterable $labels): self * Number of containers using this image. Includes both stopped and running * containers. * - * This size is not calculated by default, and depends on which API endpoint - * is used. `-1` indicates that the value has not been set / calculated. + * `-1` indicates that the value has not been set / calculated. * * @return int */ @@ -430,8 +391,7 @@ public function getContainers(): int * Number of containers using this image. Includes both stopped and running * containers. * - * This size is not calculated by default, and depends on which API endpoint - * is used. `-1` indicates that the value has not been set / calculated. + * `-1` indicates that the value has not been set / calculated. * * @param int $containers * diff --git a/generated/Model/NetworkAttachmentConfig.php b/generated/Model/NetworkAttachmentConfig.php index c7afb6b..eb779b0 100644 --- a/generated/Model/NetworkAttachmentConfig.php +++ b/generated/Model/NetworkAttachmentConfig.php @@ -26,7 +26,7 @@ public function isInitialized($property): bool /** * Discoverable alternate names for the service on this network. * - * @var list + * @var list|null */ protected $aliases; /** @@ -64,9 +64,9 @@ public function setTarget(string $target): self /** * Discoverable alternate names for the service on this network. * - * @return list + * @return list|null */ - public function getAliases(): array + public function getAliases(): ?array { return $this->aliases; } @@ -74,11 +74,11 @@ public function getAliases(): array /** * Discoverable alternate names for the service on this network. * - * @param list $aliases + * @param list|null $aliases * * @return self */ - public function setAliases(array $aliases): self + public function setAliases(?array $aliases): self { $this->initialized['aliases'] = true; $this->aliases = $aliases; diff --git a/generated/Model/NetworkSettings.php b/generated/Model/NetworkSettings.php index 4e6eaa3..b9330ec 100644 --- a/generated/Model/NetworkSettings.php +++ b/generated/Model/NetworkSettings.php @@ -20,6 +20,8 @@ public function isInitialized($property): bool /** * Name of the default bridge interface when dockerd's --bridge flag is set. * + * Deprecated: This field is only set when the daemon is started with the --bridge flag specified. + * * @var string|null */ protected $bridge; @@ -50,7 +52,7 @@ public function isInitialized($property): bool * * Deprecated: This field is never set and will be removed in a future release. * - * @var int|null + * @var int */ protected $linkLocalIPv6PrefixLen; /** @@ -61,7 +63,7 @@ public function isInitialized($property): bool * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @var array|null + * @var array|null */ protected $ports; /** @@ -204,6 +206,8 @@ public function isInitialized($property): bool /** * Name of the default bridge interface when dockerd's --bridge flag is set. * + * Deprecated: This field is only set when the daemon is started with the --bridge flag specified. + * * @return string|null */ public function getBridge(): ?string @@ -214,6 +218,8 @@ public function getBridge(): ?string /** * Name of the default bridge interface when dockerd's --bridge flag is set. * + * Deprecated: This field is only set when the daemon is started with the --bridge flag specified. + * * @param string|null $bridge * * @return self @@ -314,9 +320,9 @@ public function setLinkLocalIPv6Address(string $linkLocalIPv6Address): self * * Deprecated: This field is never set and will be removed in a future release. * - * @return int|null + * @return int */ - public function getLinkLocalIPv6PrefixLen(): ?int + public function getLinkLocalIPv6PrefixLen(): int { return $this->linkLocalIPv6PrefixLen; } @@ -326,11 +332,11 @@ public function getLinkLocalIPv6PrefixLen(): ?int * * Deprecated: This field is never set and will be removed in a future release. * - * @param int|null $linkLocalIPv6PrefixLen + * @param int $linkLocalIPv6PrefixLen * * @return self */ - public function setLinkLocalIPv6PrefixLen(?int $linkLocalIPv6PrefixLen): self + public function setLinkLocalIPv6PrefixLen(int $linkLocalIPv6PrefixLen): self { $this->initialized['linkLocalIPv6PrefixLen'] = true; $this->linkLocalIPv6PrefixLen = $linkLocalIPv6PrefixLen; @@ -346,7 +352,7 @@ public function setLinkLocalIPv6PrefixLen(?int $linkLocalIPv6PrefixLen): self * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @return array|null + * @return array|null */ public function getPorts(): ?iterable { @@ -361,7 +367,7 @@ public function getPorts(): ?iterable * If a container's port is mapped for multiple protocols, separate entries * are added to the mapping table. * - * @param array|null $ports + * @param array|null $ports * * @return self */ diff --git a/generated/Model/PluginConfig.php b/generated/Model/PluginConfig.php index b6c06a9..c666ec2 100644 --- a/generated/Model/PluginConfig.php +++ b/generated/Model/PluginConfig.php @@ -20,6 +20,10 @@ public function isInitialized($property): bool /** * Docker Version used to create the plugin. * + * Depending on how the plugin was created, this field may be empty or omitted. + * + * Deprecated: this field is no longer set, and will be removed in the next API version. + * * @var string */ protected $dockerVersion; @@ -38,7 +42,7 @@ public function isInitialized($property): bool */ protected $interface; /** - * @var list|null + * @var list */ protected $entrypoint; /** @@ -89,6 +93,10 @@ public function isInitialized($property): bool /** * Docker Version used to create the plugin. * + * Depending on how the plugin was created, this field may be empty or omitted. + * + * Deprecated: this field is no longer set, and will be removed in the next API version. + * * @return string */ public function getDockerVersion(): string @@ -99,6 +107,10 @@ public function getDockerVersion(): string /** * Docker Version used to create the plugin. * + * Depending on how the plugin was created, this field may be empty or omitted. + * + * Deprecated: this field is no longer set, and will be removed in the next API version. + * * @param string $dockerVersion * * @return self @@ -179,19 +191,19 @@ public function setInterface(PluginConfigInterface $interface): self } /** - * @return list|null + * @return list */ - public function getEntrypoint(): ?array + public function getEntrypoint(): array { return $this->entrypoint; } /** - * @param list|null $entrypoint + * @param list $entrypoint * * @return self */ - public function setEntrypoint(?array $entrypoint): self + public function setEntrypoint(array $entrypoint): self { $this->initialized['entrypoint'] = true; $this->entrypoint = $entrypoint; diff --git a/generated/Model/PortBinding.php b/generated/Model/PortBinding.php index 06024bb..48b659c 100644 --- a/generated/Model/PortBinding.php +++ b/generated/Model/PortBinding.php @@ -20,22 +20,22 @@ public function isInitialized($property): bool /** * Host IP address that the container's port is mapped to. * - * @var string|null + * @var string */ protected $hostIp; /** * Host port number that the container's port is mapped to. * - * @var string|null + * @var string */ protected $hostPort; /** * Host IP address that the container's port is mapped to. * - * @return string|null + * @return string */ - public function getHostIp(): ?string + public function getHostIp(): string { return $this->hostIp; } @@ -43,11 +43,11 @@ public function getHostIp(): ?string /** * Host IP address that the container's port is mapped to. * - * @param string|null $hostIp + * @param string $hostIp * * @return self */ - public function setHostIp(?string $hostIp): self + public function setHostIp(string $hostIp): self { $this->initialized['hostIp'] = true; $this->hostIp = $hostIp; @@ -58,9 +58,9 @@ public function setHostIp(?string $hostIp): self /** * Host port number that the container's port is mapped to. * - * @return string|null + * @return string */ - public function getHostPort(): ?string + public function getHostPort(): string { return $this->hostPort; } @@ -68,11 +68,11 @@ public function getHostPort(): ?string /** * Host port number that the container's port is mapped to. * - * @param string|null $hostPort + * @param string $hostPort * * @return self */ - public function setHostPort(?string $hostPort): self + public function setHostPort(string $hostPort): self { $this->initialized['hostPort'] = true; $this->hostPort = $hostPort; diff --git a/generated/Model/PortStatus.php b/generated/Model/PortStatus.php index 602bcda..c47d1fe 100644 --- a/generated/Model/PortStatus.php +++ b/generated/Model/PortStatus.php @@ -18,24 +18,24 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * @var list|null + * @var list */ protected $ports; /** - * @return list|null + * @return list */ - public function getPorts(): ?array + public function getPorts(): array { return $this->ports; } /** - * @param list|null $ports + * @param list $ports * * @return self */ - public function setPorts(?array $ports): self + public function setPorts(array $ports): self { $this->initialized['ports'] = true; $this->ports = $ports; diff --git a/generated/Model/RegistryServiceConfig.php b/generated/Model/RegistryServiceConfig.php index 8d5be6e..8a87155 100644 --- a/generated/Model/RegistryServiceConfig.php +++ b/generated/Model/RegistryServiceConfig.php @@ -17,30 +17,6 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } - /** - * List of IP ranges to which nondistributable artifacts can be pushed, - * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @var list - */ - protected $allowNondistributableArtifactsCIDRs; - /** - * List of registry hostnames to which nondistributable artifacts can be - * pushed, using the format `[:]` or `[:]`. - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @var list - */ - protected $allowNondistributableArtifactsHostnames; /** * List of IP ranges of insecure registries, using the CIDR syntax * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries @@ -81,80 +57,6 @@ public function isInitialized($property): bool */ protected $mirrors; - /** - * List of IP ranges to which nondistributable artifacts can be pushed, - * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @return list - */ - public function getAllowNondistributableArtifactsCIDRs(): array - { - return $this->allowNondistributableArtifactsCIDRs; - } - - /** - * List of IP ranges to which nondistributable artifacts can be pushed, - * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @param list $allowNondistributableArtifactsCIDRs - * - * @return self - */ - public function setAllowNondistributableArtifactsCIDRs(array $allowNondistributableArtifactsCIDRs): self - { - $this->initialized['allowNondistributableArtifactsCIDRs'] = true; - $this->allowNondistributableArtifactsCIDRs = $allowNondistributableArtifactsCIDRs; - - return $this; - } - - /** - * List of registry hostnames to which nondistributable artifacts can be - * pushed, using the format `[:]` or `[:]`. - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @return list - */ - public function getAllowNondistributableArtifactsHostnames(): array - { - return $this->allowNondistributableArtifactsHostnames; - } - - /** - * List of registry hostnames to which nondistributable artifacts can be - * pushed, using the format `[:]` or `[:]`. - * - *


- * - * > **Deprecated**: Pushing nondistributable artifacts is now always enabled - * > and this field is always `null`. This field will be removed in a API v1.49. - * - * @param list $allowNondistributableArtifactsHostnames - * - * @return self - */ - public function setAllowNondistributableArtifactsHostnames(array $allowNondistributableArtifactsHostnames): self - { - $this->initialized['allowNondistributableArtifactsHostnames'] = true; - $this->allowNondistributableArtifactsHostnames = $allowNondistributableArtifactsHostnames; - - return $this; - } - /** * List of IP ranges of insecure registries, using the CIDR syntax * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries diff --git a/generated/Model/Resources.php b/generated/Model/Resources.php index e138be4..d864343 100644 --- a/generated/Model/Resources.php +++ b/generated/Model/Resources.php @@ -104,27 +104,27 @@ public function isInitialized($property): bool /** * Microseconds of CPU time that the container can get in a CPU period. * - * @var int|null + * @var int */ protected $cpuQuota; /** * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimePeriod; /** * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @var int|null + * @var int */ protected $cpuRealtimeRuntime; /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @var string|null + * @var string */ protected $cpusetCpus; /** @@ -159,6 +159,9 @@ public function isInitialized($property): bool * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @var int */ protected $kernelMemoryTCP; @@ -185,7 +188,7 @@ public function isInitialized($property): bool /** * CPU quota in units of 10-9 CPUs. * - * @var int + * @var int|null */ protected $nanoCpus; /** @@ -226,7 +229,7 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuCount; /** @@ -236,20 +239,20 @@ public function isInitialized($property): bool * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @var int + * @var int|null */ protected $cpuPercent; /** * Maximum IOps for the container system drive (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumIOps; /** * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @var int + * @var int|null */ protected $iOMaximumBandwidth; @@ -554,9 +557,9 @@ public function setCpuPeriod(int $cpuPeriod): self /** * Microseconds of CPU time that the container can get in a CPU period. * - * @return int|null + * @return int */ - public function getCpuQuota(): ?int + public function getCpuQuota(): int { return $this->cpuQuota; } @@ -564,11 +567,11 @@ public function getCpuQuota(): ?int /** * Microseconds of CPU time that the container can get in a CPU period. * - * @param int|null $cpuQuota + * @param int $cpuQuota * * @return self */ - public function setCpuQuota(?int $cpuQuota): self + public function setCpuQuota(int $cpuQuota): self { $this->initialized['cpuQuota'] = true; $this->cpuQuota = $cpuQuota; @@ -580,9 +583,9 @@ public function setCpuQuota(?int $cpuQuota): self * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimePeriod(): ?int + public function getCpuRealtimePeriod(): int { return $this->cpuRealtimePeriod; } @@ -591,11 +594,11 @@ public function getCpuRealtimePeriod(): ?int * The length of a CPU real-time period in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimePeriod + * @param int $cpuRealtimePeriod * * @return self */ - public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + public function setCpuRealtimePeriod(int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; $this->cpuRealtimePeriod = $cpuRealtimePeriod; @@ -607,9 +610,9 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @return int|null + * @return int */ - public function getCpuRealtimeRuntime(): ?int + public function getCpuRealtimeRuntime(): int { return $this->cpuRealtimeRuntime; } @@ -618,11 +621,11 @@ public function getCpuRealtimeRuntime(): ?int * The length of a CPU real-time runtime in microseconds. Set to 0 to * allocate no time allocated to real-time tasks. * - * @param int|null $cpuRealtimeRuntime + * @param int $cpuRealtimeRuntime * * @return self */ - public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + public function setCpuRealtimeRuntime(int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; @@ -633,9 +636,9 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @return string|null + * @return string */ - public function getCpusetCpus(): ?string + public function getCpusetCpus(): string { return $this->cpusetCpus; } @@ -643,11 +646,11 @@ public function getCpusetCpus(): ?string /** * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * - * @param string|null $cpusetCpus + * @param string $cpusetCpus * * @return self */ - public function setCpusetCpus(?string $cpusetCpus): self + public function setCpusetCpus(string $cpusetCpus): self { $this->initialized['cpusetCpus'] = true; $this->cpusetCpus = $cpusetCpus; @@ -764,6 +767,9 @@ public function setDeviceRequests(?array $deviceRequests): self * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @return int */ public function getKernelMemoryTCP(): int @@ -778,6 +784,9 @@ public function getKernelMemoryTCP(): int * * This field is omitted when empty. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + * for cgroups v1. This field will be removed in a future release. + * * @param int $kernelMemoryTCP * * @return self @@ -872,9 +881,9 @@ public function setMemorySwappiness(?int $memorySwappiness): self /** * CPU quota in units of 10-9 CPUs. * - * @return int + * @return int|null */ - public function getNanoCpus(): int + public function getNanoCpus(): ?int { return $this->nanoCpus; } @@ -882,11 +891,11 @@ public function getNanoCpus(): int /** * CPU quota in units of 10-9 CPUs. * - * @param int $nanoCpus + * @param int|null $nanoCpus * * @return self */ - public function setNanoCpus(int $nanoCpus): self + public function setNanoCpus(?int $nanoCpus): self { $this->initialized['nanoCpus'] = true; $this->nanoCpus = $nanoCpus; @@ -1015,9 +1024,9 @@ public function setUlimits(?array $ulimits): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuCount(): int + public function getCpuCount(): ?int { return $this->cpuCount; } @@ -1029,11 +1038,11 @@ public function getCpuCount(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuCount + * @param int|null $cpuCount * * @return self */ - public function setCpuCount(int $cpuCount): self + public function setCpuCount(?int $cpuCount): self { $this->initialized['cpuCount'] = true; $this->cpuCount = $cpuCount; @@ -1048,9 +1057,9 @@ public function setCpuCount(int $cpuCount): self * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @return int + * @return int|null */ - public function getCpuPercent(): int + public function getCpuPercent(): ?int { return $this->cpuPercent; } @@ -1062,11 +1071,11 @@ public function getCpuPercent(): int * mutually exclusive. The order of precedence is `CPUCount` first, then * `CPUShares`, and `CPUPercent` last. * - * @param int $cpuPercent + * @param int|null $cpuPercent * * @return self */ - public function setCpuPercent(int $cpuPercent): self + public function setCpuPercent(?int $cpuPercent): self { $this->initialized['cpuPercent'] = true; $this->cpuPercent = $cpuPercent; @@ -1077,9 +1086,9 @@ public function setCpuPercent(int $cpuPercent): self /** * Maximum IOps for the container system drive (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumIOps(): int + public function getIOMaximumIOps(): ?int { return $this->iOMaximumIOps; } @@ -1087,11 +1096,11 @@ public function getIOMaximumIOps(): int /** * Maximum IOps for the container system drive (Windows only). * - * @param int $iOMaximumIOps + * @param int|null $iOMaximumIOps * * @return self */ - public function setIOMaximumIOps(int $iOMaximumIOps): self + public function setIOMaximumIOps(?int $iOMaximumIOps): self { $this->initialized['iOMaximumIOps'] = true; $this->iOMaximumIOps = $iOMaximumIOps; @@ -1103,9 +1112,9 @@ public function setIOMaximumIOps(int $iOMaximumIOps): self * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @return int + * @return int|null */ - public function getIOMaximumBandwidth(): int + public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } @@ -1114,11 +1123,11 @@ public function getIOMaximumBandwidth(): int * Maximum IO in bytes per second for the container system drive * (Windows only). * - * @param int $iOMaximumBandwidth + * @param int|null $iOMaximumBandwidth * * @return self */ - public function setIOMaximumBandwidth(int $iOMaximumBandwidth): self + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; $this->iOMaximumBandwidth = $iOMaximumBandwidth; diff --git a/generated/Model/SecretSpec.php b/generated/Model/SecretSpec.php index 003db9e..ccd85b4 100644 --- a/generated/Model/SecretSpec.php +++ b/generated/Model/SecretSpec.php @@ -30,8 +30,11 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. @@ -103,8 +106,11 @@ public function setLabels(iterable $labels): self } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. @@ -117,8 +123,11 @@ public function getData(): string } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. diff --git a/generated/Model/SecretsCreatePostBody.php b/generated/Model/SecretsCreatePostBody.php index 317b937..a1b87f5 100644 --- a/generated/Model/SecretsCreatePostBody.php +++ b/generated/Model/SecretsCreatePostBody.php @@ -30,8 +30,11 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. @@ -103,8 +106,11 @@ public function setLabels(iterable $labels): self } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. @@ -117,8 +123,11 @@ public function getData(): string } /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. + * Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + * ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + * It must be empty if the Driver field is set, in which case the data is + * loaded from an external secret store. The maximum allowed size is 500KB, + * as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). * * This field is only used to _create_ a secret, and is not returned by * other endpoints. diff --git a/generated/Model/ServiceEndpoint.php b/generated/Model/ServiceEndpoint.php index f9c2631..2499319 100644 --- a/generated/Model/ServiceEndpoint.php +++ b/generated/Model/ServiceEndpoint.php @@ -24,7 +24,7 @@ public function isInitialized($property): bool */ protected $spec; /** - * @var list|null + * @var list */ protected $ports; /** @@ -58,19 +58,19 @@ public function setSpec(EndpointSpec $spec): self } /** - * @return list|null + * @return list */ - public function getPorts(): ?array + public function getPorts(): array { return $this->ports; } /** - * @param list|null $ports + * @param list $ports * * @return self */ - public function setPorts(?array $ports): self + public function setPorts(array $ports): self { $this->initialized['ports'] = true; $this->ports = $ports; diff --git a/generated/Model/ServiceSpec.php b/generated/Model/ServiceSpec.php index 72e0a99..ab70055 100644 --- a/generated/Model/ServiceSpec.php +++ b/generated/Model/ServiceSpec.php @@ -58,7 +58,7 @@ public function isInitialized($property): bool * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @var list + * @var list|null */ protected $networks; /** @@ -223,9 +223,9 @@ public function setRollbackConfig(ServiceSpecRollbackConfig $rollbackConfig): se * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @return list + * @return list|null */ - public function getNetworks(): array + public function getNetworks(): ?array { return $this->networks; } @@ -235,11 +235,11 @@ public function getNetworks(): array * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @param list $networks + * @param list|null $networks * * @return self */ - public function setNetworks(array $networks): self + public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; $this->networks = $networks; diff --git a/generated/Model/ServiceSpecMode.php b/generated/Model/ServiceSpecMode.php index 9af86b3..beec3be 100644 --- a/generated/Model/ServiceSpecMode.php +++ b/generated/Model/ServiceSpecMode.php @@ -22,7 +22,7 @@ public function isInitialized($property): bool */ protected $replicated; /** - * @var ServiceSpecModeGlobal + * @var array */ protected $global; /** @@ -36,7 +36,7 @@ public function isInitialized($property): bool * The mode used for services which run a task to the completed state * on each valid node. * - * @var ServiceSpecModeGlobalJob + * @var array */ protected $globalJob; @@ -62,19 +62,19 @@ public function setReplicated(ServiceSpecModeReplicated $replicated): self } /** - * @return ServiceSpecModeGlobal + * @return array */ - public function getGlobal(): ServiceSpecModeGlobal + public function getGlobal(): iterable { return $this->global; } /** - * @param ServiceSpecModeGlobal $global + * @param array $global * * @return self */ - public function setGlobal(ServiceSpecModeGlobal $global): self + public function setGlobal(iterable $global): self { $this->initialized['global'] = true; $this->global = $global; @@ -113,9 +113,9 @@ public function setReplicatedJob(ServiceSpecModeReplicatedJob $replicatedJob): s * The mode used for services which run a task to the completed state * on each valid node. * - * @return ServiceSpecModeGlobalJob + * @return array */ - public function getGlobalJob(): ServiceSpecModeGlobalJob + public function getGlobalJob(): iterable { return $this->globalJob; } @@ -124,11 +124,11 @@ public function getGlobalJob(): ServiceSpecModeGlobalJob * The mode used for services which run a task to the completed state * on each valid node. * - * @param ServiceSpecModeGlobalJob $globalJob + * @param array $globalJob * * @return self */ - public function setGlobalJob(ServiceSpecModeGlobalJob $globalJob): self + public function setGlobalJob(iterable $globalJob): self { $this->initialized['globalJob'] = true; $this->globalJob = $globalJob; diff --git a/generated/Model/ServiceSpecModeGlobal.php b/generated/Model/ServiceSpecModeGlobal.php deleted file mode 100644 index 027de22..0000000 --- a/generated/Model/ServiceSpecModeGlobal.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ServiceSpecModeGlobalJob.php b/generated/Model/ServiceSpecModeGlobalJob.php deleted file mode 100644 index eeda21a..0000000 --- a/generated/Model/ServiceSpecModeGlobalJob.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/ServiceSpecRollbackConfig.php b/generated/Model/ServiceSpecRollbackConfig.php index b39b17c..457ca80 100644 --- a/generated/Model/ServiceSpecRollbackConfig.php +++ b/generated/Model/ServiceSpecRollbackConfig.php @@ -51,7 +51,7 @@ public function isInitialized($property): bool * * @var float */ - protected $maxFailureRatio; + protected $maxFailureRatio = 0; /** * The order of operations when rolling back a task. Either the old * task is shut down before the new task is started, or the new task diff --git a/generated/Model/ServiceSpecUpdateConfig.php b/generated/Model/ServiceSpecUpdateConfig.php index 2bf8dd4..82db37e 100644 --- a/generated/Model/ServiceSpecUpdateConfig.php +++ b/generated/Model/ServiceSpecUpdateConfig.php @@ -51,7 +51,7 @@ public function isInitialized($property): bool * * @var float */ - protected $maxFailureRatio; + protected $maxFailureRatio = 0; /** * The order of operations when rolling out an updated task. Either * the old task is shut down before the new task is started, or the diff --git a/generated/Model/ServicesCreatePostBody.php b/generated/Model/ServicesCreatePostBody.php index a242f4e..70bcba6 100644 --- a/generated/Model/ServicesCreatePostBody.php +++ b/generated/Model/ServicesCreatePostBody.php @@ -58,7 +58,7 @@ public function isInitialized($property): bool * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @var list + * @var list|null */ protected $networks; /** @@ -223,9 +223,9 @@ public function setRollbackConfig(ServiceSpecRollbackConfig $rollbackConfig): se * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @return list + * @return list|null */ - public function getNetworks(): array + public function getNetworks(): ?array { return $this->networks; } @@ -235,11 +235,11 @@ public function getNetworks(): array * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @param list $networks + * @param list|null $networks * * @return self */ - public function setNetworks(array $networks): self + public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; $this->networks = $networks; diff --git a/generated/Model/ServicesIdUpdatePostBody.php b/generated/Model/ServicesIdUpdatePostBody.php index 187eb34..1f753d3 100644 --- a/generated/Model/ServicesIdUpdatePostBody.php +++ b/generated/Model/ServicesIdUpdatePostBody.php @@ -58,7 +58,7 @@ public function isInitialized($property): bool * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @var list + * @var list|null */ protected $networks; /** @@ -223,9 +223,9 @@ public function setRollbackConfig(ServiceSpecRollbackConfig $rollbackConfig): se * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @return list + * @return list|null */ - public function getNetworks(): array + public function getNetworks(): ?array { return $this->networks; } @@ -235,11 +235,11 @@ public function getNetworks(): array * * Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. * - * @param list $networks + * @param list|null $networks * * @return self */ - public function setNetworks(array $networks): self + public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; $this->networks = $networks; diff --git a/generated/Model/Swarm.php b/generated/Model/Swarm.php index c9bbbb0..003a5f0 100644 --- a/generated/Model/Swarm.php +++ b/generated/Model/Swarm.php @@ -78,7 +78,7 @@ public function isInitialized($property): bool * * @var int */ - protected $dataPathPort; + protected $dataPathPort = 4789; /** * Default Address Pool specifies default subnet pools for global scope * networks. @@ -92,7 +92,7 @@ public function isInitialized($property): bool * * @var int */ - protected $subnetSize; + protected $subnetSize = 24; /** * JoinTokens contains the tokens workers and managers need to join the swarm. * diff --git a/generated/Model/SystemDfGetJsonResponse200.php b/generated/Model/SystemDfGetJsonResponse200.php index 4462a6d..1d42aa8 100644 --- a/generated/Model/SystemDfGetJsonResponse200.php +++ b/generated/Model/SystemDfGetJsonResponse200.php @@ -30,7 +30,7 @@ public function isInitialized($property): bool */ protected $containers; /** - * @var list|null + * @var list */ protected $volumes; /** @@ -102,19 +102,19 @@ public function setContainers(array $containers): self } /** - * @return list|null + * @return list */ - public function getVolumes(): ?array + public function getVolumes(): array { return $this->volumes; } /** - * @param list|null $volumes + * @param list $volumes * * @return self */ - public function setVolumes(?array $volumes): self + public function setVolumes(array $volumes): self { $this->initialized['volumes'] = true; $this->volumes = $volumes; diff --git a/generated/Model/SystemInfo.php b/generated/Model/SystemInfo.php index 52470af..2995b3f 100644 --- a/generated/Model/SystemInfo.php +++ b/generated/Model/SystemInfo.php @@ -123,6 +123,8 @@ public function isInitialized($property): bool * Kernel memory TCP limits are not supported when using cgroups v2, which * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. + * * @var bool */ protected $kernelMemoryTCP; @@ -172,31 +174,6 @@ public function isInitialized($property): bool * @var bool */ protected $iPv4Forwarding; - /** - * Indicates if `bridge-nf-call-iptables` is available on the host when - * the daemon was started. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @var bool - */ - protected $bridgeNfIptables; - /** - * Indicates if `bridge-nf-call-ip6tables` is available on the host. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand, and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @var bool - */ - protected $bridgeNfIp6tables; /** * Indicates if the daemon is running in debug-mode / with debug-level * logging enabled. @@ -513,6 +490,23 @@ public function isInitialized($property): bool * @var list */ protected $defaultAddressPools; + /** + * Information about the daemon's firewalling configuration. + * + * This field is currently only used on Linux, and omitted on other platforms. + * + * @var FirewallInfo|null + */ + protected $firewallBackend; + /** + * List of devices discovered by device drivers. + * + * Each device includes information about its source driver, kind, name, + * and additional driver-specific attributes. + * + * @var list + */ + protected $discoveredDevices; /** * List of warnings / informational messages about missing features, or * issues related to the daemon configuration. @@ -907,6 +901,8 @@ public function setSwapLimit(bool $swapLimit): self * Kernel memory TCP limits are not supported when using cgroups v2, which * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. + * * @return bool */ public function getKernelMemoryTCP(): bool @@ -921,6 +917,8 @@ public function getKernelMemoryTCP(): bool * Kernel memory TCP limits are not supported when using cgroups v2, which * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. * + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. + * * @param bool $kernelMemoryTCP * * @return self @@ -1116,82 +1114,6 @@ public function setIPv4Forwarding(bool $iPv4Forwarding): self return $this; } - /** - * Indicates if `bridge-nf-call-iptables` is available on the host when - * the daemon was started. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @return bool - */ - public function getBridgeNfIptables(): bool - { - return $this->bridgeNfIptables; - } - - /** - * Indicates if `bridge-nf-call-iptables` is available on the host when - * the daemon was started. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @param bool $bridgeNfIptables - * - * @return self - */ - public function setBridgeNfIptables(bool $bridgeNfIptables): self - { - $this->initialized['bridgeNfIptables'] = true; - $this->bridgeNfIptables = $bridgeNfIptables; - - return $this; - } - - /** - * Indicates if `bridge-nf-call-ip6tables` is available on the host. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand, and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @return bool - */ - public function getBridgeNfIp6tables(): bool - { - return $this->bridgeNfIp6tables; - } - - /** - * Indicates if `bridge-nf-call-ip6tables` is available on the host. - * - *


- * - * > **Deprecated**: netfilter module is now loaded on-demand, and no longer - * > during daemon startup, making this field obsolete. This field is always - * > `false` and will be removed in a API v1.49. - * - * @param bool $bridgeNfIp6tables - * - * @return self - */ - public function setBridgeNfIp6tables(bool $bridgeNfIp6tables): self - { - $this->initialized['bridgeNfIp6tables'] = true; - $this->bridgeNfIp6tables = $bridgeNfIp6tables; - - return $this; - } - /** * Indicates if the daemon is running in debug-mode / with debug-level * logging enabled. @@ -2305,6 +2227,66 @@ public function setDefaultAddressPools(array $defaultAddressPools): self return $this; } + /** + * Information about the daemon's firewalling configuration. + * + * This field is currently only used on Linux, and omitted on other platforms. + * + * @return FirewallInfo|null + */ + public function getFirewallBackend(): ?FirewallInfo + { + return $this->firewallBackend; + } + + /** + * Information about the daemon's firewalling configuration. + * + * This field is currently only used on Linux, and omitted on other platforms. + * + * @param FirewallInfo|null $firewallBackend + * + * @return self + */ + public function setFirewallBackend(?FirewallInfo $firewallBackend): self + { + $this->initialized['firewallBackend'] = true; + $this->firewallBackend = $firewallBackend; + + return $this; + } + + /** + * List of devices discovered by device drivers. + * + * Each device includes information about its source driver, kind, name, + * and additional driver-specific attributes. + * + * @return list + */ + public function getDiscoveredDevices(): array + { + return $this->discoveredDevices; + } + + /** + * List of devices discovered by device drivers. + * + * Each device includes information about its source driver, kind, name, + * and additional driver-specific attributes. + * + * @param list $discoveredDevices + * + * @return self + */ + public function setDiscoveredDevices(array $discoveredDevices): self + { + $this->initialized['discoveredDevices'] = true; + $this->discoveredDevices = $discoveredDevices; + + return $this; + } + /** * List of warnings / informational messages about missing features, or * issues related to the daemon configuration. diff --git a/generated/Model/SystemVersionComponentsItem.php b/generated/Model/SystemVersionComponentsItem.php index a72ef8a..8b371a4 100644 --- a/generated/Model/SystemVersionComponentsItem.php +++ b/generated/Model/SystemVersionComponentsItem.php @@ -37,7 +37,7 @@ public function isInitialized($property): bool * * These messages can be printed by the client as information to the user. * - * @var SystemVersionComponentsItemDetails|null + * @var array|null */ protected $details; @@ -99,9 +99,9 @@ public function setVersion(string $version): self * * These messages can be printed by the client as information to the user. * - * @return SystemVersionComponentsItemDetails|null + * @return array|null */ - public function getDetails(): ?SystemVersionComponentsItemDetails + public function getDetails(): ?iterable { return $this->details; } @@ -114,11 +114,11 @@ public function getDetails(): ?SystemVersionComponentsItemDetails * * These messages can be printed by the client as information to the user. * - * @param SystemVersionComponentsItemDetails|null $details + * @param array|null $details * * @return self */ - public function setDetails(?SystemVersionComponentsItemDetails $details): self + public function setDetails(?iterable $details): self { $this->initialized['details'] = true; $this->details = $details; diff --git a/generated/Model/SystemVersionComponentsItemDetails.php b/generated/Model/SystemVersionComponentsItemDetails.php deleted file mode 100644 index 9b47de1..0000000 --- a/generated/Model/SystemVersionComponentsItemDetails.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/TaskSpec.php b/generated/Model/TaskSpec.php index f9b774c..66b2a4d 100644 --- a/generated/Model/TaskSpec.php +++ b/generated/Model/TaskSpec.php @@ -54,7 +54,7 @@ public function isInitialized($property): bool * > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime * > field is set to `attachment`. * - * @var TaskSpecNetworkAttachmentSpec|null + * @var TaskSpecNetworkAttachmentSpec */ protected $networkAttachmentSpec; /** @@ -91,7 +91,7 @@ public function isInitialized($property): bool /** * Specifies which networks the service should attach to. * - * @var list + * @var list|null */ protected $networks; /** @@ -192,9 +192,9 @@ public function setContainerSpec(TaskSpecContainerSpec $containerSpec): self * > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime * > field is set to `attachment`. * - * @return TaskSpecNetworkAttachmentSpec|null + * @return TaskSpecNetworkAttachmentSpec */ - public function getNetworkAttachmentSpec(): ?TaskSpecNetworkAttachmentSpec + public function getNetworkAttachmentSpec(): TaskSpecNetworkAttachmentSpec { return $this->networkAttachmentSpec; } @@ -210,11 +210,11 @@ public function getNetworkAttachmentSpec(): ?TaskSpecNetworkAttachmentSpec * > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime * > field is set to `attachment`. * - * @param TaskSpecNetworkAttachmentSpec|null $networkAttachmentSpec + * @param TaskSpecNetworkAttachmentSpec $networkAttachmentSpec * * @return self */ - public function setNetworkAttachmentSpec(?TaskSpecNetworkAttachmentSpec $networkAttachmentSpec): self + public function setNetworkAttachmentSpec(TaskSpecNetworkAttachmentSpec $networkAttachmentSpec): self { $this->initialized['networkAttachmentSpec'] = true; $this->networkAttachmentSpec = $networkAttachmentSpec; @@ -352,9 +352,9 @@ public function setRuntime(string $runtime): self /** * Specifies which networks the service should attach to. * - * @return list + * @return list|null */ - public function getNetworks(): array + public function getNetworks(): ?array { return $this->networks; } @@ -362,11 +362,11 @@ public function getNetworks(): array /** * Specifies which networks the service should attach to. * - * @param list $networks + * @param list|null $networks * * @return self */ - public function setNetworks(array $networks): self + public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; $this->networks = $networks; diff --git a/generated/Model/TaskSpecContainerSpec.php b/generated/Model/TaskSpecContainerSpec.php index d86d15b..417d417 100644 --- a/generated/Model/TaskSpecContainerSpec.php +++ b/generated/Model/TaskSpecContainerSpec.php @@ -205,7 +205,7 @@ public function isInitialized($property): bool /** * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`". * - * @var list|null + * @var list */ protected $ulimits; @@ -933,9 +933,9 @@ public function setCapabilityDrop(array $capabilityDrop): self /** * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`". * - * @return list|null + * @return list */ - public function getUlimits(): ?array + public function getUlimits(): array { return $this->ulimits; } @@ -943,11 +943,11 @@ public function getUlimits(): ?array /** * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`". * - * @param list|null $ulimits + * @param list $ulimits * * @return self */ - public function setUlimits(?array $ulimits): self + public function setUlimits(array $ulimits): self { $this->initialized['ulimits'] = true; $this->ulimits = $ulimits; diff --git a/generated/Model/TaskSpecContainerSpecConfigsItem.php b/generated/Model/TaskSpecContainerSpecConfigsItem.php index 163eeac..e198f46 100644 --- a/generated/Model/TaskSpecContainerSpecConfigsItem.php +++ b/generated/Model/TaskSpecContainerSpecConfigsItem.php @@ -36,7 +36,7 @@ public function isInitialized($property): bool * > **Note**: `Configs.File` and `Configs.Runtime` are mutually * > exclusive * - * @var TaskSpecContainerSpecConfigsItemRuntime + * @var array */ protected $runtime; /** @@ -97,9 +97,9 @@ public function setFile(TaskSpecContainerSpecConfigsItemFile $file): self * > **Note**: `Configs.File` and `Configs.Runtime` are mutually * > exclusive * - * @return TaskSpecContainerSpecConfigsItemRuntime + * @return array */ - public function getRuntime(): TaskSpecContainerSpecConfigsItemRuntime + public function getRuntime(): iterable { return $this->runtime; } @@ -113,11 +113,11 @@ public function getRuntime(): TaskSpecContainerSpecConfigsItemRuntime * > **Note**: `Configs.File` and `Configs.Runtime` are mutually * > exclusive * - * @param TaskSpecContainerSpecConfigsItemRuntime $runtime + * @param array $runtime * * @return self */ - public function setRuntime(TaskSpecContainerSpecConfigsItemRuntime $runtime): self + public function setRuntime(iterable $runtime): self { $this->initialized['runtime'] = true; $this->runtime = $runtime; diff --git a/generated/Model/TaskSpecContainerSpecConfigsItemRuntime.php b/generated/Model/TaskSpecContainerSpecConfigsItemRuntime.php deleted file mode 100644 index 652f538..0000000 --- a/generated/Model/TaskSpecContainerSpecConfigsItemRuntime.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Model/Volume.php b/generated/Model/Volume.php index 6e42944..ad51bf5 100644 --- a/generated/Model/Volume.php +++ b/generated/Model/Volume.php @@ -49,7 +49,7 @@ public function isInitialized($property): bool * The `Status` field is optional, and is omitted if the volume driver * does not support this feature. * - * @var array + * @var array> */ protected $status; /** @@ -194,7 +194,7 @@ public function setCreatedAt(string $createdAt): self * The `Status` field is optional, and is omitted if the volume driver * does not support this feature. * - * @return array + * @return array> */ public function getStatus(): iterable { @@ -209,7 +209,7 @@ public function getStatus(): iterable * The `Status` field is optional, and is omitted if the volume driver * does not support this feature. * - * @param array $status + * @param array> $status * * @return self */ diff --git a/generated/Model/VolumeListResponse.php b/generated/Model/VolumeListResponse.php index 3a66fd1..9a0ca03 100644 --- a/generated/Model/VolumeListResponse.php +++ b/generated/Model/VolumeListResponse.php @@ -20,7 +20,7 @@ public function isInitialized($property): bool /** * List of volumes. * - * @var list|null + * @var list */ protected $volumes; /** @@ -33,9 +33,9 @@ public function isInitialized($property): bool /** * List of volumes. * - * @return list|null + * @return list */ - public function getVolumes(): ?array + public function getVolumes(): array { return $this->volumes; } @@ -43,11 +43,11 @@ public function getVolumes(): ?array /** * List of volumes. * - * @param list|null $volumes + * @param list $volumes * * @return self */ - public function setVolumes(?array $volumes): self + public function setVolumes(array $volumes): self { $this->initialized['volumes'] = true; $this->volumes = $volumes; diff --git a/generated/Model/VolumeStatusItem.php b/generated/Model/VolumeStatusItem.php deleted file mode 100644 index 64abb6e..0000000 --- a/generated/Model/VolumeStatusItem.php +++ /dev/null @@ -1,20 +0,0 @@ -initialized); - } -} diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php b/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php index 2b4a05f..7c90577 100644 --- a/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php +++ b/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php @@ -56,15 +56,19 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['Sharing']); } if (array_key_exists('MountVolume', $data)) { - $object->setMountVolume($this->denormalizer->denormalize($data['MountVolume'], \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class, 'json', $context)); + $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['MountVolume'] as $key => $value) { + $values[$key] = $value; + } + $object->setMountVolume($values); unset($data['MountVolume']); } if (array_key_exists('Secrets', $data)) { - $values = []; - foreach ($data['Secrets'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeSecretsItem::class, 'json', $context); + $values_1 = []; + foreach ($data['Secrets'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeSecretsItem::class, 'json', $context); } - $object->setSecrets($values); + $object->setSecrets($values_1); unset($data['Secrets']); } if (array_key_exists('AccessibilityRequirements', $data)) { @@ -79,9 +83,9 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setAvailability($data['Availability']); unset($data['Availability']); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } } @@ -98,14 +102,18 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Sharing'] = $data->getSharing(); } if ($data->isInitialized('mountVolume') && null !== $data->getMountVolume()) { - $dataArray['MountVolume'] = $this->normalizer->normalize($data->getMountVolume(), 'json', $context); + $values = []; + foreach ($data->getMountVolume() as $key => $value) { + $values[$key] = $value; + } + $dataArray['MountVolume'] = $values; } if ($data->isInitialized('secrets') && null !== $data->getSecrets()) { - $values = []; - foreach ($data->getSecrets() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values_1 = []; + foreach ($data->getSecrets() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $dataArray['Secrets'] = $values; + $dataArray['Secrets'] = $values_1; } if ($data->isInitialized('accessibilityRequirements') && null !== $data->getAccessibilityRequirements()) { $dataArray['AccessibilityRequirements'] = $this->normalizer->normalize($data->getAccessibilityRequirements(), 'json', $context); @@ -116,9 +124,9 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('availability') && null !== $data->getAvailability()) { $dataArray['Availability'] = $data->getAvailability(); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value_1; + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } } diff --git a/generated/Normalizer/CommitNormalizer.php b/generated/Normalizer/CommitNormalizer.php index 6eb87b6..b6240b5 100644 --- a/generated/Normalizer/CommitNormalizer.php +++ b/generated/Normalizer/CommitNormalizer.php @@ -51,10 +51,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setID($data['ID']); unset($data['ID']); } - if (array_key_exists('Expected', $data)) { - $object->setExpected($data['Expected']); - unset($data['Expected']); - } foreach ($data as $key => $value) { if (preg_match('/.*/', (string) $key)) { $object[$key] = $value; @@ -70,9 +66,6 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('iD') && null !== $data->getID()) { $dataArray['ID'] = $data->getID(); } - if ($data->isInitialized('expected') && null !== $data->getExpected()) { - $dataArray['Expected'] = $data->getExpected(); - } foreach ($data as $key => $value) { if (preg_match('/.*/', (string) $key)) { $dataArray[$key] = $value; diff --git a/generated/Normalizer/ContainerConfigNormalizer.php b/generated/Normalizer/ContainerConfigNormalizer.php index 52268f6..00a53b1 100644 --- a/generated/Normalizer/ContainerConfigNormalizer.php +++ b/generated/Normalizer/ContainerConfigNormalizer.php @@ -99,7 +99,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (array_key_exists('ExposedPorts', $data) && null !== $data['ExposedPorts']) { $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['ExposedPorts'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class, 'json', $context); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $object->setExposedPorts($values); unset($data['ExposedPorts']); @@ -118,22 +122,20 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setStdinOnce($data['StdinOnce']); unset($data['StdinOnce']); } - if (array_key_exists('Env', $data) && null !== $data['Env']) { - $values_1 = []; - foreach ($data['Env'] as $value_1) { - $values_1[] = $value_1; + if (array_key_exists('Env', $data)) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $value_2; } - $object->setEnv($values_1); + $object->setEnv($values_2); unset($data['Env']); - } elseif (array_key_exists('Env', $data) && null === $data['Env']) { - $object->setEnv(null); } if (array_key_exists('Cmd', $data) && null !== $data['Cmd']) { - $values_2 = []; - foreach ($data['Cmd'] as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data['Cmd'] as $value_3) { + $values_3[] = $value_3; } - $object->setCmd($values_2); + $object->setCmd($values_3); unset($data['Cmd']); } elseif (array_key_exists('Cmd', $data) && null === $data['Cmd']) { $object->setCmd(null); @@ -153,11 +155,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['Image']); } if (array_key_exists('Volumes', $data) && null !== $data['Volumes']) { - $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Volumes'] as $key_1 => $value_3) { - $values_3[$key_1] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\ContainerConfigVolumesItem::class, 'json', $context); + $values_4 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_2 => $value_4) { + $values_5 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $object->setVolumes($values_3); + $object->setVolumes($values_4); unset($data['Volumes']); } elseif (array_key_exists('Volumes', $data) && null === $data['Volumes']) { $object->setVolumes(null); @@ -167,11 +173,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['WorkingDir']); } if (array_key_exists('Entrypoint', $data) && null !== $data['Entrypoint']) { - $values_4 = []; - foreach ($data['Entrypoint'] as $value_4) { - $values_4[] = $value_4; + $values_6 = []; + foreach ($data['Entrypoint'] as $value_6) { + $values_6[] = $value_6; } - $object->setEntrypoint($values_4); + $object->setEntrypoint($values_6); unset($data['Entrypoint']); } elseif (array_key_exists('Entrypoint', $data) && null === $data['Entrypoint']) { $object->setEntrypoint(null); @@ -189,21 +195,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setMacAddress(null); } if (array_key_exists('OnBuild', $data) && null !== $data['OnBuild']) { - $values_5 = []; - foreach ($data['OnBuild'] as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data['OnBuild'] as $value_7) { + $values_7[] = $value_7; } - $object->setOnBuild($values_5); + $object->setOnBuild($values_7); unset($data['OnBuild']); } elseif (array_key_exists('OnBuild', $data) && null === $data['OnBuild']) { $object->setOnBuild(null); } if (array_key_exists('Labels', $data)) { - $values_6 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $object->setLabels($values_6); + $object->setLabels($values_8); unset($data['Labels']); } if (array_key_exists('StopSignal', $data) && null !== $data['StopSignal']) { @@ -219,18 +225,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setStopTimeout(null); } if (array_key_exists('Shell', $data) && null !== $data['Shell']) { - $values_7 = []; - foreach ($data['Shell'] as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data['Shell'] as $value_9) { + $values_9[] = $value_9; } - $object->setShell($values_7); + $object->setShell($values_9); unset($data['Shell']); } elseif (array_key_exists('Shell', $data) && null === $data['Shell']) { $object->setShell(null); } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $object[$key_5] = $value_10; } } @@ -261,7 +267,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('exposedPorts') && null !== $data->getExposedPorts()) { $values = []; foreach ($data->getExposedPorts() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $dataArray['ExposedPorts'] = $values; } @@ -275,18 +285,18 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['StdinOnce'] = $data->getStdinOnce(); } if ($data->isInitialized('env') && null !== $data->getEnv()) { - $values_1 = []; - foreach ($data->getEnv() as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data->getEnv() as $value_2) { + $values_2[] = $value_2; } - $dataArray['Env'] = $values_1; + $dataArray['Env'] = $values_2; } if ($data->isInitialized('cmd') && null !== $data->getCmd()) { - $values_2 = []; - foreach ($data->getCmd() as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data->getCmd() as $value_3) { + $values_3[] = $value_3; } - $dataArray['Cmd'] = $values_2; + $dataArray['Cmd'] = $values_3; } if ($data->isInitialized('healthcheck') && null !== $data->getHealthcheck()) { $dataArray['Healthcheck'] = $this->normalizer->normalize($data->getHealthcheck(), 'json', $context); @@ -298,21 +308,25 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Image'] = $data->getImage(); } if ($data->isInitialized('volumes') && null !== $data->getVolumes()) { - $values_3 = []; - foreach ($data->getVolumes() as $key_1 => $value_3) { - $values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context); + $values_4 = []; + foreach ($data->getVolumes() as $key_2 => $value_4) { + $values_5 = []; + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $dataArray['Volumes'] = $values_3; + $dataArray['Volumes'] = $values_4; } if ($data->isInitialized('workingDir') && null !== $data->getWorkingDir()) { $dataArray['WorkingDir'] = $data->getWorkingDir(); } if ($data->isInitialized('entrypoint') && null !== $data->getEntrypoint()) { - $values_4 = []; - foreach ($data->getEntrypoint() as $value_4) { - $values_4[] = $value_4; + $values_6 = []; + foreach ($data->getEntrypoint() as $value_6) { + $values_6[] = $value_6; } - $dataArray['Entrypoint'] = $values_4; + $dataArray['Entrypoint'] = $values_6; } if ($data->isInitialized('networkDisabled') && null !== $data->getNetworkDisabled()) { $dataArray['NetworkDisabled'] = $data->getNetworkDisabled(); @@ -321,18 +335,18 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['MacAddress'] = $data->getMacAddress(); } if ($data->isInitialized('onBuild') && null !== $data->getOnBuild()) { - $values_5 = []; - foreach ($data->getOnBuild() as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data->getOnBuild() as $value_7) { + $values_7[] = $value_7; } - $dataArray['OnBuild'] = $values_5; + $dataArray['OnBuild'] = $values_7; } if ($data->isInitialized('labels') && null !== $data->getLabels()) { - $values_6 = []; - foreach ($data->getLabels() as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = []; + foreach ($data->getLabels() as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $dataArray['Labels'] = $values_6; + $dataArray['Labels'] = $values_8; } if ($data->isInitialized('stopSignal') && null !== $data->getStopSignal()) { $dataArray['StopSignal'] = $data->getStopSignal(); @@ -341,15 +355,15 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['StopTimeout'] = $data->getStopTimeout(); } if ($data->isInitialized('shell') && null !== $data->getShell()) { - $values_7 = []; - foreach ($data->getShell() as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data->getShell() as $value_9) { + $values_9[] = $value_9; } - $dataArray['Shell'] = $values_7; + $dataArray['Shell'] = $values_9; } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $dataArray[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $dataArray[$key_5] = $value_10; } } diff --git a/generated/Normalizer/ContainerConfigVolumesItemNormalizer.php b/generated/Normalizer/ContainerConfigVolumesItemNormalizer.php deleted file mode 100644 index 6fc8040..0000000 --- a/generated/Normalizer/ContainerConfigVolumesItemNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\ContainerConfigVolumesItem::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/ContainerInspectResponseNormalizer.php b/generated/Normalizer/ContainerInspectResponseNormalizer.php index 10c41b0..35b9aca 100644 --- a/generated/Normalizer/ContainerInspectResponseNormalizer.php +++ b/generated/Normalizer/ContainerInspectResponseNormalizer.php @@ -139,9 +139,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('ExecIDs', $data) && null === $data['ExecIDs']) { $object->setExecIDs(null); } - if (array_key_exists('HostConfig', $data)) { + if (array_key_exists('HostConfig', $data) && null !== $data['HostConfig']) { $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \WebProject\DockerApi\Library\Generated\Model\HostConfig::class, 'json', $context)); unset($data['HostConfig']); + } elseif (array_key_exists('HostConfig', $data) && null === $data['HostConfig']) { + $object->setHostConfig(null); } if (array_key_exists('GraphDriver', $data)) { $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \WebProject\DockerApi\Library\Generated\Model\DriverData::class, 'json', $context)); diff --git a/generated/Normalizer/ContainerStatsResponseNormalizer.php b/generated/Normalizer/ContainerStatsResponseNormalizer.php index 3c53082..365d2ac 100644 --- a/generated/Normalizer/ContainerStatsResponseNormalizer.php +++ b/generated/Normalizer/ContainerStatsResponseNormalizer.php @@ -107,18 +107,14 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['memory_stats']); } if (array_key_exists('networks', $data) && null !== $data['networks']) { - $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['networks'] as $key => $value) { - $values[$key] = $value; - } - $object->setNetworks($values); + $object->setNetworks($data['networks']); unset($data['networks']); } elseif (array_key_exists('networks', $data) && null === $data['networks']) { $object->setNetworks(null); } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } } @@ -162,15 +158,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['memory_stats'] = $this->normalizer->normalize($data->getMemoryStats(), 'json', $context); } if ($data->isInitialized('networks') && null !== $data->getNetworks()) { - $values = []; - foreach ($data->getNetworks() as $key => $value) { - $values[$key] = $value; - } - $dataArray['networks'] = $values; + $dataArray['networks'] = $data->getNetworks(); } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $dataArray[$key_1] = $value_1; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } } diff --git a/generated/Normalizer/ContainerSummaryNormalizer.php b/generated/Normalizer/ContainerSummaryNormalizer.php index 340ac1e..a2beb73 100644 --- a/generated/Normalizer/ContainerSummaryNormalizer.php +++ b/generated/Normalizer/ContainerSummaryNormalizer.php @@ -79,15 +79,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setCreated($data['Created']); unset($data['Created']); } - if (array_key_exists('Ports', $data) && null !== $data['Ports']) { + if (array_key_exists('Ports', $data)) { $values_1 = []; foreach ($data['Ports'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\Port::class, 'json', $context); } $object->setPorts($values_1); unset($data['Ports']); - } elseif (array_key_exists('Ports', $data) && null === $data['Ports']) { - $object->setPorts(null); } if (array_key_exists('SizeRw', $data) && null !== $data['SizeRw']) { $object->setSizeRw($data['SizeRw']); diff --git a/generated/Normalizer/ContainersCreatePostBodyNormalizer.php b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php index d15dcb1..9765dfb 100644 --- a/generated/Normalizer/ContainersCreatePostBodyNormalizer.php +++ b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php @@ -99,7 +99,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (array_key_exists('ExposedPorts', $data) && null !== $data['ExposedPorts']) { $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['ExposedPorts'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class, 'json', $context); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $object->setExposedPorts($values); unset($data['ExposedPorts']); @@ -118,22 +122,20 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setStdinOnce($data['StdinOnce']); unset($data['StdinOnce']); } - if (array_key_exists('Env', $data) && null !== $data['Env']) { - $values_1 = []; - foreach ($data['Env'] as $value_1) { - $values_1[] = $value_1; + if (array_key_exists('Env', $data)) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $value_2; } - $object->setEnv($values_1); + $object->setEnv($values_2); unset($data['Env']); - } elseif (array_key_exists('Env', $data) && null === $data['Env']) { - $object->setEnv(null); } if (array_key_exists('Cmd', $data) && null !== $data['Cmd']) { - $values_2 = []; - foreach ($data['Cmd'] as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data['Cmd'] as $value_3) { + $values_3[] = $value_3; } - $object->setCmd($values_2); + $object->setCmd($values_3); unset($data['Cmd']); } elseif (array_key_exists('Cmd', $data) && null === $data['Cmd']) { $object->setCmd(null); @@ -153,11 +155,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['Image']); } if (array_key_exists('Volumes', $data) && null !== $data['Volumes']) { - $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Volumes'] as $key_1 => $value_3) { - $values_3[$key_1] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\ContainerConfigVolumesItem::class, 'json', $context); + $values_4 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_2 => $value_4) { + $values_5 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $object->setVolumes($values_3); + $object->setVolumes($values_4); unset($data['Volumes']); } elseif (array_key_exists('Volumes', $data) && null === $data['Volumes']) { $object->setVolumes(null); @@ -167,11 +173,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['WorkingDir']); } if (array_key_exists('Entrypoint', $data) && null !== $data['Entrypoint']) { - $values_4 = []; - foreach ($data['Entrypoint'] as $value_4) { - $values_4[] = $value_4; + $values_6 = []; + foreach ($data['Entrypoint'] as $value_6) { + $values_6[] = $value_6; } - $object->setEntrypoint($values_4); + $object->setEntrypoint($values_6); unset($data['Entrypoint']); } elseif (array_key_exists('Entrypoint', $data) && null === $data['Entrypoint']) { $object->setEntrypoint(null); @@ -189,21 +195,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setMacAddress(null); } if (array_key_exists('OnBuild', $data) && null !== $data['OnBuild']) { - $values_5 = []; - foreach ($data['OnBuild'] as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data['OnBuild'] as $value_7) { + $values_7[] = $value_7; } - $object->setOnBuild($values_5); + $object->setOnBuild($values_7); unset($data['OnBuild']); } elseif (array_key_exists('OnBuild', $data) && null === $data['OnBuild']) { $object->setOnBuild(null); } if (array_key_exists('Labels', $data)) { - $values_6 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $object->setLabels($values_6); + $object->setLabels($values_8); unset($data['Labels']); } if (array_key_exists('StopSignal', $data) && null !== $data['StopSignal']) { @@ -219,26 +225,28 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setStopTimeout(null); } if (array_key_exists('Shell', $data) && null !== $data['Shell']) { - $values_7 = []; - foreach ($data['Shell'] as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data['Shell'] as $value_9) { + $values_9[] = $value_9; } - $object->setShell($values_7); + $object->setShell($values_9); unset($data['Shell']); } elseif (array_key_exists('Shell', $data) && null === $data['Shell']) { $object->setShell(null); } - if (array_key_exists('HostConfig', $data)) { + if (array_key_exists('HostConfig', $data) && null !== $data['HostConfig']) { $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \WebProject\DockerApi\Library\Generated\Model\HostConfig::class, 'json', $context)); unset($data['HostConfig']); + } elseif (array_key_exists('HostConfig', $data) && null === $data['HostConfig']) { + $object->setHostConfig(null); } if (array_key_exists('NetworkingConfig', $data)) { $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \WebProject\DockerApi\Library\Generated\Model\NetworkingConfig::class, 'json', $context)); unset($data['NetworkingConfig']); } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $object[$key_5] = $value_10; } } @@ -269,7 +277,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('exposedPorts') && null !== $data->getExposedPorts()) { $values = []; foreach ($data->getExposedPorts() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $dataArray['ExposedPorts'] = $values; } @@ -283,18 +295,18 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['StdinOnce'] = $data->getStdinOnce(); } if ($data->isInitialized('env') && null !== $data->getEnv()) { - $values_1 = []; - foreach ($data->getEnv() as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data->getEnv() as $value_2) { + $values_2[] = $value_2; } - $dataArray['Env'] = $values_1; + $dataArray['Env'] = $values_2; } if ($data->isInitialized('cmd') && null !== $data->getCmd()) { - $values_2 = []; - foreach ($data->getCmd() as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data->getCmd() as $value_3) { + $values_3[] = $value_3; } - $dataArray['Cmd'] = $values_2; + $dataArray['Cmd'] = $values_3; } if ($data->isInitialized('healthcheck') && null !== $data->getHealthcheck()) { $dataArray['Healthcheck'] = $this->normalizer->normalize($data->getHealthcheck(), 'json', $context); @@ -306,21 +318,25 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Image'] = $data->getImage(); } if ($data->isInitialized('volumes') && null !== $data->getVolumes()) { - $values_3 = []; - foreach ($data->getVolumes() as $key_1 => $value_3) { - $values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context); + $values_4 = []; + foreach ($data->getVolumes() as $key_2 => $value_4) { + $values_5 = []; + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $dataArray['Volumes'] = $values_3; + $dataArray['Volumes'] = $values_4; } if ($data->isInitialized('workingDir') && null !== $data->getWorkingDir()) { $dataArray['WorkingDir'] = $data->getWorkingDir(); } if ($data->isInitialized('entrypoint') && null !== $data->getEntrypoint()) { - $values_4 = []; - foreach ($data->getEntrypoint() as $value_4) { - $values_4[] = $value_4; + $values_6 = []; + foreach ($data->getEntrypoint() as $value_6) { + $values_6[] = $value_6; } - $dataArray['Entrypoint'] = $values_4; + $dataArray['Entrypoint'] = $values_6; } if ($data->isInitialized('networkDisabled') && null !== $data->getNetworkDisabled()) { $dataArray['NetworkDisabled'] = $data->getNetworkDisabled(); @@ -329,18 +345,18 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['MacAddress'] = $data->getMacAddress(); } if ($data->isInitialized('onBuild') && null !== $data->getOnBuild()) { - $values_5 = []; - foreach ($data->getOnBuild() as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data->getOnBuild() as $value_7) { + $values_7[] = $value_7; } - $dataArray['OnBuild'] = $values_5; + $dataArray['OnBuild'] = $values_7; } if ($data->isInitialized('labels') && null !== $data->getLabels()) { - $values_6 = []; - foreach ($data->getLabels() as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = []; + foreach ($data->getLabels() as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $dataArray['Labels'] = $values_6; + $dataArray['Labels'] = $values_8; } if ($data->isInitialized('stopSignal') && null !== $data->getStopSignal()) { $dataArray['StopSignal'] = $data->getStopSignal(); @@ -349,11 +365,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['StopTimeout'] = $data->getStopTimeout(); } if ($data->isInitialized('shell') && null !== $data->getShell()) { - $values_7 = []; - foreach ($data->getShell() as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data->getShell() as $value_9) { + $values_9[] = $value_9; } - $dataArray['Shell'] = $values_7; + $dataArray['Shell'] = $values_9; } if ($data->isInitialized('hostConfig') && null !== $data->getHostConfig()) { $dataArray['HostConfig'] = $this->normalizer->normalize($data->getHostConfig(), 'json', $context); @@ -361,9 +377,9 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('networkingConfig') && null !== $data->getNetworkingConfig()) { $dataArray['NetworkingConfig'] = $this->normalizer->normalize($data->getNetworkingConfig(), 'json', $context); } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $dataArray[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $dataArray[$key_5] = $value_10; } } diff --git a/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php index f52ac97..bd08db9 100644 --- a/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php +++ b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php @@ -124,29 +124,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setCpuPeriod($data['CpuPeriod']); unset($data['CpuPeriod']); } - if (array_key_exists('CpuQuota', $data) && null !== $data['CpuQuota']) { + if (array_key_exists('CpuQuota', $data)) { $object->setCpuQuota($data['CpuQuota']); unset($data['CpuQuota']); - } elseif (array_key_exists('CpuQuota', $data) && null === $data['CpuQuota']) { - $object->setCpuQuota(null); } - if (array_key_exists('CpuRealtimePeriod', $data) && null !== $data['CpuRealtimePeriod']) { + if (array_key_exists('CpuRealtimePeriod', $data)) { $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); unset($data['CpuRealtimePeriod']); - } elseif (array_key_exists('CpuRealtimePeriod', $data) && null === $data['CpuRealtimePeriod']) { - $object->setCpuRealtimePeriod(null); } - if (array_key_exists('CpuRealtimeRuntime', $data) && null !== $data['CpuRealtimeRuntime']) { + if (array_key_exists('CpuRealtimeRuntime', $data)) { $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); unset($data['CpuRealtimeRuntime']); - } elseif (array_key_exists('CpuRealtimeRuntime', $data) && null === $data['CpuRealtimeRuntime']) { - $object->setCpuRealtimeRuntime(null); } - if (array_key_exists('CpusetCpus', $data) && null !== $data['CpusetCpus']) { + if (array_key_exists('CpusetCpus', $data)) { $object->setCpusetCpus($data['CpusetCpus']); unset($data['CpusetCpus']); - } elseif (array_key_exists('CpusetCpus', $data) && null === $data['CpusetCpus']) { - $object->setCpusetCpus(null); } if (array_key_exists('CpusetMems', $data)) { $object->setCpusetMems($data['CpusetMems']); @@ -200,9 +192,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('MemorySwappiness', $data) && null === $data['MemorySwappiness']) { $object->setMemorySwappiness(null); } - if (array_key_exists('NanoCpus', $data)) { + if (array_key_exists('NanoCpus', $data) && null !== $data['NanoCpus']) { $object->setNanoCpus($data['NanoCpus']); unset($data['NanoCpus']); + } elseif (array_key_exists('NanoCpus', $data) && null === $data['NanoCpus']) { + $object->setNanoCpus(null); } if (array_key_exists('OomKillDisable', $data) && null !== $data['OomKillDisable']) { $object->setOomKillDisable($data['OomKillDisable']); @@ -232,21 +226,29 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('Ulimits', $data) && null === $data['Ulimits']) { $object->setUlimits(null); } - if (array_key_exists('CpuCount', $data)) { + if (array_key_exists('CpuCount', $data) && null !== $data['CpuCount']) { $object->setCpuCount($data['CpuCount']); unset($data['CpuCount']); + } elseif (array_key_exists('CpuCount', $data) && null === $data['CpuCount']) { + $object->setCpuCount(null); } - if (array_key_exists('CpuPercent', $data)) { + if (array_key_exists('CpuPercent', $data) && null !== $data['CpuPercent']) { $object->setCpuPercent($data['CpuPercent']); unset($data['CpuPercent']); + } elseif (array_key_exists('CpuPercent', $data) && null === $data['CpuPercent']) { + $object->setCpuPercent(null); } - if (array_key_exists('IOMaximumIOps', $data)) { + if (array_key_exists('IOMaximumIOps', $data) && null !== $data['IOMaximumIOps']) { $object->setIOMaximumIOps($data['IOMaximumIOps']); unset($data['IOMaximumIOps']); + } elseif (array_key_exists('IOMaximumIOps', $data) && null === $data['IOMaximumIOps']) { + $object->setIOMaximumIOps(null); } - if (array_key_exists('IOMaximumBandwidth', $data)) { + if (array_key_exists('IOMaximumBandwidth', $data) && null !== $data['IOMaximumBandwidth']) { $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); unset($data['IOMaximumBandwidth']); + } elseif (array_key_exists('IOMaximumBandwidth', $data) && null === $data['IOMaximumBandwidth']) { + $object->setIOMaximumBandwidth(null); } if (array_key_exists('RestartPolicy', $data)) { $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \WebProject\DockerApi\Library\Generated\Model\RestartPolicy::class, 'json', $context)); diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeMountVolumeNormalizer.php b/generated/Normalizer/DeviceInfoNormalizer.php similarity index 72% rename from generated/Normalizer/ClusterVolumeSpecAccessModeMountVolumeNormalizer.php rename to generated/Normalizer/DeviceInfoNormalizer.php index ea53d14..f7e5961 100644 --- a/generated/Normalizer/ClusterVolumeSpecAccessModeMountVolumeNormalizer.php +++ b/generated/Normalizer/DeviceInfoNormalizer.php @@ -13,11 +13,12 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use WebProject\DockerApi\Library\Generated\Runtime\Normalizer\CheckArray; use WebProject\DockerApi\Library\Generated\Runtime\Normalizer\ValidatorTrait; +use function array_key_exists; use function get_class; use function is_array; use function is_object; -class ClusterVolumeSpecAccessModeMountVolumeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DeviceInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use CheckArray; use DenormalizerAwareTrait; @@ -26,12 +27,12 @@ class ClusterVolumeSpecAccessModeMountVolumeNormalizer implements DenormalizerIn public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - return \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class === $type; + return \WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class === $type; } public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { - return is_object($data) && \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class === get_class($data); + return is_object($data) && \WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class === get_class($data); } public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed @@ -42,10 +43,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume(); + $object = new \WebProject\DockerApi\Library\Generated\Model\DeviceInfo(); if (null === $data || false === is_array($data)) { return $object; } + if (array_key_exists('Source', $data)) { + $object->setSource($data['Source']); + unset($data['Source']); + } + if (array_key_exists('ID', $data)) { + $object->setID($data['ID']); + unset($data['ID']); + } foreach ($data as $key => $value) { if (preg_match('/.*/', (string) $key)) { $object[$key] = $value; @@ -58,6 +67,12 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string { $dataArray = []; + if ($data->isInitialized('source') && null !== $data->getSource()) { + $dataArray['Source'] = $data->getSource(); + } + if ($data->isInitialized('iD') && null !== $data->getID()) { + $dataArray['ID'] = $data->getID(); + } foreach ($data as $key => $value) { if (preg_match('/.*/', (string) $key)) { $dataArray[$key] = $value; @@ -69,7 +84,7 @@ public function normalize(mixed $data, ?string $format = null, array $context = public function getSupportedTypes(?string $format = null): array { - return [\WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class => true]; + return [\WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class => true]; } public function hasCacheableSupportsMethod(): bool diff --git a/generated/Normalizer/EndpointIPAMConfigNormalizer.php b/generated/Normalizer/EndpointIPAMConfigNormalizer.php index a87ce2d..60f52e2 100644 --- a/generated/Normalizer/EndpointIPAMConfigNormalizer.php +++ b/generated/Normalizer/EndpointIPAMConfigNormalizer.php @@ -47,13 +47,17 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('IPv4Address', $data)) { + if (array_key_exists('IPv4Address', $data) && null !== $data['IPv4Address']) { $object->setIPv4Address($data['IPv4Address']); unset($data['IPv4Address']); + } elseif (array_key_exists('IPv4Address', $data) && null === $data['IPv4Address']) { + $object->setIPv4Address(null); } - if (array_key_exists('IPv6Address', $data)) { + if (array_key_exists('IPv6Address', $data) && null !== $data['IPv6Address']) { $object->setIPv6Address($data['IPv6Address']); unset($data['IPv6Address']); + } elseif (array_key_exists('IPv6Address', $data) && null === $data['IPv6Address']) { + $object->setIPv6Address(null); } if (array_key_exists('LinkLocalIPs', $data)) { $values = []; diff --git a/generated/Normalizer/EndpointSettingsNormalizer.php b/generated/Normalizer/EndpointSettingsNormalizer.php index 5f5bd29..a8c3e36 100644 --- a/generated/Normalizer/EndpointSettingsNormalizer.php +++ b/generated/Normalizer/EndpointSettingsNormalizer.php @@ -16,7 +16,6 @@ use function array_key_exists; use function get_class; use function is_array; -use function is_int; use function is_object; class EndpointSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface @@ -45,9 +44,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \WebProject\DockerApi\Library\Generated\Model\EndpointSettings(); - if (array_key_exists('GwPriority', $data) && is_int($data['GwPriority'])) { - $data['GwPriority'] = (float) $data['GwPriority']; - } if (null === $data || false === is_array($data)) { return $object; } diff --git a/generated/Normalizer/EndpointSpecNormalizer.php b/generated/Normalizer/EndpointSpecNormalizer.php index 8360ef9..dfba12a 100644 --- a/generated/Normalizer/EndpointSpecNormalizer.php +++ b/generated/Normalizer/EndpointSpecNormalizer.php @@ -51,15 +51,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setMode($data['Mode']); unset($data['Mode']); } - if (array_key_exists('Ports', $data) && null !== $data['Ports']) { + if (array_key_exists('Ports', $data)) { $values = []; foreach ($data['Ports'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\EndpointPortConfig::class, 'json', $context); } $object->setPorts($values); unset($data['Ports']); - } elseif (array_key_exists('Ports', $data) && null === $data['Ports']) { - $object->setPorts(null); } foreach ($data as $key => $value_1) { if (preg_match('/.*/', (string) $key)) { diff --git a/generated/Normalizer/ContainerConfigExposedPortsItemNormalizer.php b/generated/Normalizer/FirewallInfoNormalizer.php similarity index 57% rename from generated/Normalizer/ContainerConfigExposedPortsItemNormalizer.php rename to generated/Normalizer/FirewallInfoNormalizer.php index d7e3a77..e0a9c6f 100644 --- a/generated/Normalizer/ContainerConfigExposedPortsItemNormalizer.php +++ b/generated/Normalizer/FirewallInfoNormalizer.php @@ -13,11 +13,12 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use WebProject\DockerApi\Library\Generated\Runtime\Normalizer\CheckArray; use WebProject\DockerApi\Library\Generated\Runtime\Normalizer\ValidatorTrait; +use function array_key_exists; use function get_class; use function is_array; use function is_object; -class ContainerConfigExposedPortsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FirewallInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use CheckArray; use DenormalizerAwareTrait; @@ -26,12 +27,12 @@ class ContainerConfigExposedPortsItemNormalizer implements DenormalizerInterface public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - return \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class === $type; + return \WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class === $type; } public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { - return is_object($data) && \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class === get_class($data); + return is_object($data) && \WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class === get_class($data); } public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed @@ -42,13 +43,29 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem(); + $object = new \WebProject\DockerApi\Library\Generated\Model\FirewallInfo(); if (null === $data || false === is_array($data)) { return $object; } - foreach ($data as $key => $value) { + if (array_key_exists('Driver', $data)) { + $object->setDriver($data['Driver']); + unset($data['Driver']); + } + if (array_key_exists('Info', $data)) { + $values = []; + foreach ($data['Info'] as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $object->setInfo($values); + unset($data['Info']); + } + foreach ($data as $key => $value_2) { if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + $object[$key] = $value_2; } } @@ -58,9 +75,23 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string { $dataArray = []; - foreach ($data as $key => $value) { + if ($data->isInitialized('driver') && null !== $data->getDriver()) { + $dataArray['Driver'] = $data->getDriver(); + } + if ($data->isInitialized('info') && null !== $data->getInfo()) { + $values = []; + foreach ($data->getInfo() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $dataArray['Info'] = $values; + } + foreach ($data as $key => $value_2) { if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; + $dataArray[$key] = $value_2; } } @@ -69,7 +100,7 @@ public function normalize(mixed $data, ?string $format = null, array $context = public function getSupportedTypes(?string $format = null): array { - return [\WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class => true]; + return [\WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class => true]; } public function hasCacheableSupportsMethod(): bool diff --git a/generated/Normalizer/HealthNormalizer.php b/generated/Normalizer/HealthNormalizer.php index b37f65b..0254df2 100644 --- a/generated/Normalizer/HealthNormalizer.php +++ b/generated/Normalizer/HealthNormalizer.php @@ -55,13 +55,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setFailingStreak($data['FailingStreak']); unset($data['FailingStreak']); } - if (array_key_exists('Log', $data)) { + if (array_key_exists('Log', $data) && null !== $data['Log']) { $values = []; foreach ($data['Log'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\HealthcheckResult::class, 'json', $context); } $object->setLog($values); unset($data['Log']); + } elseif (array_key_exists('Log', $data) && null === $data['Log']) { + $object->setLog(null); } foreach ($data as $key => $value_1) { if (preg_match('/.*/', (string) $key)) { diff --git a/generated/Normalizer/HealthcheckResultNormalizer.php b/generated/Normalizer/HealthcheckResultNormalizer.php index 309fbc2..e14464f 100644 --- a/generated/Normalizer/HealthcheckResultNormalizer.php +++ b/generated/Normalizer/HealthcheckResultNormalizer.php @@ -4,7 +4,6 @@ namespace WebProject\DockerApi\Library\Generated\Normalizer; use ArrayObject; -use DateTime; use Jane\Component\JsonSchemaRuntime\Reference; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -48,23 +47,17 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('Start', $data) && null !== $data['Start']) { - $object->setStart(DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['Start'])); + if (array_key_exists('Start', $data)) { + $object->setStart($data['Start']); unset($data['Start']); - } elseif (array_key_exists('Start', $data) && null === $data['Start']) { - $object->setStart(null); } - if (array_key_exists('End', $data) && null !== $data['End']) { + if (array_key_exists('End', $data)) { $object->setEnd($data['End']); unset($data['End']); - } elseif (array_key_exists('End', $data) && null === $data['End']) { - $object->setEnd(null); } - if (array_key_exists('ExitCode', $data) && null !== $data['ExitCode']) { + if (array_key_exists('ExitCode', $data)) { $object->setExitCode($data['ExitCode']); unset($data['ExitCode']); - } elseif (array_key_exists('ExitCode', $data) && null === $data['ExitCode']) { - $object->setExitCode(null); } if (array_key_exists('Output', $data)) { $object->setOutput($data['Output']); @@ -83,7 +76,7 @@ public function normalize(mixed $data, ?string $format = null, array $context = { $dataArray = []; if ($data->isInitialized('start') && null !== $data->getStart()) { - $dataArray['Start'] = $data->getStart()->format('Y-m-d\TH:i:sP'); + $dataArray['Start'] = $data->getStart(); } if ($data->isInitialized('end') && null !== $data->getEnd()) { $dataArray['End'] = $data->getEnd(); diff --git a/generated/Normalizer/HostConfigNormalizer.php b/generated/Normalizer/HostConfigNormalizer.php index cb0de8e..20f1f56 100644 --- a/generated/Normalizer/HostConfigNormalizer.php +++ b/generated/Normalizer/HostConfigNormalizer.php @@ -136,29 +136,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setCpuPeriod($data['CpuPeriod']); unset($data['CpuPeriod']); } - if (array_key_exists('CpuQuota', $data) && null !== $data['CpuQuota']) { + if (array_key_exists('CpuQuota', $data)) { $object->setCpuQuota($data['CpuQuota']); unset($data['CpuQuota']); - } elseif (array_key_exists('CpuQuota', $data) && null === $data['CpuQuota']) { - $object->setCpuQuota(null); } - if (array_key_exists('CpuRealtimePeriod', $data) && null !== $data['CpuRealtimePeriod']) { + if (array_key_exists('CpuRealtimePeriod', $data)) { $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); unset($data['CpuRealtimePeriod']); - } elseif (array_key_exists('CpuRealtimePeriod', $data) && null === $data['CpuRealtimePeriod']) { - $object->setCpuRealtimePeriod(null); } - if (array_key_exists('CpuRealtimeRuntime', $data) && null !== $data['CpuRealtimeRuntime']) { + if (array_key_exists('CpuRealtimeRuntime', $data)) { $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); unset($data['CpuRealtimeRuntime']); - } elseif (array_key_exists('CpuRealtimeRuntime', $data) && null === $data['CpuRealtimeRuntime']) { - $object->setCpuRealtimeRuntime(null); } - if (array_key_exists('CpusetCpus', $data) && null !== $data['CpusetCpus']) { + if (array_key_exists('CpusetCpus', $data)) { $object->setCpusetCpus($data['CpusetCpus']); unset($data['CpusetCpus']); - } elseif (array_key_exists('CpusetCpus', $data) && null === $data['CpusetCpus']) { - $object->setCpusetCpus(null); } if (array_key_exists('CpusetMems', $data)) { $object->setCpusetMems($data['CpusetMems']); @@ -212,9 +204,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('MemorySwappiness', $data) && null === $data['MemorySwappiness']) { $object->setMemorySwappiness(null); } - if (array_key_exists('NanoCpus', $data)) { + if (array_key_exists('NanoCpus', $data) && null !== $data['NanoCpus']) { $object->setNanoCpus($data['NanoCpus']); unset($data['NanoCpus']); + } elseif (array_key_exists('NanoCpus', $data) && null === $data['NanoCpus']) { + $object->setNanoCpus(null); } if (array_key_exists('OomKillDisable', $data) && null !== $data['OomKillDisable']) { $object->setOomKillDisable($data['OomKillDisable']); @@ -244,21 +238,29 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('Ulimits', $data) && null === $data['Ulimits']) { $object->setUlimits(null); } - if (array_key_exists('CpuCount', $data)) { + if (array_key_exists('CpuCount', $data) && null !== $data['CpuCount']) { $object->setCpuCount($data['CpuCount']); unset($data['CpuCount']); + } elseif (array_key_exists('CpuCount', $data) && null === $data['CpuCount']) { + $object->setCpuCount(null); } - if (array_key_exists('CpuPercent', $data)) { + if (array_key_exists('CpuPercent', $data) && null !== $data['CpuPercent']) { $object->setCpuPercent($data['CpuPercent']); unset($data['CpuPercent']); + } elseif (array_key_exists('CpuPercent', $data) && null === $data['CpuPercent']) { + $object->setCpuPercent(null); } - if (array_key_exists('IOMaximumIOps', $data)) { + if (array_key_exists('IOMaximumIOps', $data) && null !== $data['IOMaximumIOps']) { $object->setIOMaximumIOps($data['IOMaximumIOps']); unset($data['IOMaximumIOps']); + } elseif (array_key_exists('IOMaximumIOps', $data) && null === $data['IOMaximumIOps']) { + $object->setIOMaximumIOps(null); } - if (array_key_exists('IOMaximumBandwidth', $data)) { + if (array_key_exists('IOMaximumBandwidth', $data) && null !== $data['IOMaximumBandwidth']) { $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); unset($data['IOMaximumBandwidth']); + } elseif (array_key_exists('IOMaximumBandwidth', $data) && null === $data['IOMaximumBandwidth']) { + $object->setIOMaximumBandwidth(null); } if (array_key_exists('Binds', $data) && null !== $data['Binds']) { $values_9 = []; @@ -285,7 +287,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (array_key_exists('PortBindings', $data) && null !== $data['PortBindings']) { $values_10 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['PortBindings'] as $key => $value_10) { - $values_10[$key] = $value_10; + $value_11 = $value_10; + if (is_array($value_10)) { + $value_11 = $this->denormalizer->denormalize($value_10, \WebProject\DockerApi\Library\Generated\Model\PortBinding::class, 'json', $context); + } + $values_10[$key] = $value_11; } $object->setPortBindings($values_10); unset($data['PortBindings']); @@ -306,8 +312,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('VolumesFrom', $data) && null !== $data['VolumesFrom']) { $values_11 = []; - foreach ($data['VolumesFrom'] as $value_11) { - $values_11[] = $value_11; + foreach ($data['VolumesFrom'] as $value_12) { + $values_11[] = $value_12; } $object->setVolumesFrom($values_11); unset($data['VolumesFrom']); @@ -316,8 +322,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('Mounts', $data) && null !== $data['Mounts']) { $values_12 = []; - foreach ($data['Mounts'] as $value_12) { - $values_12[] = $this->denormalizer->denormalize($value_12, \WebProject\DockerApi\Library\Generated\Model\Mount::class, 'json', $context); + foreach ($data['Mounts'] as $value_13) { + $values_12[] = $this->denormalizer->denormalize($value_13, \WebProject\DockerApi\Library\Generated\Model\Mount::class, 'json', $context); } $object->setMounts($values_12); unset($data['Mounts']); @@ -326,26 +332,28 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('ConsoleSize', $data) && null !== $data['ConsoleSize']) { $values_13 = []; - foreach ($data['ConsoleSize'] as $value_13) { - $values_13[] = $value_13; + foreach ($data['ConsoleSize'] as $value_14) { + $values_13[] = $value_14; } $object->setConsoleSize($values_13); unset($data['ConsoleSize']); } elseif (array_key_exists('ConsoleSize', $data) && null === $data['ConsoleSize']) { $object->setConsoleSize(null); } - if (array_key_exists('Annotations', $data)) { + if (array_key_exists('Annotations', $data) && null !== $data['Annotations']) { $values_14 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Annotations'] as $key_1 => $value_14) { - $values_14[$key_1] = $value_14; + foreach ($data['Annotations'] as $key_1 => $value_15) { + $values_14[$key_1] = $value_15; } $object->setAnnotations($values_14); unset($data['Annotations']); + } elseif (array_key_exists('Annotations', $data) && null === $data['Annotations']) { + $object->setAnnotations(null); } if (array_key_exists('CapAdd', $data) && null !== $data['CapAdd']) { $values_15 = []; - foreach ($data['CapAdd'] as $value_15) { - $values_15[] = $value_15; + foreach ($data['CapAdd'] as $value_16) { + $values_15[] = $value_16; } $object->setCapAdd($values_15); unset($data['CapAdd']); @@ -354,24 +362,22 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('CapDrop', $data) && null !== $data['CapDrop']) { $values_16 = []; - foreach ($data['CapDrop'] as $value_16) { - $values_16[] = $value_16; + foreach ($data['CapDrop'] as $value_17) { + $values_16[] = $value_17; } $object->setCapDrop($values_16); unset($data['CapDrop']); } elseif (array_key_exists('CapDrop', $data) && null === $data['CapDrop']) { $object->setCapDrop(null); } - if (array_key_exists('CgroupnsMode', $data) && null !== $data['CgroupnsMode']) { + if (array_key_exists('CgroupnsMode', $data)) { $object->setCgroupnsMode($data['CgroupnsMode']); unset($data['CgroupnsMode']); - } elseif (array_key_exists('CgroupnsMode', $data) && null === $data['CgroupnsMode']) { - $object->setCgroupnsMode(null); } if (array_key_exists('Dns', $data) && null !== $data['Dns']) { $values_17 = []; - foreach ($data['Dns'] as $value_17) { - $values_17[] = $value_17; + foreach ($data['Dns'] as $value_18) { + $values_17[] = $value_18; } $object->setDns($values_17); unset($data['Dns']); @@ -380,8 +386,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('DnsOptions', $data) && null !== $data['DnsOptions']) { $values_18 = []; - foreach ($data['DnsOptions'] as $value_18) { - $values_18[] = $value_18; + foreach ($data['DnsOptions'] as $value_19) { + $values_18[] = $value_19; } $object->setDnsOptions($values_18); unset($data['DnsOptions']); @@ -390,8 +396,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('DnsSearch', $data) && null !== $data['DnsSearch']) { $values_19 = []; - foreach ($data['DnsSearch'] as $value_19) { - $values_19[] = $value_19; + foreach ($data['DnsSearch'] as $value_20) { + $values_19[] = $value_20; } $object->setDnsSearch($values_19); unset($data['DnsSearch']); @@ -400,8 +406,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('ExtraHosts', $data) && null !== $data['ExtraHosts']) { $values_20 = []; - foreach ($data['ExtraHosts'] as $value_20) { - $values_20[] = $value_20; + foreach ($data['ExtraHosts'] as $value_21) { + $values_20[] = $value_21; } $object->setExtraHosts($values_20); unset($data['ExtraHosts']); @@ -410,8 +416,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('GroupAdd', $data) && null !== $data['GroupAdd']) { $values_21 = []; - foreach ($data['GroupAdd'] as $value_21) { - $values_21[] = $value_21; + foreach ($data['GroupAdd'] as $value_22) { + $values_21[] = $value_22; } $object->setGroupAdd($values_21); unset($data['GroupAdd']); @@ -424,27 +430,33 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('IpcMode', $data) && null === $data['IpcMode']) { $object->setIpcMode(null); } - if (array_key_exists('Cgroup', $data)) { + if (array_key_exists('Cgroup', $data) && null !== $data['Cgroup']) { $object->setCgroup($data['Cgroup']); unset($data['Cgroup']); + } elseif (array_key_exists('Cgroup', $data) && null === $data['Cgroup']) { + $object->setCgroup(null); } if (array_key_exists('Links', $data) && null !== $data['Links']) { $values_22 = []; - foreach ($data['Links'] as $value_22) { - $values_22[] = $value_22; + foreach ($data['Links'] as $value_23) { + $values_22[] = $value_23; } $object->setLinks($values_22); unset($data['Links']); } elseif (array_key_exists('Links', $data) && null === $data['Links']) { $object->setLinks(null); } - if (array_key_exists('OomScoreAdj', $data)) { + if (array_key_exists('OomScoreAdj', $data) && null !== $data['OomScoreAdj']) { $object->setOomScoreAdj($data['OomScoreAdj']); unset($data['OomScoreAdj']); + } elseif (array_key_exists('OomScoreAdj', $data) && null === $data['OomScoreAdj']) { + $object->setOomScoreAdj(null); } - if (array_key_exists('PidMode', $data)) { + if (array_key_exists('PidMode', $data) && null !== $data['PidMode']) { $object->setPidMode($data['PidMode']); unset($data['PidMode']); + } elseif (array_key_exists('PidMode', $data) && null === $data['PidMode']) { + $object->setPidMode(null); } if (array_key_exists('Privileged', $data)) { $object->setPrivileged($data['Privileged']); @@ -460,8 +472,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('SecurityOpt', $data) && null !== $data['SecurityOpt']) { $values_23 = []; - foreach ($data['SecurityOpt'] as $value_23) { - $values_23[] = $value_23; + foreach ($data['SecurityOpt'] as $value_24) { + $values_23[] = $value_24; } $object->setSecurityOpt($values_23); unset($data['SecurityOpt']); @@ -470,16 +482,16 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('StorageOpt', $data)) { $values_24 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['StorageOpt'] as $key_2 => $value_24) { - $values_24[$key_2] = $value_24; + foreach ($data['StorageOpt'] as $key_2 => $value_25) { + $values_24[$key_2] = $value_25; } $object->setStorageOpt($values_24); unset($data['StorageOpt']); } if (array_key_exists('Tmpfs', $data)) { $values_25 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Tmpfs'] as $key_3 => $value_25) { - $values_25[$key_3] = $value_25; + foreach ($data['Tmpfs'] as $key_3 => $value_26) { + $values_25[$key_3] = $value_26; } $object->setTmpfs($values_25); unset($data['Tmpfs']); @@ -498,8 +510,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('Sysctls', $data) && null !== $data['Sysctls']) { $values_26 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Sysctls'] as $key_4 => $value_26) { - $values_26[$key_4] = $value_26; + foreach ($data['Sysctls'] as $key_4 => $value_27) { + $values_26[$key_4] = $value_27; } $object->setSysctls($values_26); unset($data['Sysctls']); @@ -518,27 +530,25 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('MaskedPaths', $data) && null !== $data['MaskedPaths']) { $values_27 = []; - foreach ($data['MaskedPaths'] as $value_27) { - $values_27[] = $value_27; + foreach ($data['MaskedPaths'] as $value_28) { + $values_27[] = $value_28; } $object->setMaskedPaths($values_27); unset($data['MaskedPaths']); } elseif (array_key_exists('MaskedPaths', $data) && null === $data['MaskedPaths']) { $object->setMaskedPaths(null); } - if (array_key_exists('ReadonlyPaths', $data) && null !== $data['ReadonlyPaths']) { + if (array_key_exists('ReadonlyPaths', $data)) { $values_28 = []; - foreach ($data['ReadonlyPaths'] as $value_28) { - $values_28[] = $value_28; + foreach ($data['ReadonlyPaths'] as $value_29) { + $values_28[] = $value_29; } $object->setReadonlyPaths($values_28); unset($data['ReadonlyPaths']); - } elseif (array_key_exists('ReadonlyPaths', $data) && null === $data['ReadonlyPaths']) { - $object->setReadonlyPaths(null); } - foreach ($data as $key_5 => $value_29) { + foreach ($data as $key_5 => $value_30) { if (preg_match('/.*/', (string) $key_5)) { - $object[$key_5] = $value_29; + $object[$key_5] = $value_30; } } @@ -696,7 +706,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('portBindings') && null !== $data->getPortBindings()) { $values_10 = []; foreach ($data->getPortBindings() as $key => $value_10) { - $values_10[$key] = $value_10; + $value_11 = $value_10; + if (is_object($value_10)) { + $value_11 = $this->normalizer->normalize($value_10, 'json', $context); + } + $values_10[$key] = $value_11; } $dataArray['PortBindings'] = $values_10; } @@ -711,43 +725,43 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('volumesFrom') && null !== $data->getVolumesFrom()) { $values_11 = []; - foreach ($data->getVolumesFrom() as $value_11) { - $values_11[] = $value_11; + foreach ($data->getVolumesFrom() as $value_12) { + $values_11[] = $value_12; } $dataArray['VolumesFrom'] = $values_11; } if ($data->isInitialized('mounts') && null !== $data->getMounts()) { $values_12 = []; - foreach ($data->getMounts() as $value_12) { - $values_12[] = $this->normalizer->normalize($value_12, 'json', $context); + foreach ($data->getMounts() as $value_13) { + $values_12[] = $this->normalizer->normalize($value_13, 'json', $context); } $dataArray['Mounts'] = $values_12; } if ($data->isInitialized('consoleSize') && null !== $data->getConsoleSize()) { $values_13 = []; - foreach ($data->getConsoleSize() as $value_13) { - $values_13[] = $value_13; + foreach ($data->getConsoleSize() as $value_14) { + $values_13[] = $value_14; } $dataArray['ConsoleSize'] = $values_13; } if ($data->isInitialized('annotations') && null !== $data->getAnnotations()) { $values_14 = []; - foreach ($data->getAnnotations() as $key_1 => $value_14) { - $values_14[$key_1] = $value_14; + foreach ($data->getAnnotations() as $key_1 => $value_15) { + $values_14[$key_1] = $value_15; } $dataArray['Annotations'] = $values_14; } if ($data->isInitialized('capAdd') && null !== $data->getCapAdd()) { $values_15 = []; - foreach ($data->getCapAdd() as $value_15) { - $values_15[] = $value_15; + foreach ($data->getCapAdd() as $value_16) { + $values_15[] = $value_16; } $dataArray['CapAdd'] = $values_15; } if ($data->isInitialized('capDrop') && null !== $data->getCapDrop()) { $values_16 = []; - foreach ($data->getCapDrop() as $value_16) { - $values_16[] = $value_16; + foreach ($data->getCapDrop() as $value_17) { + $values_16[] = $value_17; } $dataArray['CapDrop'] = $values_16; } @@ -756,36 +770,36 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('dns') && null !== $data->getDns()) { $values_17 = []; - foreach ($data->getDns() as $value_17) { - $values_17[] = $value_17; + foreach ($data->getDns() as $value_18) { + $values_17[] = $value_18; } $dataArray['Dns'] = $values_17; } if ($data->isInitialized('dnsOptions') && null !== $data->getDnsOptions()) { $values_18 = []; - foreach ($data->getDnsOptions() as $value_18) { - $values_18[] = $value_18; + foreach ($data->getDnsOptions() as $value_19) { + $values_18[] = $value_19; } $dataArray['DnsOptions'] = $values_18; } if ($data->isInitialized('dnsSearch') && null !== $data->getDnsSearch()) { $values_19 = []; - foreach ($data->getDnsSearch() as $value_19) { - $values_19[] = $value_19; + foreach ($data->getDnsSearch() as $value_20) { + $values_19[] = $value_20; } $dataArray['DnsSearch'] = $values_19; } if ($data->isInitialized('extraHosts') && null !== $data->getExtraHosts()) { $values_20 = []; - foreach ($data->getExtraHosts() as $value_20) { - $values_20[] = $value_20; + foreach ($data->getExtraHosts() as $value_21) { + $values_20[] = $value_21; } $dataArray['ExtraHosts'] = $values_20; } if ($data->isInitialized('groupAdd') && null !== $data->getGroupAdd()) { $values_21 = []; - foreach ($data->getGroupAdd() as $value_21) { - $values_21[] = $value_21; + foreach ($data->getGroupAdd() as $value_22) { + $values_21[] = $value_22; } $dataArray['GroupAdd'] = $values_21; } @@ -797,8 +811,8 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('links') && null !== $data->getLinks()) { $values_22 = []; - foreach ($data->getLinks() as $value_22) { - $values_22[] = $value_22; + foreach ($data->getLinks() as $value_23) { + $values_22[] = $value_23; } $dataArray['Links'] = $values_22; } @@ -819,22 +833,22 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('securityOpt') && null !== $data->getSecurityOpt()) { $values_23 = []; - foreach ($data->getSecurityOpt() as $value_23) { - $values_23[] = $value_23; + foreach ($data->getSecurityOpt() as $value_24) { + $values_23[] = $value_24; } $dataArray['SecurityOpt'] = $values_23; } if ($data->isInitialized('storageOpt') && null !== $data->getStorageOpt()) { $values_24 = []; - foreach ($data->getStorageOpt() as $key_2 => $value_24) { - $values_24[$key_2] = $value_24; + foreach ($data->getStorageOpt() as $key_2 => $value_25) { + $values_24[$key_2] = $value_25; } $dataArray['StorageOpt'] = $values_24; } if ($data->isInitialized('tmpfs') && null !== $data->getTmpfs()) { $values_25 = []; - foreach ($data->getTmpfs() as $key_3 => $value_25) { - $values_25[$key_3] = $value_25; + foreach ($data->getTmpfs() as $key_3 => $value_26) { + $values_25[$key_3] = $value_26; } $dataArray['Tmpfs'] = $values_25; } @@ -849,8 +863,8 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('sysctls') && null !== $data->getSysctls()) { $values_26 = []; - foreach ($data->getSysctls() as $key_4 => $value_26) { - $values_26[$key_4] = $value_26; + foreach ($data->getSysctls() as $key_4 => $value_27) { + $values_26[$key_4] = $value_27; } $dataArray['Sysctls'] = $values_26; } @@ -862,21 +876,21 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('maskedPaths') && null !== $data->getMaskedPaths()) { $values_27 = []; - foreach ($data->getMaskedPaths() as $value_27) { - $values_27[] = $value_27; + foreach ($data->getMaskedPaths() as $value_28) { + $values_27[] = $value_28; } $dataArray['MaskedPaths'] = $values_27; } if ($data->isInitialized('readonlyPaths') && null !== $data->getReadonlyPaths()) { $values_28 = []; - foreach ($data->getReadonlyPaths() as $value_28) { - $values_28[] = $value_28; + foreach ($data->getReadonlyPaths() as $value_29) { + $values_28[] = $value_29; } $dataArray['ReadonlyPaths'] = $values_28; } - foreach ($data as $key_5 => $value_29) { + foreach ($data as $key_5 => $value_30) { if (preg_match('/.*/', (string) $key_5)) { - $dataArray[$key_5] = $value_29; + $dataArray[$key_5] = $value_30; } } diff --git a/generated/Normalizer/ImageConfigExposedPortsItemNormalizer.php b/generated/Normalizer/ImageConfigExposedPortsItemNormalizer.php deleted file mode 100644 index e893053..0000000 --- a/generated/Normalizer/ImageConfigExposedPortsItemNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\ImageConfigExposedPortsItem::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/ImageConfigNormalizer.php b/generated/Normalizer/ImageConfigNormalizer.php index ac8b397..08707d8 100644 --- a/generated/Normalizer/ImageConfigNormalizer.php +++ b/generated/Normalizer/ImageConfigNormalizer.php @@ -45,93 +45,44 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \WebProject\DockerApi\Library\Generated\Model\ImageConfig(); - if (array_key_exists('AttachStdin', $data) && is_int($data['AttachStdin'])) { - $data['AttachStdin'] = (bool) $data['AttachStdin']; - } - if (array_key_exists('AttachStdout', $data) && is_int($data['AttachStdout'])) { - $data['AttachStdout'] = (bool) $data['AttachStdout']; - } - if (array_key_exists('AttachStderr', $data) && is_int($data['AttachStderr'])) { - $data['AttachStderr'] = (bool) $data['AttachStderr']; - } - if (array_key_exists('Tty', $data) && is_int($data['Tty'])) { - $data['Tty'] = (bool) $data['Tty']; - } - if (array_key_exists('OpenStdin', $data) && is_int($data['OpenStdin'])) { - $data['OpenStdin'] = (bool) $data['OpenStdin']; - } - if (array_key_exists('StdinOnce', $data) && is_int($data['StdinOnce'])) { - $data['StdinOnce'] = (bool) $data['StdinOnce']; - } if (array_key_exists('ArgsEscaped', $data) && is_int($data['ArgsEscaped'])) { $data['ArgsEscaped'] = (bool) $data['ArgsEscaped']; } - if (array_key_exists('NetworkDisabled', $data) && is_int($data['NetworkDisabled'])) { - $data['NetworkDisabled'] = (bool) $data['NetworkDisabled']; - } if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('Hostname', $data)) { - $object->setHostname($data['Hostname']); - unset($data['Hostname']); - } - if (array_key_exists('Domainname', $data)) { - $object->setDomainname($data['Domainname']); - unset($data['Domainname']); - } if (array_key_exists('User', $data)) { $object->setUser($data['User']); unset($data['User']); } - if (array_key_exists('AttachStdin', $data)) { - $object->setAttachStdin($data['AttachStdin']); - unset($data['AttachStdin']); - } - if (array_key_exists('AttachStdout', $data)) { - $object->setAttachStdout($data['AttachStdout']); - unset($data['AttachStdout']); - } - if (array_key_exists('AttachStderr', $data)) { - $object->setAttachStderr($data['AttachStderr']); - unset($data['AttachStderr']); - } if (array_key_exists('ExposedPorts', $data) && null !== $data['ExposedPorts']) { $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['ExposedPorts'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\ImageConfigExposedPortsItem::class, 'json', $context); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $object->setExposedPorts($values); unset($data['ExposedPorts']); } elseif (array_key_exists('ExposedPorts', $data) && null === $data['ExposedPorts']) { $object->setExposedPorts(null); } - if (array_key_exists('Tty', $data)) { - $object->setTty($data['Tty']); - unset($data['Tty']); - } - if (array_key_exists('OpenStdin', $data)) { - $object->setOpenStdin($data['OpenStdin']); - unset($data['OpenStdin']); - } - if (array_key_exists('StdinOnce', $data)) { - $object->setStdinOnce($data['StdinOnce']); - unset($data['StdinOnce']); - } if (array_key_exists('Env', $data)) { - $values_1 = []; - foreach ($data['Env'] as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $value_2; } - $object->setEnv($values_1); + $object->setEnv($values_2); unset($data['Env']); } if (array_key_exists('Cmd', $data)) { - $values_2 = []; - foreach ($data['Cmd'] as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data['Cmd'] as $value_3) { + $values_3[] = $value_3; } - $object->setCmd($values_2); + $object->setCmd($values_3); unset($data['Cmd']); } if (array_key_exists('Healthcheck', $data)) { @@ -144,60 +95,46 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('ArgsEscaped', $data) && null === $data['ArgsEscaped']) { $object->setArgsEscaped(null); } - if (array_key_exists('Image', $data)) { - $object->setImage($data['Image']); - unset($data['Image']); - } if (array_key_exists('Volumes', $data)) { - $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Volumes'] as $key_1 => $value_3) { - $values_3[$key_1] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\ImageConfigVolumesItem::class, 'json', $context); + $values_4 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_2 => $value_4) { + $values_5 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $object->setVolumes($values_3); + $object->setVolumes($values_4); unset($data['Volumes']); } if (array_key_exists('WorkingDir', $data)) { $object->setWorkingDir($data['WorkingDir']); unset($data['WorkingDir']); } - if (array_key_exists('Entrypoint', $data) && null !== $data['Entrypoint']) { - $values_4 = []; - foreach ($data['Entrypoint'] as $value_4) { - $values_4[] = $value_4; + if (array_key_exists('Entrypoint', $data)) { + $values_6 = []; + foreach ($data['Entrypoint'] as $value_6) { + $values_6[] = $value_6; } - $object->setEntrypoint($values_4); + $object->setEntrypoint($values_6); unset($data['Entrypoint']); - } elseif (array_key_exists('Entrypoint', $data) && null === $data['Entrypoint']) { - $object->setEntrypoint(null); - } - if (array_key_exists('NetworkDisabled', $data) && null !== $data['NetworkDisabled']) { - $object->setNetworkDisabled($data['NetworkDisabled']); - unset($data['NetworkDisabled']); - } elseif (array_key_exists('NetworkDisabled', $data) && null === $data['NetworkDisabled']) { - $object->setNetworkDisabled(null); - } - if (array_key_exists('MacAddress', $data) && null !== $data['MacAddress']) { - $object->setMacAddress($data['MacAddress']); - unset($data['MacAddress']); - } elseif (array_key_exists('MacAddress', $data) && null === $data['MacAddress']) { - $object->setMacAddress(null); } if (array_key_exists('OnBuild', $data) && null !== $data['OnBuild']) { - $values_5 = []; - foreach ($data['OnBuild'] as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data['OnBuild'] as $value_7) { + $values_7[] = $value_7; } - $object->setOnBuild($values_5); + $object->setOnBuild($values_7); unset($data['OnBuild']); } elseif (array_key_exists('OnBuild', $data) && null === $data['OnBuild']) { $object->setOnBuild(null); } if (array_key_exists('Labels', $data)) { - $values_6 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $object->setLabels($values_6); + $object->setLabels($values_8); unset($data['Labels']); } if (array_key_exists('StopSignal', $data) && null !== $data['StopSignal']) { @@ -206,25 +143,19 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('StopSignal', $data) && null === $data['StopSignal']) { $object->setStopSignal(null); } - if (array_key_exists('StopTimeout', $data) && null !== $data['StopTimeout']) { - $object->setStopTimeout($data['StopTimeout']); - unset($data['StopTimeout']); - } elseif (array_key_exists('StopTimeout', $data) && null === $data['StopTimeout']) { - $object->setStopTimeout(null); - } if (array_key_exists('Shell', $data) && null !== $data['Shell']) { - $values_7 = []; - foreach ($data['Shell'] as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data['Shell'] as $value_9) { + $values_9[] = $value_9; } - $object->setShell($values_7); + $object->setShell($values_9); unset($data['Shell']); } elseif (array_key_exists('Shell', $data) && null === $data['Shell']) { $object->setShell(null); } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $object[$key_5] = $value_10; } } @@ -234,53 +165,33 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string { $dataArray = []; - if ($data->isInitialized('hostname') && null !== $data->getHostname()) { - $dataArray['Hostname'] = $data->getHostname(); - } - if ($data->isInitialized('domainname') && null !== $data->getDomainname()) { - $dataArray['Domainname'] = $data->getDomainname(); - } if ($data->isInitialized('user') && null !== $data->getUser()) { $dataArray['User'] = $data->getUser(); } - if ($data->isInitialized('attachStdin') && null !== $data->getAttachStdin()) { - $dataArray['AttachStdin'] = $data->getAttachStdin(); - } - if ($data->isInitialized('attachStdout') && null !== $data->getAttachStdout()) { - $dataArray['AttachStdout'] = $data->getAttachStdout(); - } - if ($data->isInitialized('attachStderr') && null !== $data->getAttachStderr()) { - $dataArray['AttachStderr'] = $data->getAttachStderr(); - } if ($data->isInitialized('exposedPorts') && null !== $data->getExposedPorts()) { $values = []; foreach ($data->getExposedPorts() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $dataArray['ExposedPorts'] = $values; } - if ($data->isInitialized('tty') && null !== $data->getTty()) { - $dataArray['Tty'] = $data->getTty(); - } - if ($data->isInitialized('openStdin') && null !== $data->getOpenStdin()) { - $dataArray['OpenStdin'] = $data->getOpenStdin(); - } - if ($data->isInitialized('stdinOnce') && null !== $data->getStdinOnce()) { - $dataArray['StdinOnce'] = $data->getStdinOnce(); - } if ($data->isInitialized('env') && null !== $data->getEnv()) { - $values_1 = []; - foreach ($data->getEnv() as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data->getEnv() as $value_2) { + $values_2[] = $value_2; } - $dataArray['Env'] = $values_1; + $dataArray['Env'] = $values_2; } if ($data->isInitialized('cmd') && null !== $data->getCmd()) { - $values_2 = []; - foreach ($data->getCmd() as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data->getCmd() as $value_3) { + $values_3[] = $value_3; } - $dataArray['Cmd'] = $values_2; + $dataArray['Cmd'] = $values_3; } if ($data->isInitialized('healthcheck') && null !== $data->getHealthcheck()) { $dataArray['Healthcheck'] = $this->normalizer->normalize($data->getHealthcheck(), 'json', $context); @@ -288,62 +199,54 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('argsEscaped') && null !== $data->getArgsEscaped()) { $dataArray['ArgsEscaped'] = $data->getArgsEscaped(); } - if ($data->isInitialized('image') && null !== $data->getImage()) { - $dataArray['Image'] = $data->getImage(); - } if ($data->isInitialized('volumes') && null !== $data->getVolumes()) { - $values_3 = []; - foreach ($data->getVolumes() as $key_1 => $value_3) { - $values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context); + $values_4 = []; + foreach ($data->getVolumes() as $key_2 => $value_4) { + $values_5 = []; + foreach ($value_4 as $key_3 => $value_5) { + $values_5[$key_3] = $value_5; + } + $values_4[$key_2] = $values_5; } - $dataArray['Volumes'] = $values_3; + $dataArray['Volumes'] = $values_4; } if ($data->isInitialized('workingDir') && null !== $data->getWorkingDir()) { $dataArray['WorkingDir'] = $data->getWorkingDir(); } if ($data->isInitialized('entrypoint') && null !== $data->getEntrypoint()) { - $values_4 = []; - foreach ($data->getEntrypoint() as $value_4) { - $values_4[] = $value_4; + $values_6 = []; + foreach ($data->getEntrypoint() as $value_6) { + $values_6[] = $value_6; } - $dataArray['Entrypoint'] = $values_4; - } - if ($data->isInitialized('networkDisabled') && null !== $data->getNetworkDisabled()) { - $dataArray['NetworkDisabled'] = $data->getNetworkDisabled(); - } - if ($data->isInitialized('macAddress') && null !== $data->getMacAddress()) { - $dataArray['MacAddress'] = $data->getMacAddress(); + $dataArray['Entrypoint'] = $values_6; } if ($data->isInitialized('onBuild') && null !== $data->getOnBuild()) { - $values_5 = []; - foreach ($data->getOnBuild() as $value_5) { - $values_5[] = $value_5; + $values_7 = []; + foreach ($data->getOnBuild() as $value_7) { + $values_7[] = $value_7; } - $dataArray['OnBuild'] = $values_5; + $dataArray['OnBuild'] = $values_7; } if ($data->isInitialized('labels') && null !== $data->getLabels()) { - $values_6 = []; - foreach ($data->getLabels() as $key_2 => $value_6) { - $values_6[$key_2] = $value_6; + $values_8 = []; + foreach ($data->getLabels() as $key_4 => $value_8) { + $values_8[$key_4] = $value_8; } - $dataArray['Labels'] = $values_6; + $dataArray['Labels'] = $values_8; } if ($data->isInitialized('stopSignal') && null !== $data->getStopSignal()) { $dataArray['StopSignal'] = $data->getStopSignal(); } - if ($data->isInitialized('stopTimeout') && null !== $data->getStopTimeout()) { - $dataArray['StopTimeout'] = $data->getStopTimeout(); - } if ($data->isInitialized('shell') && null !== $data->getShell()) { - $values_7 = []; - foreach ($data->getShell() as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data->getShell() as $value_9) { + $values_9[] = $value_9; } - $dataArray['Shell'] = $values_7; + $dataArray['Shell'] = $values_9; } - foreach ($data as $key_3 => $value_8) { - if (preg_match('/.*/', (string) $key_3)) { - $dataArray[$key_3] = $value_8; + foreach ($data as $key_5 => $value_10) { + if (preg_match('/.*/', (string) $key_5)) { + $dataArray[$key_5] = $value_10; } } diff --git a/generated/Normalizer/ImageConfigVolumesItemNormalizer.php b/generated/Normalizer/ImageConfigVolumesItemNormalizer.php deleted file mode 100644 index ac47ab8..0000000 --- a/generated/Normalizer/ImageConfigVolumesItemNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\ImageConfigVolumesItem::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/ImageInspectNormalizer.php b/generated/Normalizer/ImageInspectNormalizer.php index 07db6c8..b0e0a58 100644 --- a/generated/Normalizer/ImageInspectNormalizer.php +++ b/generated/Normalizer/ImageInspectNormalizer.php @@ -131,10 +131,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setSize($data['Size']); unset($data['Size']); } - if (array_key_exists('VirtualSize', $data)) { - $object->setVirtualSize($data['VirtualSize']); - unset($data['VirtualSize']); - } if (array_key_exists('GraphDriver', $data)) { $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \WebProject\DockerApi\Library\Generated\Model\DriverData::class, 'json', $context)); unset($data['GraphDriver']); @@ -219,9 +215,6 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('size') && null !== $data->getSize()) { $dataArray['Size'] = $data->getSize(); } - if ($data->isInitialized('virtualSize') && null !== $data->getVirtualSize()) { - $dataArray['VirtualSize'] = $data->getVirtualSize(); - } if ($data->isInitialized('graphDriver') && null !== $data->getGraphDriver()) { $dataArray['GraphDriver'] = $this->normalizer->normalize($data->getGraphDriver(), 'json', $context); } diff --git a/generated/Normalizer/ImageSummaryNormalizer.php b/generated/Normalizer/ImageSummaryNormalizer.php index afffad9..9ebf178 100644 --- a/generated/Normalizer/ImageSummaryNormalizer.php +++ b/generated/Normalizer/ImageSummaryNormalizer.php @@ -83,10 +83,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setSharedSize($data['SharedSize']); unset($data['SharedSize']); } - if (array_key_exists('VirtualSize', $data)) { - $object->setVirtualSize($data['VirtualSize']); - unset($data['VirtualSize']); - } if (array_key_exists('Labels', $data)) { $values_2 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['Labels'] as $key => $value_2) { @@ -138,10 +134,7 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Created'] = $data->getCreated(); $dataArray['Size'] = $data->getSize(); $dataArray['SharedSize'] = $data->getSharedSize(); - if ($data->isInitialized('virtualSize') && null !== $data->getVirtualSize()) { - $dataArray['VirtualSize'] = $data->getVirtualSize(); - } - $values_2 = []; + $values_2 = []; foreach ($data->getLabels() as $key => $value_2) { $values_2[$key] = $value_2; } diff --git a/generated/Normalizer/JaneObjectNormalizer.php b/generated/Normalizer/JaneObjectNormalizer.php index a85fdce..8cbd253 100644 --- a/generated/Normalizer/JaneObjectNormalizer.php +++ b/generated/Normalizer/JaneObjectNormalizer.php @@ -75,16 +75,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\ContainerConfig::class => ContainerConfigNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class => ContainerConfigExposedPortsItemNormalizer::class, - - \WebProject\DockerApi\Library\Generated\Model\ContainerConfigVolumesItem::class => ContainerConfigVolumesItemNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ImageConfig::class => ImageConfigNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ImageConfigExposedPortsItem::class => ImageConfigExposedPortsItemNormalizer::class, - - \WebProject\DockerApi\Library\Generated\Model\ImageConfigVolumesItem::class => ImageConfigVolumesItemNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\NetworkingConfig::class => NetworkingConfigNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\NetworkSettings::class => NetworkSettingsNormalizer::class, @@ -111,8 +103,6 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\Volume::class => VolumeNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\VolumeStatusItem::class => VolumeStatusItemNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\VolumeUsageData::class => VolumeUsageDataNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\VolumeCreateOptions::class => VolumeCreateOptionsNormalizer::class, @@ -143,6 +133,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\PushImageInfo::class => PushImageInfoNormalizer::class, + \WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class => DeviceInfoNormalizer::class, + \WebProject\DockerApi\Library\Generated\Model\ErrorDetail::class => ErrorDetailNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\ProgressDetail::class => ProgressDetailNormalizer::class, @@ -253,8 +245,6 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemFile::class => TaskSpecContainerSpecConfigsItemFileNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemRuntime::class => TaskSpecContainerSpecConfigsItemRuntimeNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecUlimitsItem::class => TaskSpecContainerSpecUlimitsItemNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\TaskSpecNetworkAttachmentSpec::class => TaskSpecNetworkAttachmentSpecNormalizer::class, @@ -285,12 +275,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeReplicated::class => ServiceSpecModeReplicatedNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobal::class => ServiceSpecModeGlobalNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeReplicatedJob::class => ServiceSpecModeReplicatedJobNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobalJob::class => ServiceSpecModeGlobalJobNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecUpdateConfig::class => ServiceSpecUpdateConfigNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecRollbackConfig::class => ServiceSpecRollbackConfigNormalizer::class, @@ -373,8 +359,6 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItem::class => SystemVersionComponentsItemNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItemDetails::class => SystemVersionComponentsItemDetailsNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\SystemInfo::class => SystemInfoNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\SystemInfoDefaultAddressPoolsItem::class => SystemInfoDefaultAddressPoolsItemNormalizer::class, @@ -383,6 +367,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\ContainerdInfoNamespaces::class => ContainerdInfoNamespacesNormalizer::class, + \WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class => FirewallInfoNormalizer::class, + \WebProject\DockerApi\Library\Generated\Model\PluginsInfo::class => PluginsInfoNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\RegistryServiceConfig::class => RegistryServiceConfigNormalizer::class, @@ -419,8 +405,6 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessMode::class => ClusterVolumeSpecAccessModeNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class => ClusterVolumeSpecAccessModeMountVolumeNormalizer::class, - \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeSecretsItem::class => ClusterVolumeSpecAccessModeSecretsItemNormalizer::class, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer::class, @@ -567,11 +551,7 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\HostConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\HostConfigLogConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\ContainerConfig::class => false, - \WebProject\DockerApi\Library\Generated\Model\ContainerConfigExposedPortsItem::class => false, - \WebProject\DockerApi\Library\Generated\Model\ContainerConfigVolumesItem::class => false, \WebProject\DockerApi\Library\Generated\Model\ImageConfig::class => false, - \WebProject\DockerApi\Library\Generated\Model\ImageConfigExposedPortsItem::class => false, - \WebProject\DockerApi\Library\Generated\Model\ImageConfigVolumesItem::class => false, \WebProject\DockerApi\Library\Generated\Model\NetworkingConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\NetworkSettings::class => false, \WebProject\DockerApi\Library\Generated\Model\Address::class => false, @@ -585,7 +565,6 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\AuthConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\ProcessConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\Volume::class => false, - \WebProject\DockerApi\Library\Generated\Model\VolumeStatusItem::class => false, \WebProject\DockerApi\Library\Generated\Model\VolumeUsageData::class => false, \WebProject\DockerApi\Library\Generated\Model\VolumeCreateOptions::class => false, \WebProject\DockerApi\Library\Generated\Model\VolumeListResponse::class => false, @@ -601,6 +580,7 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\ImageID::class => false, \WebProject\DockerApi\Library\Generated\Model\CreateImageInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\PushImageInfo::class => false, + \WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\ErrorDetail::class => false, \WebProject\DockerApi\Library\Generated\Model\ProgressDetail::class => false, \WebProject\DockerApi\Library\Generated\Model\ErrorResponse::class => false, @@ -656,7 +636,6 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecSecretsItemFile::class => false, \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItem::class => false, \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemFile::class => false, - \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemRuntime::class => false, \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecUlimitsItem::class => false, \WebProject\DockerApi\Library\Generated\Model\TaskSpecNetworkAttachmentSpec::class => false, \WebProject\DockerApi\Library\Generated\Model\TaskSpecResources::class => false, @@ -672,9 +651,7 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\ServiceSpec::class => false, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecMode::class => false, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeReplicated::class => false, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobal::class => false, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeReplicatedJob::class => false, - \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobalJob::class => false, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecUpdateConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\ServiceSpecRollbackConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\EndpointPortConfig::class => false, @@ -716,11 +693,11 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\SystemVersion::class => false, \WebProject\DockerApi\Library\Generated\Model\SystemVersionPlatform::class => false, \WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItem::class => false, - \WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItemDetails::class => false, \WebProject\DockerApi\Library\Generated\Model\SystemInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\SystemInfoDefaultAddressPoolsItem::class => false, \WebProject\DockerApi\Library\Generated\Model\ContainerdInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\ContainerdInfoNamespaces::class => false, + \WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\PluginsInfo::class => false, \WebProject\DockerApi\Library\Generated\Model\RegistryServiceConfig::class => false, \WebProject\DockerApi\Library\Generated\Model\IndexInfo::class => false, @@ -739,7 +716,6 @@ public function getSupportedTypes(?string $format = null): array \WebProject\DockerApi\Library\Generated\Model\ClusterVolumePublishStatusItem::class => false, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpec::class => false, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessMode::class => false, - \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeMountVolume::class => false, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeSecretsItem::class => false, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => false, \WebProject\DockerApi\Library\Generated\Model\ClusterVolumeSpecAccessModeCapacityRange::class => false, diff --git a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php index 1e57d09..531019b 100644 --- a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php +++ b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php @@ -51,13 +51,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setTarget($data['Target']); unset($data['Target']); } - if (array_key_exists('Aliases', $data)) { + if (array_key_exists('Aliases', $data) && null !== $data['Aliases']) { $values = []; foreach ($data['Aliases'] as $value) { $values[] = $value; } $object->setAliases($values); unset($data['Aliases']); + } elseif (array_key_exists('Aliases', $data) && null === $data['Aliases']) { + $object->setAliases(null); } if (array_key_exists('DriverOpts', $data)) { $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); diff --git a/generated/Normalizer/NetworkSettingsNormalizer.php b/generated/Normalizer/NetworkSettingsNormalizer.php index 48d29da..fc215de 100644 --- a/generated/Normalizer/NetworkSettingsNormalizer.php +++ b/generated/Normalizer/NetworkSettingsNormalizer.php @@ -69,16 +69,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setLinkLocalIPv6Address($data['LinkLocalIPv6Address']); unset($data['LinkLocalIPv6Address']); } - if (array_key_exists('LinkLocalIPv6PrefixLen', $data) && null !== $data['LinkLocalIPv6PrefixLen']) { + if (array_key_exists('LinkLocalIPv6PrefixLen', $data)) { $object->setLinkLocalIPv6PrefixLen($data['LinkLocalIPv6PrefixLen']); unset($data['LinkLocalIPv6PrefixLen']); - } elseif (array_key_exists('LinkLocalIPv6PrefixLen', $data) && null === $data['LinkLocalIPv6PrefixLen']) { - $object->setLinkLocalIPv6PrefixLen(null); } if (array_key_exists('Ports', $data) && null !== $data['Ports']) { $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['Ports'] as $key => $value) { - $values[$key] = $value; + $value_1 = $value; + if (is_array($value)) { + $value_1 = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\PortBinding::class, 'json', $context); + } + $values[$key] = $value_1; } $object->setPorts($values); unset($data['Ports']); @@ -91,8 +93,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('SecondaryIPAddresses', $data) && null !== $data['SecondaryIPAddresses']) { $values_1 = []; - foreach ($data['SecondaryIPAddresses'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\Address::class, 'json', $context); + foreach ($data['SecondaryIPAddresses'] as $value_2) { + $values_1[] = $this->denormalizer->denormalize($value_2, \WebProject\DockerApi\Library\Generated\Model\Address::class, 'json', $context); } $object->setSecondaryIPAddresses($values_1); unset($data['SecondaryIPAddresses']); @@ -101,8 +103,8 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('SecondaryIPv6Addresses', $data) && null !== $data['SecondaryIPv6Addresses']) { $values_2 = []; - foreach ($data['SecondaryIPv6Addresses'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \WebProject\DockerApi\Library\Generated\Model\Address::class, 'json', $context); + foreach ($data['SecondaryIPv6Addresses'] as $value_3) { + $values_2[] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\Address::class, 'json', $context); } $object->setSecondaryIPv6Addresses($values_2); unset($data['SecondaryIPv6Addresses']); @@ -143,15 +145,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } if (array_key_exists('Networks', $data)) { $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Networks'] as $key_1 => $value_3) { - $values_3[$key_1] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\EndpointSettings::class, 'json', $context); + foreach ($data['Networks'] as $key_1 => $value_4) { + $values_3[$key_1] = $this->denormalizer->denormalize($value_4, \WebProject\DockerApi\Library\Generated\Model\EndpointSettings::class, 'json', $context); } $object->setNetworks($values_3); unset($data['Networks']); } - foreach ($data as $key_2 => $value_4) { + foreach ($data as $key_2 => $value_5) { if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_4; + $object[$key_2] = $value_5; } } @@ -179,7 +181,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('ports') && null !== $data->getPorts()) { $values = []; foreach ($data->getPorts() as $key => $value) { - $values[$key] = $value; + $value_1 = $value; + if (is_object($value)) { + $value_1 = $this->normalizer->normalize($value, 'json', $context); + } + $values[$key] = $value_1; } $dataArray['Ports'] = $values; } @@ -188,15 +194,15 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('secondaryIPAddresses') && null !== $data->getSecondaryIPAddresses()) { $values_1 = []; - foreach ($data->getSecondaryIPAddresses() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data->getSecondaryIPAddresses() as $value_2) { + $values_1[] = $this->normalizer->normalize($value_2, 'json', $context); } $dataArray['SecondaryIPAddresses'] = $values_1; } if ($data->isInitialized('secondaryIPv6Addresses') && null !== $data->getSecondaryIPv6Addresses()) { $values_2 = []; - foreach ($data->getSecondaryIPv6Addresses() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + foreach ($data->getSecondaryIPv6Addresses() as $value_3) { + $values_2[] = $this->normalizer->normalize($value_3, 'json', $context); } $dataArray['SecondaryIPv6Addresses'] = $values_2; } @@ -226,14 +232,14 @@ public function normalize(mixed $data, ?string $format = null, array $context = } if ($data->isInitialized('networks') && null !== $data->getNetworks()) { $values_3 = []; - foreach ($data->getNetworks() as $key_1 => $value_3) { - $values_3[$key_1] = $this->normalizer->normalize($value_3, 'json', $context); + foreach ($data->getNetworks() as $key_1 => $value_4) { + $values_3[$key_1] = $this->normalizer->normalize($value_4, 'json', $context); } $dataArray['Networks'] = $values_3; } - foreach ($data as $key_2 => $value_4) { + foreach ($data as $key_2 => $value_5) { if (preg_match('/.*/', (string) $key_2)) { - $dataArray[$key_2] = $value_4; + $dataArray[$key_2] = $value_5; } } diff --git a/generated/Normalizer/PluginConfigNormalizer.php b/generated/Normalizer/PluginConfigNormalizer.php index 3569de3..9899f4a 100644 --- a/generated/Normalizer/PluginConfigNormalizer.php +++ b/generated/Normalizer/PluginConfigNormalizer.php @@ -70,15 +70,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setInterface($this->denormalizer->denormalize($data['Interface'], \WebProject\DockerApi\Library\Generated\Model\PluginConfigInterface::class, 'json', $context)); unset($data['Interface']); } - if (array_key_exists('Entrypoint', $data) && null !== $data['Entrypoint']) { + if (array_key_exists('Entrypoint', $data)) { $values = []; foreach ($data['Entrypoint'] as $value) { $values[] = $value; } $object->setEntrypoint($values); unset($data['Entrypoint']); - } elseif (array_key_exists('Entrypoint', $data) && null === $data['Entrypoint']) { - $object->setEntrypoint(null); } if (array_key_exists('WorkDir', $data)) { $object->setWorkDir($data['WorkDir']); diff --git a/generated/Normalizer/PortBindingNormalizer.php b/generated/Normalizer/PortBindingNormalizer.php index 1a501fb..440c917 100644 --- a/generated/Normalizer/PortBindingNormalizer.php +++ b/generated/Normalizer/PortBindingNormalizer.php @@ -47,17 +47,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('HostIp', $data) && null !== $data['HostIp']) { + if (array_key_exists('HostIp', $data)) { $object->setHostIp($data['HostIp']); unset($data['HostIp']); - } elseif (array_key_exists('HostIp', $data) && null === $data['HostIp']) { - $object->setHostIp(null); } - if (array_key_exists('HostPort', $data) && null !== $data['HostPort']) { + if (array_key_exists('HostPort', $data)) { $object->setHostPort($data['HostPort']); unset($data['HostPort']); - } elseif (array_key_exists('HostPort', $data) && null === $data['HostPort']) { - $object->setHostPort(null); } foreach ($data as $key => $value) { if (preg_match('/.*/', (string) $key)) { diff --git a/generated/Normalizer/PortStatusNormalizer.php b/generated/Normalizer/PortStatusNormalizer.php index 8b401d8..d67695c 100644 --- a/generated/Normalizer/PortStatusNormalizer.php +++ b/generated/Normalizer/PortStatusNormalizer.php @@ -47,15 +47,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('Ports', $data) && null !== $data['Ports']) { + if (array_key_exists('Ports', $data)) { $values = []; foreach ($data['Ports'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\EndpointPortConfig::class, 'json', $context); } $object->setPorts($values); unset($data['Ports']); - } elseif (array_key_exists('Ports', $data) && null === $data['Ports']) { - $object->setPorts(null); } foreach ($data as $key => $value_1) { if (preg_match('/.*/', (string) $key)) { diff --git a/generated/Normalizer/RegistryServiceConfigNormalizer.php b/generated/Normalizer/RegistryServiceConfigNormalizer.php index c19f2ef..22b56f9 100644 --- a/generated/Normalizer/RegistryServiceConfigNormalizer.php +++ b/generated/Normalizer/RegistryServiceConfigNormalizer.php @@ -47,49 +47,33 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('AllowNondistributableArtifactsCIDRs', $data)) { + if (array_key_exists('InsecureRegistryCIDRs', $data)) { $values = []; - foreach ($data['AllowNondistributableArtifactsCIDRs'] as $value) { + foreach ($data['InsecureRegistryCIDRs'] as $value) { $values[] = $value; } - $object->setAllowNondistributableArtifactsCIDRs($values); - unset($data['AllowNondistributableArtifactsCIDRs']); - } - if (array_key_exists('AllowNondistributableArtifactsHostnames', $data)) { - $values_1 = []; - foreach ($data['AllowNondistributableArtifactsHostnames'] as $value_1) { - $values_1[] = $value_1; - } - $object->setAllowNondistributableArtifactsHostnames($values_1); - unset($data['AllowNondistributableArtifactsHostnames']); - } - if (array_key_exists('InsecureRegistryCIDRs', $data)) { - $values_2 = []; - foreach ($data['InsecureRegistryCIDRs'] as $value_2) { - $values_2[] = $value_2; - } - $object->setInsecureRegistryCIDRs($values_2); + $object->setInsecureRegistryCIDRs($values); unset($data['InsecureRegistryCIDRs']); } if (array_key_exists('IndexConfigs', $data)) { - $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['IndexConfigs'] as $key => $value_3) { - $values_3[$key] = $this->denormalizer->denormalize($value_3, \WebProject\DockerApi\Library\Generated\Model\IndexInfo::class, 'json', $context); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['IndexConfigs'] as $key => $value_1) { + $values_1[$key] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\IndexInfo::class, 'json', $context); } - $object->setIndexConfigs($values_3); + $object->setIndexConfigs($values_1); unset($data['IndexConfigs']); } if (array_key_exists('Mirrors', $data)) { - $values_4 = []; - foreach ($data['Mirrors'] as $value_4) { - $values_4[] = $value_4; + $values_2 = []; + foreach ($data['Mirrors'] as $value_2) { + $values_2[] = $value_2; } - $object->setMirrors($values_4); + $object->setMirrors($values_2); unset($data['Mirrors']); } - foreach ($data as $key_1 => $value_5) { + foreach ($data as $key_1 => $value_3) { if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_5; + $object[$key_1] = $value_3; } } @@ -99,44 +83,30 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string { $dataArray = []; - if ($data->isInitialized('allowNondistributableArtifactsCIDRs') && null !== $data->getAllowNondistributableArtifactsCIDRs()) { + if ($data->isInitialized('insecureRegistryCIDRs') && null !== $data->getInsecureRegistryCIDRs()) { $values = []; - foreach ($data->getAllowNondistributableArtifactsCIDRs() as $value) { + foreach ($data->getInsecureRegistryCIDRs() as $value) { $values[] = $value; } - $dataArray['AllowNondistributableArtifactsCIDRs'] = $values; + $dataArray['InsecureRegistryCIDRs'] = $values; } - if ($data->isInitialized('allowNondistributableArtifactsHostnames') && null !== $data->getAllowNondistributableArtifactsHostnames()) { + if ($data->isInitialized('indexConfigs') && null !== $data->getIndexConfigs()) { $values_1 = []; - foreach ($data->getAllowNondistributableArtifactsHostnames() as $value_1) { - $values_1[] = $value_1; + foreach ($data->getIndexConfigs() as $key => $value_1) { + $values_1[$key] = $this->normalizer->normalize($value_1, 'json', $context); } - $dataArray['AllowNondistributableArtifactsHostnames'] = $values_1; + $dataArray['IndexConfigs'] = $values_1; } - if ($data->isInitialized('insecureRegistryCIDRs') && null !== $data->getInsecureRegistryCIDRs()) { + if ($data->isInitialized('mirrors') && null !== $data->getMirrors()) { $values_2 = []; - foreach ($data->getInsecureRegistryCIDRs() as $value_2) { + foreach ($data->getMirrors() as $value_2) { $values_2[] = $value_2; } - $dataArray['InsecureRegistryCIDRs'] = $values_2; - } - if ($data->isInitialized('indexConfigs') && null !== $data->getIndexConfigs()) { - $values_3 = []; - foreach ($data->getIndexConfigs() as $key => $value_3) { - $values_3[$key] = $this->normalizer->normalize($value_3, 'json', $context); - } - $dataArray['IndexConfigs'] = $values_3; - } - if ($data->isInitialized('mirrors') && null !== $data->getMirrors()) { - $values_4 = []; - foreach ($data->getMirrors() as $value_4) { - $values_4[] = $value_4; - } - $dataArray['Mirrors'] = $values_4; + $dataArray['Mirrors'] = $values_2; } - foreach ($data as $key_1 => $value_5) { + foreach ($data as $key_1 => $value_3) { if (preg_match('/.*/', (string) $key_1)) { - $dataArray[$key_1] = $value_5; + $dataArray[$key_1] = $value_3; } } diff --git a/generated/Normalizer/ResourcesNormalizer.php b/generated/Normalizer/ResourcesNormalizer.php index d5d734b..3a5e757 100644 --- a/generated/Normalizer/ResourcesNormalizer.php +++ b/generated/Normalizer/ResourcesNormalizer.php @@ -124,29 +124,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setCpuPeriod($data['CpuPeriod']); unset($data['CpuPeriod']); } - if (array_key_exists('CpuQuota', $data) && null !== $data['CpuQuota']) { + if (array_key_exists('CpuQuota', $data)) { $object->setCpuQuota($data['CpuQuota']); unset($data['CpuQuota']); - } elseif (array_key_exists('CpuQuota', $data) && null === $data['CpuQuota']) { - $object->setCpuQuota(null); } - if (array_key_exists('CpuRealtimePeriod', $data) && null !== $data['CpuRealtimePeriod']) { + if (array_key_exists('CpuRealtimePeriod', $data)) { $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); unset($data['CpuRealtimePeriod']); - } elseif (array_key_exists('CpuRealtimePeriod', $data) && null === $data['CpuRealtimePeriod']) { - $object->setCpuRealtimePeriod(null); } - if (array_key_exists('CpuRealtimeRuntime', $data) && null !== $data['CpuRealtimeRuntime']) { + if (array_key_exists('CpuRealtimeRuntime', $data)) { $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); unset($data['CpuRealtimeRuntime']); - } elseif (array_key_exists('CpuRealtimeRuntime', $data) && null === $data['CpuRealtimeRuntime']) { - $object->setCpuRealtimeRuntime(null); } - if (array_key_exists('CpusetCpus', $data) && null !== $data['CpusetCpus']) { + if (array_key_exists('CpusetCpus', $data)) { $object->setCpusetCpus($data['CpusetCpus']); unset($data['CpusetCpus']); - } elseif (array_key_exists('CpusetCpus', $data) && null === $data['CpusetCpus']) { - $object->setCpusetCpus(null); } if (array_key_exists('CpusetMems', $data)) { $object->setCpusetMems($data['CpusetMems']); @@ -200,9 +192,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('MemorySwappiness', $data) && null === $data['MemorySwappiness']) { $object->setMemorySwappiness(null); } - if (array_key_exists('NanoCpus', $data)) { + if (array_key_exists('NanoCpus', $data) && null !== $data['NanoCpus']) { $object->setNanoCpus($data['NanoCpus']); unset($data['NanoCpus']); + } elseif (array_key_exists('NanoCpus', $data) && null === $data['NanoCpus']) { + $object->setNanoCpus(null); } if (array_key_exists('OomKillDisable', $data) && null !== $data['OomKillDisable']) { $object->setOomKillDisable($data['OomKillDisable']); @@ -232,21 +226,29 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('Ulimits', $data) && null === $data['Ulimits']) { $object->setUlimits(null); } - if (array_key_exists('CpuCount', $data)) { + if (array_key_exists('CpuCount', $data) && null !== $data['CpuCount']) { $object->setCpuCount($data['CpuCount']); unset($data['CpuCount']); + } elseif (array_key_exists('CpuCount', $data) && null === $data['CpuCount']) { + $object->setCpuCount(null); } - if (array_key_exists('CpuPercent', $data)) { + if (array_key_exists('CpuPercent', $data) && null !== $data['CpuPercent']) { $object->setCpuPercent($data['CpuPercent']); unset($data['CpuPercent']); + } elseif (array_key_exists('CpuPercent', $data) && null === $data['CpuPercent']) { + $object->setCpuPercent(null); } - if (array_key_exists('IOMaximumIOps', $data)) { + if (array_key_exists('IOMaximumIOps', $data) && null !== $data['IOMaximumIOps']) { $object->setIOMaximumIOps($data['IOMaximumIOps']); unset($data['IOMaximumIOps']); + } elseif (array_key_exists('IOMaximumIOps', $data) && null === $data['IOMaximumIOps']) { + $object->setIOMaximumIOps(null); } - if (array_key_exists('IOMaximumBandwidth', $data)) { + if (array_key_exists('IOMaximumBandwidth', $data) && null !== $data['IOMaximumBandwidth']) { $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); unset($data['IOMaximumBandwidth']); + } elseif (array_key_exists('IOMaximumBandwidth', $data) && null === $data['IOMaximumBandwidth']) { + $object->setIOMaximumBandwidth(null); } foreach ($data as $key => $value_9) { if (preg_match('/.*/', (string) $key)) { diff --git a/generated/Normalizer/ServiceEndpointNormalizer.php b/generated/Normalizer/ServiceEndpointNormalizer.php index dff1673..88e4b12 100644 --- a/generated/Normalizer/ServiceEndpointNormalizer.php +++ b/generated/Normalizer/ServiceEndpointNormalizer.php @@ -51,15 +51,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setSpec($this->denormalizer->denormalize($data['Spec'], \WebProject\DockerApi\Library\Generated\Model\EndpointSpec::class, 'json', $context)); unset($data['Spec']); } - if (array_key_exists('Ports', $data) && null !== $data['Ports']) { + if (array_key_exists('Ports', $data)) { $values = []; foreach ($data['Ports'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\EndpointPortConfig::class, 'json', $context); } $object->setPorts($values); unset($data['Ports']); - } elseif (array_key_exists('Ports', $data) && null === $data['Ports']) { - $object->setPorts(null); } if (array_key_exists('VirtualIPs', $data)) { $values_1 = []; diff --git a/generated/Normalizer/ServiceSpecModeGlobalJobNormalizer.php b/generated/Normalizer/ServiceSpecModeGlobalJobNormalizer.php deleted file mode 100644 index 08ecf69..0000000 --- a/generated/Normalizer/ServiceSpecModeGlobalJobNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobalJob::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/ServiceSpecModeGlobalNormalizer.php b/generated/Normalizer/ServiceSpecModeGlobalNormalizer.php deleted file mode 100644 index e5df6de..0000000 --- a/generated/Normalizer/ServiceSpecModeGlobalNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobal::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/ServiceSpecModeNormalizer.php b/generated/Normalizer/ServiceSpecModeNormalizer.php index 526c55d..775bdb6 100644 --- a/generated/Normalizer/ServiceSpecModeNormalizer.php +++ b/generated/Normalizer/ServiceSpecModeNormalizer.php @@ -52,7 +52,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['Replicated']); } if (array_key_exists('Global', $data)) { - $object->setGlobal($this->denormalizer->denormalize($data['Global'], \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobal::class, 'json', $context)); + $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Global'] as $key => $value) { + $values[$key] = $value; + } + $object->setGlobal($values); unset($data['Global']); } if (array_key_exists('ReplicatedJob', $data)) { @@ -60,12 +64,16 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['ReplicatedJob']); } if (array_key_exists('GlobalJob', $data)) { - $object->setGlobalJob($this->denormalizer->denormalize($data['GlobalJob'], \WebProject\DockerApi\Library\Generated\Model\ServiceSpecModeGlobalJob::class, 'json', $context)); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['GlobalJob'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setGlobalJob($values_1); unset($data['GlobalJob']); } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + foreach ($data as $key_2 => $value_2) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_2; } } @@ -79,17 +87,25 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Replicated'] = $this->normalizer->normalize($data->getReplicated(), 'json', $context); } if ($data->isInitialized('global') && null !== $data->getGlobal()) { - $dataArray['Global'] = $this->normalizer->normalize($data->getGlobal(), 'json', $context); + $values = []; + foreach ($data->getGlobal() as $key => $value) { + $values[$key] = $value; + } + $dataArray['Global'] = $values; } if ($data->isInitialized('replicatedJob') && null !== $data->getReplicatedJob()) { $dataArray['ReplicatedJob'] = $this->normalizer->normalize($data->getReplicatedJob(), 'json', $context); } if ($data->isInitialized('globalJob') && null !== $data->getGlobalJob()) { - $dataArray['GlobalJob'] = $this->normalizer->normalize($data->getGlobalJob(), 'json', $context); + $values_1 = []; + foreach ($data->getGlobalJob() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $dataArray['GlobalJob'] = $values_1; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; + foreach ($data as $key_2 => $value_2) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_2; } } diff --git a/generated/Normalizer/ServiceSpecNormalizer.php b/generated/Normalizer/ServiceSpecNormalizer.php index b80da08..6b7bfc2 100644 --- a/generated/Normalizer/ServiceSpecNormalizer.php +++ b/generated/Normalizer/ServiceSpecNormalizer.php @@ -75,13 +75,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \WebProject\DockerApi\Library\Generated\Model\ServiceSpecRollbackConfig::class, 'json', $context)); unset($data['RollbackConfig']); } - if (array_key_exists('Networks', $data)) { + if (array_key_exists('Networks', $data) && null !== $data['Networks']) { $values_1 = []; foreach ($data['Networks'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); unset($data['Networks']); + } elseif (array_key_exists('Networks', $data) && null === $data['Networks']) { + $object->setNetworks(null); } if (array_key_exists('EndpointSpec', $data)) { $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \WebProject\DockerApi\Library\Generated\Model\EndpointSpec::class, 'json', $context)); diff --git a/generated/Normalizer/ServicesCreatePostBodyNormalizer.php b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php index 07e3af8..3f5ba0a 100644 --- a/generated/Normalizer/ServicesCreatePostBodyNormalizer.php +++ b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php @@ -75,13 +75,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \WebProject\DockerApi\Library\Generated\Model\ServiceSpecRollbackConfig::class, 'json', $context)); unset($data['RollbackConfig']); } - if (array_key_exists('Networks', $data)) { + if (array_key_exists('Networks', $data) && null !== $data['Networks']) { $values_1 = []; foreach ($data['Networks'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); unset($data['Networks']); + } elseif (array_key_exists('Networks', $data) && null === $data['Networks']) { + $object->setNetworks(null); } if (array_key_exists('EndpointSpec', $data)) { $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \WebProject\DockerApi\Library\Generated\Model\EndpointSpec::class, 'json', $context)); diff --git a/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php index 54343c2..21dae9f 100644 --- a/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php +++ b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php @@ -75,13 +75,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \WebProject\DockerApi\Library\Generated\Model\ServiceSpecRollbackConfig::class, 'json', $context)); unset($data['RollbackConfig']); } - if (array_key_exists('Networks', $data)) { + if (array_key_exists('Networks', $data) && null !== $data['Networks']) { $values_1 = []; foreach ($data['Networks'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, \WebProject\DockerApi\Library\Generated\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); unset($data['Networks']); + } elseif (array_key_exists('Networks', $data) && null === $data['Networks']) { + $object->setNetworks(null); } if (array_key_exists('EndpointSpec', $data)) { $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \WebProject\DockerApi\Library\Generated\Model\EndpointSpec::class, 'json', $context)); diff --git a/generated/Normalizer/SystemDfGetJsonResponse200Normalizer.php b/generated/Normalizer/SystemDfGetJsonResponse200Normalizer.php index ecc21d2..58ace48 100644 --- a/generated/Normalizer/SystemDfGetJsonResponse200Normalizer.php +++ b/generated/Normalizer/SystemDfGetJsonResponse200Normalizer.php @@ -67,15 +67,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setContainers($values_1); unset($data['Containers']); } - if (array_key_exists('Volumes', $data) && null !== $data['Volumes']) { + if (array_key_exists('Volumes', $data)) { $values_2 = []; foreach ($data['Volumes'] as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, \WebProject\DockerApi\Library\Generated\Model\Volume::class, 'json', $context); } $object->setVolumes($values_2); unset($data['Volumes']); - } elseif (array_key_exists('Volumes', $data) && null === $data['Volumes']) { - $object->setVolumes(null); } if (array_key_exists('BuildCache', $data)) { $values_3 = []; diff --git a/generated/Normalizer/SystemInfoNormalizer.php b/generated/Normalizer/SystemInfoNormalizer.php index 8fef688..c10b9fb 100644 --- a/generated/Normalizer/SystemInfoNormalizer.php +++ b/generated/Normalizer/SystemInfoNormalizer.php @@ -75,12 +75,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (array_key_exists('IPv4Forwarding', $data) && is_int($data['IPv4Forwarding'])) { $data['IPv4Forwarding'] = (bool) $data['IPv4Forwarding']; } - if (array_key_exists('BridgeNfIptables', $data) && is_int($data['BridgeNfIptables'])) { - $data['BridgeNfIptables'] = (bool) $data['BridgeNfIptables']; - } - if (array_key_exists('BridgeNfIp6tables', $data) && is_int($data['BridgeNfIp6tables'])) { - $data['BridgeNfIp6tables'] = (bool) $data['BridgeNfIp6tables']; - } if (array_key_exists('Debug', $data) && is_int($data['Debug'])) { $data['Debug'] = (bool) $data['Debug']; } @@ -181,14 +175,6 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setIPv4Forwarding($data['IPv4Forwarding']); unset($data['IPv4Forwarding']); } - if (array_key_exists('BridgeNfIptables', $data)) { - $object->setBridgeNfIptables($data['BridgeNfIptables']); - unset($data['BridgeNfIptables']); - } - if (array_key_exists('BridgeNfIp6tables', $data)) { - $object->setBridgeNfIp6tables($data['BridgeNfIp6tables']); - unset($data['BridgeNfIp6tables']); - } if (array_key_exists('Debug', $data)) { $object->setDebug($data['Debug']); unset($data['Debug']); @@ -359,20 +345,34 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setDefaultAddressPools($values_6); unset($data['DefaultAddressPools']); } - if (array_key_exists('Warnings', $data)) { + if (array_key_exists('FirewallBackend', $data) && null !== $data['FirewallBackend']) { + $object->setFirewallBackend($this->denormalizer->denormalize($data['FirewallBackend'], \WebProject\DockerApi\Library\Generated\Model\FirewallInfo::class, 'json', $context)); + unset($data['FirewallBackend']); + } elseif (array_key_exists('FirewallBackend', $data) && null === $data['FirewallBackend']) { + $object->setFirewallBackend(null); + } + if (array_key_exists('DiscoveredDevices', $data)) { $values_7 = []; - foreach ($data['Warnings'] as $value_7) { - $values_7[] = $value_7; + foreach ($data['DiscoveredDevices'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \WebProject\DockerApi\Library\Generated\Model\DeviceInfo::class, 'json', $context); } - $object->setWarnings($values_7); - unset($data['Warnings']); + $object->setDiscoveredDevices($values_7); + unset($data['DiscoveredDevices']); } - if (array_key_exists('CDISpecDirs', $data)) { + if (array_key_exists('Warnings', $data)) { $values_8 = []; - foreach ($data['CDISpecDirs'] as $value_8) { + foreach ($data['Warnings'] as $value_8) { $values_8[] = $value_8; } - $object->setCDISpecDirs($values_8); + $object->setWarnings($values_8); + unset($data['Warnings']); + } + if (array_key_exists('CDISpecDirs', $data)) { + $values_9 = []; + foreach ($data['CDISpecDirs'] as $value_9) { + $values_9[] = $value_9; + } + $object->setCDISpecDirs($values_9); unset($data['CDISpecDirs']); } if (array_key_exists('Containerd', $data) && null !== $data['Containerd']) { @@ -381,9 +381,9 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('Containerd', $data) && null === $data['Containerd']) { $object->setContainerd(null); } - foreach ($data as $key_1 => $value_9) { + foreach ($data as $key_1 => $value_10) { if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_9; + $object[$key_1] = $value_10; } } @@ -461,12 +461,6 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('iPv4Forwarding') && null !== $data->getIPv4Forwarding()) { $dataArray['IPv4Forwarding'] = $data->getIPv4Forwarding(); } - if ($data->isInitialized('bridgeNfIptables') && null !== $data->getBridgeNfIptables()) { - $dataArray['BridgeNfIptables'] = $data->getBridgeNfIptables(); - } - if ($data->isInitialized('bridgeNfIp6tables') && null !== $data->getBridgeNfIp6tables()) { - $dataArray['BridgeNfIp6tables'] = $data->getBridgeNfIp6tables(); - } if ($data->isInitialized('debug') && null !== $data->getDebug()) { $dataArray['Debug'] = $data->getDebug(); } @@ -598,26 +592,36 @@ public function normalize(mixed $data, ?string $format = null, array $context = } $dataArray['DefaultAddressPools'] = $values_6; } - if ($data->isInitialized('warnings') && null !== $data->getWarnings()) { + if ($data->isInitialized('firewallBackend') && null !== $data->getFirewallBackend()) { + $dataArray['FirewallBackend'] = $this->normalizer->normalize($data->getFirewallBackend(), 'json', $context); + } + if ($data->isInitialized('discoveredDevices') && null !== $data->getDiscoveredDevices()) { $values_7 = []; - foreach ($data->getWarnings() as $value_7) { - $values_7[] = $value_7; + foreach ($data->getDiscoveredDevices() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); } - $dataArray['Warnings'] = $values_7; + $dataArray['DiscoveredDevices'] = $values_7; } - if ($data->isInitialized('cDISpecDirs') && null !== $data->getCDISpecDirs()) { + if ($data->isInitialized('warnings') && null !== $data->getWarnings()) { $values_8 = []; - foreach ($data->getCDISpecDirs() as $value_8) { + foreach ($data->getWarnings() as $value_8) { $values_8[] = $value_8; } - $dataArray['CDISpecDirs'] = $values_8; + $dataArray['Warnings'] = $values_8; + } + if ($data->isInitialized('cDISpecDirs') && null !== $data->getCDISpecDirs()) { + $values_9 = []; + foreach ($data->getCDISpecDirs() as $value_9) { + $values_9[] = $value_9; + } + $dataArray['CDISpecDirs'] = $values_9; } if ($data->isInitialized('containerd') && null !== $data->getContainerd()) { $dataArray['Containerd'] = $this->normalizer->normalize($data->getContainerd(), 'json', $context); } - foreach ($data as $key_1 => $value_9) { + foreach ($data as $key_1 => $value_10) { if (preg_match('/.*/', (string) $key_1)) { - $dataArray[$key_1] = $value_9; + $dataArray[$key_1] = $value_10; } } diff --git a/generated/Normalizer/SystemVersionComponentsItemDetailsNormalizer.php b/generated/Normalizer/SystemVersionComponentsItemDetailsNormalizer.php deleted file mode 100644 index d6c7f37..0000000 --- a/generated/Normalizer/SystemVersionComponentsItemDetailsNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItemDetails::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/SystemVersionComponentsItemNormalizer.php b/generated/Normalizer/SystemVersionComponentsItemNormalizer.php index bdcdd94..2cb02cd 100644 --- a/generated/Normalizer/SystemVersionComponentsItemNormalizer.php +++ b/generated/Normalizer/SystemVersionComponentsItemNormalizer.php @@ -56,14 +56,18 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['Version']); } if (array_key_exists('Details', $data) && null !== $data['Details']) { - $object->setDetails($this->denormalizer->denormalize($data['Details'], \WebProject\DockerApi\Library\Generated\Model\SystemVersionComponentsItemDetails::class, 'json', $context)); + $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Details'] as $key => $value) { + $values[$key] = $value; + } + $object->setDetails($values); unset($data['Details']); } elseif (array_key_exists('Details', $data) && null === $data['Details']) { $object->setDetails(null); } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } } @@ -76,11 +80,15 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['Name'] = $data->getName(); $dataArray['Version'] = $data->getVersion(); if ($data->isInitialized('details') && null !== $data->getDetails()) { - $dataArray['Details'] = $this->normalizer->normalize($data->getDetails(), 'json', $context); + $values = []; + foreach ($data->getDetails() as $key => $value) { + $values[$key] = $value; + } + $dataArray['Details'] = $values; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } } diff --git a/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php index bae3353..235d58e 100644 --- a/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php +++ b/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php @@ -52,7 +52,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['File']); } if (array_key_exists('Runtime', $data)) { - $object->setRuntime($this->denormalizer->denormalize($data['Runtime'], \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemRuntime::class, 'json', $context)); + $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Runtime'] as $key => $value) { + $values[$key] = $value; + } + $object->setRuntime($values); unset($data['Runtime']); } if (array_key_exists('ConfigID', $data)) { @@ -63,9 +67,9 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setConfigName($data['ConfigName']); unset($data['ConfigName']); } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } } @@ -79,7 +83,11 @@ public function normalize(mixed $data, ?string $format = null, array $context = $dataArray['File'] = $this->normalizer->normalize($data->getFile(), 'json', $context); } if ($data->isInitialized('runtime') && null !== $data->getRuntime()) { - $dataArray['Runtime'] = $this->normalizer->normalize($data->getRuntime(), 'json', $context); + $values = []; + foreach ($data->getRuntime() as $key => $value) { + $values[$key] = $value; + } + $dataArray['Runtime'] = $values; } if ($data->isInitialized('configID') && null !== $data->getConfigID()) { $dataArray['ConfigID'] = $data->getConfigID(); @@ -87,9 +95,9 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('configName') && null !== $data->getConfigName()) { $dataArray['ConfigName'] = $data->getConfigName(); } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } } diff --git a/generated/Normalizer/TaskSpecContainerSpecConfigsItemRuntimeNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecConfigsItemRuntimeNormalizer.php deleted file mode 100644 index 3499d8b..0000000 --- a/generated/Normalizer/TaskSpecContainerSpecConfigsItemRuntimeNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecConfigsItemRuntime::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/generated/Normalizer/TaskSpecContainerSpecNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php index 74f5404..81519f1 100644 --- a/generated/Normalizer/TaskSpecContainerSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php @@ -218,15 +218,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setCapabilityDrop($values_11); unset($data['CapabilityDrop']); } - if (array_key_exists('Ulimits', $data) && null !== $data['Ulimits']) { + if (array_key_exists('Ulimits', $data)) { $values_12 = []; foreach ($data['Ulimits'] as $value_12) { $values_12[] = $this->denormalizer->denormalize($value_12, \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpecUlimitsItem::class, 'json', $context); } $object->setUlimits($values_12); unset($data['Ulimits']); - } elseif (array_key_exists('Ulimits', $data) && null === $data['Ulimits']) { - $object->setUlimits(null); } foreach ($data as $key_2 => $value_13) { if (preg_match('/.*/', (string) $key_2)) { diff --git a/generated/Normalizer/TaskSpecNormalizer.php b/generated/Normalizer/TaskSpecNormalizer.php index 698eeec..0399a81 100644 --- a/generated/Normalizer/TaskSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecNormalizer.php @@ -55,11 +55,9 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setContainerSpec($this->denormalizer->denormalize($data['ContainerSpec'], \WebProject\DockerApi\Library\Generated\Model\TaskSpecContainerSpec::class, 'json', $context)); unset($data['ContainerSpec']); } - if (array_key_exists('NetworkAttachmentSpec', $data) && null !== $data['NetworkAttachmentSpec']) { + if (array_key_exists('NetworkAttachmentSpec', $data)) { $object->setNetworkAttachmentSpec($this->denormalizer->denormalize($data['NetworkAttachmentSpec'], \WebProject\DockerApi\Library\Generated\Model\TaskSpecNetworkAttachmentSpec::class, 'json', $context)); unset($data['NetworkAttachmentSpec']); - } elseif (array_key_exists('NetworkAttachmentSpec', $data) && null === $data['NetworkAttachmentSpec']) { - $object->setNetworkAttachmentSpec(null); } if (array_key_exists('Resources', $data)) { $object->setResources($this->denormalizer->denormalize($data['Resources'], \WebProject\DockerApi\Library\Generated\Model\TaskSpecResources::class, 'json', $context)); @@ -81,13 +79,15 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a $object->setRuntime($data['Runtime']); unset($data['Runtime']); } - if (array_key_exists('Networks', $data)) { + if (array_key_exists('Networks', $data) && null !== $data['Networks']) { $values = []; foreach ($data['Networks'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values); unset($data['Networks']); + } elseif (array_key_exists('Networks', $data) && null === $data['Networks']) { + $object->setNetworks(null); } if (array_key_exists('LogDriver', $data)) { $object->setLogDriver($this->denormalizer->denormalize($data['LogDriver'], \WebProject\DockerApi\Library\Generated\Model\TaskSpecLogDriver::class, 'json', $context)); diff --git a/generated/Normalizer/VolumeListResponseNormalizer.php b/generated/Normalizer/VolumeListResponseNormalizer.php index d17d38d..e78f86d 100644 --- a/generated/Normalizer/VolumeListResponseNormalizer.php +++ b/generated/Normalizer/VolumeListResponseNormalizer.php @@ -47,15 +47,13 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (null === $data || false === is_array($data)) { return $object; } - if (array_key_exists('Volumes', $data) && null !== $data['Volumes']) { + if (array_key_exists('Volumes', $data)) { $values = []; foreach ($data['Volumes'] as $value) { $values[] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\Volume::class, 'json', $context); } $object->setVolumes($values); unset($data['Volumes']); - } elseif (array_key_exists('Volumes', $data) && null === $data['Volumes']) { - $object->setVolumes(null); } if (array_key_exists('Warnings', $data)) { $values_1 = []; diff --git a/generated/Normalizer/VolumeNormalizer.php b/generated/Normalizer/VolumeNormalizer.php index 6a4da95..67f3619 100644 --- a/generated/Normalizer/VolumeNormalizer.php +++ b/generated/Normalizer/VolumeNormalizer.php @@ -66,17 +66,21 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a if (array_key_exists('Status', $data)) { $values = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); foreach ($data['Status'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \WebProject\DockerApi\Library\Generated\Model\VolumeStatusItem::class, 'json', $context); + $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $object->setStatus($values); unset($data['Status']); } if (array_key_exists('Labels', $data)) { - $values_1 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; + $values_2 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - $object->setLabels($values_1); + $object->setLabels($values_2); unset($data['Labels']); } if (array_key_exists('Scope', $data)) { @@ -88,11 +92,11 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a unset($data['ClusterVolume']); } if (array_key_exists('Options', $data)) { - $values_2 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Options'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; + $values_3 = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key_3 => $value_3) { + $values_3[$key_3] = $value_3; } - $object->setOptions($values_2); + $object->setOptions($values_3); unset($data['Options']); } if (array_key_exists('UsageData', $data) && null !== $data['UsageData']) { @@ -101,9 +105,9 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a } elseif (array_key_exists('UsageData', $data) && null === $data['UsageData']) { $object->setUsageData(null); } - foreach ($data as $key_3 => $value_3) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_3; + foreach ($data as $key_4 => $value_4) { + if (preg_match('/.*/', (string) $key_4)) { + $object[$key_4] = $value_4; } } @@ -122,30 +126,34 @@ public function normalize(mixed $data, ?string $format = null, array $context = if ($data->isInitialized('status') && null !== $data->getStatus()) { $values = []; foreach ($data->getStatus() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $values[$key] = $values_1; } $dataArray['Status'] = $values; } - $values_1 = []; - foreach ($data->getLabels() as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; + $values_2 = []; + foreach ($data->getLabels() as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - $dataArray['Labels'] = $values_1; + $dataArray['Labels'] = $values_2; $dataArray['Scope'] = $data->getScope(); if ($data->isInitialized('clusterVolume') && null !== $data->getClusterVolume()) { $dataArray['ClusterVolume'] = $this->normalizer->normalize($data->getClusterVolume(), 'json', $context); } - $values_2 = []; - foreach ($data->getOptions() as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; + $values_3 = []; + foreach ($data->getOptions() as $key_3 => $value_3) { + $values_3[$key_3] = $value_3; } - $dataArray['Options'] = $values_2; + $dataArray['Options'] = $values_3; if ($data->isInitialized('usageData') && null !== $data->getUsageData()) { $dataArray['UsageData'] = $this->normalizer->normalize($data->getUsageData(), 'json', $context); } - foreach ($data as $key_3 => $value_3) { - if (preg_match('/.*/', (string) $key_3)) { - $dataArray[$key_3] = $value_3; + foreach ($data as $key_4 => $value_4) { + if (preg_match('/.*/', (string) $key_4)) { + $dataArray[$key_4] = $value_4; } } diff --git a/generated/Normalizer/VolumeStatusItemNormalizer.php b/generated/Normalizer/VolumeStatusItemNormalizer.php deleted file mode 100644 index 58a1c1d..0000000 --- a/generated/Normalizer/VolumeStatusItemNormalizer.php +++ /dev/null @@ -1,79 +0,0 @@ - $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; - } - - public function normalize(mixed $data, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string - { - $dataArray = []; - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $dataArray[$key] = $value; - } - } - - return $dataArray; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\WebProject\DockerApi\Library\Generated\Model\VolumeStatusItem::class => true]; - } - - public function hasCacheableSupportsMethod(): bool - { - return true; - } -} diff --git a/spec/UPDATE.md b/spec/UPDATE.md new file mode 100644 index 0000000..f40bc10 --- /dev/null +++ b/spec/UPDATE.md @@ -0,0 +1,17 @@ +# Upgrade schema + +1) goto: https://docs.docker.com/reference/api/engine/latest/ +2) download schema to "specs/" folder +3) run command to convert schema to openapi v3.1.0 + ```shell + npx -p swagger2openapi swagger2openapi --yaml -t 3.1.0 --outfile docker-v1.51-patched.yaml v1.51.yam + ``` +4) update jane config [.jane-openapi](../.jane-openapi) "openapi-file" to the new patched file +5) run composer command to generate classes from schema + ```shell + composer generate + ``` +6) run tests + ```shell + composer tests + ``` \ No newline at end of file diff --git a/spec/docker-v1.51-patched.yaml b/spec/docker-v1.51-patched.yaml new file mode 100644 index 0000000..532ba4a --- /dev/null +++ b/spec/docker-v1.51-patched.yaml @@ -0,0 +1,16248 @@ +openapi: 3.1.0 +info: + title: Docker Engine API + version: "1.51" + x-logo: + url: https://docs.docker.com/assets/images/logo-docker-main.png + description: > + The Engine API is an HTTP API served by Docker Engine. It is the API the + + Docker client uses to communicate with the Engine, so everything the Docker + + client can do can be done with the API. + + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` + + is `GET /containers/json`). The notable exception is running containers, + + which consists of several API calls. + + + # Errors + + + The API uses standard HTTP status codes to indicate the success or failure + + of the API call. The body of the response will be JSON in the following + + format: + + + ``` + + { + "message": "page not found" + } + + ``` + + + # Versioning + + + The API is usually changed in each release, so API calls are versioned to + + ensure that clients don't break. To lock to a specific version of the API, + + you prefix the URL with its version, for example, call `/v1.30/info` to use + + the v1.30 version of the `/info` endpoint. If the API version specified in + + the URL is not supported by the daemon, a HTTP `400 Bad Request` error message + + is returned. + + + If you omit the version-prefix, the current version of the API (v1.50) is used. + + For example, calling `/info` is the same as calling `/v1.51/info`. Using the + + API without a version-prefix is deprecated and will be removed in a future release. + + + Engine releases in the near future should support this version of the API, + + so your client will continue to work even if it is talking to a newer Engine. + + + The API uses an open schema model, which means the server may add extra properties + + to responses. Likewise, the server will ignore any extra query parameters and + + request body properties. When you write clients, you need to ignore additional + + properties in responses to ensure they do not break when talking to newer + + daemons. + + + + # Authentication + + + Authentication for registries is handled client side. The client has to send + + authentication details to various endpoints that need to communicate with + + registries, such as `POST /images/(name)/push`. These are sent as + + `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) + + (JSON) string with the following structure: + + + ``` + + { + "username": "string", + "password": "string", + "serveraddress": "string" + } + + ``` + + + The `serveraddress` is a domain/IP without a protocol. Throughout this + + structure, double quotes are required. + + + If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), + + you can just pass this instead of credentials: + + + ``` + + { + "identitytoken": "9cbaf023786cd7..." + } + + ``` +tags: + - name: Container + x-displayName: Containers + description: | + Create and manage containers. + - name: Image + x-displayName: Images + - name: Network + x-displayName: Networks + description: | + Networks are user-defined networks that containers can be attached to. + See the [networking documentation](https://docs.docker.com/network/) + for more information. + - name: Volume + x-displayName: Volumes + description: | + Create and manage persistent storage that can be attached to containers. + - name: Exec + x-displayName: Exec + description: > + Run new commands inside running containers. Refer to the + + [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) + + for more information. + + + To exec a command in a container, you first need to create an exec instance, + + then start it. These two API endpoints are wrapped up in a single command-line + + command, `docker exec`. + - name: Swarm + x-displayName: Swarm + description: | + Engines can be clustered together in a swarm. Refer to the + [swarm mode documentation](https://docs.docker.com/engine/swarm/) + for more information. + - name: Node + x-displayName: Nodes + description: | + Nodes are instances of the Engine participating in a swarm. Swarm mode + must be enabled for these endpoints to work. + - name: Service + x-displayName: Services + description: | + Services are the definitions of tasks to run on a swarm. Swarm mode must + be enabled for these endpoints to work. + - name: Task + x-displayName: Tasks + description: | + A task is a container running on a swarm. It is the atomic scheduling unit + of swarm. Swarm mode must be enabled for these endpoints to work. + - name: Secret + x-displayName: Secrets + description: | + Secrets are sensitive data that can be used by services. Swarm mode must + be enabled for these endpoints to work. + - name: Config + x-displayName: Configs + description: | + Configs are application configurations that can be used by services. Swarm + mode must be enabled for these endpoints to work. + - name: Plugin + x-displayName: Plugins + - name: System + x-displayName: System +paths: + /containers/json: + get: + summary: List containers + description: | + Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + operationId: ContainerList + parameters: + - name: all + in: query + description: > + Return all containers. By default, only running containers are shown. + schema: + type: boolean + default: false + - name: limit + in: query + description: | + Return this number of most recently created containers, including + non-running ones. + schema: + type: integer + - name: size + in: query + description: | + Return the size of container as fields `SizeRw` and `SizeRootFs`. + schema: + type: boolean + default: false + - name: filters + in: query + description: > + Filters to process on the container list, encoded as JSON (a + + `map[string][]string`). For example, `{"status": ["paused"]}` will + + only return paused containers. + + + Available filters: + + + - `ancestor`=(`[:]`, ``, or ``) + + - `before`=(`` or ``) + + - `expose`=(`[/]`|`/[]`) + + - `exited=` containers with exit code of `` + + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + + - `id=` a container's ID + + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + + - `is-task=`(`true`|`false`) + + - `label=key` or `label="key=value"` of a container label + + - `name=` a container's name + + - `network`=(`` or ``) + + - `publish`=(`[/]`|`/[]`) + + - `since`=(`` or ``) + + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + + - `volume`=(`` or ``) + schema: + type: string + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ContainerSummary" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Container + /containers/create: + post: + summary: Create a container + operationId: ContainerCreate + parameters: + - name: name + in: query + description: | + Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + schema: + type: string + pattern: ^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$ + - name: platform + in: query + description: > + Platform in the format `os[/arch[/variant]]` used for image lookup. + + + When specified, the daemon checks if the requested image is present + + in the local image cache with the given OS and Architecture, and + + otherwise returns a `404` status. + + + If the option is not set, the host's native OS and Architecture are + + used to look up the image in the image cache. However, if no platform + + is passed and the given image does exist in the local image cache, + + but its OS or architecture does not match, the container is created + + with the available image, and a warning is added to the `Warnings` + + field in the response, for example; + + WARNING: The requested image's platform (linux/arm64/v8) does not + match the detected host platform (linux/amd64) and no + specific platform was requested + schema: + type: string + default: "" + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ContainerConfig" + - type: object + properties: + HostConfig: + $ref: "#/components/schemas/HostConfig" + NetworkingConfig: + $ref: "#/components/schemas/NetworkingConfig" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - FOO=bar + - BAZ=quux + Cmd: + - date + Entrypoint: "" + Image: ubuntu + Labels: + com.example.vendor: Acme + com.example.license: GPL + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: 12:34:56:78:9a:bc + ExposedPorts: + 22/tcp: {} + StopSignal: SIGTERM + StopTimeout: 10 + HostConfig: + Binds: + - /tmp:/tmp + Links: + - redis3:redis + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: 0,1 + CpusetMems: 0,1 + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + DeviceRequests: + - Driver: nvidia + Count: -1 + DeviceIDs": + - "0" + - "1" + - GPU-fef8089b-4820-abfc-e83e-94318197576e + Capabilities: + - - gpu + - nvidia + - compute + Options: + property1: string + property2: string + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: 0 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - 8.8.8.8 + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - parent + - other:ro + CapAdd: + - NET_ADMIN + CapDrop: + - MKNOD + GroupAdd: + - newgroup + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: bridge + Devices: [] + Ulimits: + - {} + LogConfig: + Type: json-file + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: 172.20.30.33 + IPv6Address: 2001:db8:abcd::3033 + LinkLocalIPs: + - 169.254.34.68 + - fe80::3468 + Links: + - container_1 + - container_2 + Aliases: + - server_x + - server_y + database_nw: {} + application/octet-stream: + schema: + allOf: + - $ref: "#/components/schemas/ContainerConfig" + - type: object + properties: + HostConfig: + $ref: "#/components/schemas/HostConfig" + NetworkingConfig: + $ref: "#/components/schemas/NetworkingConfig" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - FOO=bar + - BAZ=quux + Cmd: + - date + Entrypoint: "" + Image: ubuntu + Labels: + com.example.vendor: Acme + com.example.license: GPL + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: 12:34:56:78:9a:bc + ExposedPorts: + 22/tcp: {} + StopSignal: SIGTERM + StopTimeout: 10 + HostConfig: + Binds: + - /tmp:/tmp + Links: + - redis3:redis + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: 0,1 + CpusetMems: 0,1 + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + DeviceRequests: + - Driver: nvidia + Count: -1 + DeviceIDs": + - "0" + - "1" + - GPU-fef8089b-4820-abfc-e83e-94318197576e + Capabilities: + - - gpu + - nvidia + - compute + Options: + property1: string + property2: string + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: 0 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - 8.8.8.8 + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - parent + - other:ro + CapAdd: + - NET_ADMIN + CapDrop: + - MKNOD + GroupAdd: + - newgroup + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: bridge + Devices: [] + Ulimits: + - {} + LogConfig: + Type: json-file + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: 172.20.30.33 + IPv6Address: 2001:db8:abcd::3033 + LinkLocalIPs: + - 169.254.34.68 + - fe80::3468 + Links: + - container_1 + - container_2 + Aliases: + - server_x + - server_y + database_nw: {} + description: Container to create + required: true + responses: + "201": + description: Container created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerCreateResponse" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such image: c2ada9df5af8" + "409": + description: conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Container + "/containers/{id}/json": + get: + summary: Inspect a container + description: Return low-level information about a container. + operationId: ContainerInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerInspectResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: size + in: query + description: Return the size of container as fields `SizeRw` and `SizeRootFs` + schema: + type: boolean + default: false + tags: + - Container + "/containers/{id}/top": + get: + summary: List processes running inside a container + description: | + On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + operationId: ContainerTop + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerTopResponse" + text/plain: + schema: + $ref: "#/components/schemas/ContainerTopResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: ps_args + in: query + description: The arguments to pass to `ps`. For example, `aux` + schema: + type: string + default: -ef + tags: + - Container + "/containers/{id}/logs": + get: + summary: Get container logs + description: | + Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. + operationId: ContainerLogs + responses: + "200": + description: > + logs returned as a stream in response body. + + For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + + Note that unlike the attach endpoint, the logs endpoint does not + + upgrade the connection and does not set Content-Type. + content: + application/vnd.docker.raw-stream: + schema: + type: string + format: binary + application/vnd.docker.multiplexed-stream: + schema: + type: string + format: binary + "404": + description: no such container + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: follow + in: query + description: Keep connection after returning logs. + schema: + type: boolean + default: false + - name: stdout + in: query + description: Return logs from `stdout` + schema: + type: boolean + default: false + - name: stderr + in: query + description: Return logs from `stderr` + schema: + type: boolean + default: false + - name: since + in: query + description: Only return logs since this time, as a UNIX timestamp + schema: + type: integer + default: 0 + - name: until + in: query + description: Only return logs before this time, as a UNIX timestamp + schema: + type: integer + default: 0 + - name: timestamps + in: query + description: Add timestamps to every log line + schema: + type: boolean + default: false + - name: tail + in: query + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + schema: + type: string + default: all + tags: + - Container + "/containers/{id}/changes": + get: + summary: Get changes on a container’s filesystem + description: > + Returns which files in a container's filesystem have been added, + deleted, + + or modified. The `Kind` of modification can be one of: + + + - `0`: Modified ("C") + + - `1`: Added ("A") + + - `2`: Deleted ("D") + operationId: ContainerChanges + responses: + "200": + description: The list of changes + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/FilesystemChange" + examples: + response: + value: + - Path: /dev + Kind: 0 + - Path: /dev/kmsg + Kind: 1 + - Path: /test + Kind: 1 + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + tags: + - Container + "/containers/{id}/export": + get: + summary: Export a container + description: Export the contents of a container as a tarball. + operationId: ContainerExport + responses: + "200": + description: no error + "404": + description: no such container + content: + application/octet-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/octet-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + tags: + - Container + "/containers/{id}/stats": + get: + summary: Get container stats based on resource usage + description: > + This endpoint returns a live stream of a container’s resource usage + + statistics. + + + The `precpu_stats` is the CPU statistic of the *previous* read, and is + + used to calculate the CPU usage percentage. It is not an exact copy + + of the `cpu_stats` field. + + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + + nil then for compatibility with older daemons the length of the + + corresponding `cpu_usage.percpu_usage` array should be used. + + + On a cgroup v2 host, the following fields are not set + + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + + * `cpu_stats`: `cpu_usage.percpu_usage` + + * `memory_stats`: `max_usage` and `failcnt` + + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + + To calculate the values shown by the `stats` command of the docker cli tool + + the following formulas can be used: + + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + + * available_memory = `memory_stats.limit` + + * Memory usage % = `(used_memory / available_memory) * 100.0` + + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + operationId: ContainerStats + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerStatsResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: stream + in: query + description: | + Stream the output. If false, the stats will be output once and then + it will disconnect. + schema: + type: boolean + default: true + - name: one-shot + in: query + description: | + Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + schema: + type: boolean + default: false + tags: + - Container + "/containers/{id}/resize": + post: + summary: Resize a container TTY + description: Resize the TTY for a container. + operationId: ContainerResize + responses: + "200": + description: no error + "404": + description: no such container + content: + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: cannot resize container + content: + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: h + in: query + required: true + description: Height of the TTY session in characters + schema: + type: integer + - name: w + in: query + required: true + description: Width of the TTY session in characters + schema: + type: integer + tags: + - Container + "/containers/{id}/start": + post: + summary: Start a container + operationId: ContainerStart + responses: + "204": + description: no error + "304": + description: container already started + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: detachKeys + in: query + description: | + Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + schema: + type: string + tags: + - Container + "/containers/{id}/stop": + post: + summary: Stop a container + operationId: ContainerStop + responses: + "204": + description: no error + "304": + description: container already stopped + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: signal + in: query + description: > + Signal to send to the container as an integer or string (e.g. + `SIGINT`). + schema: + type: string + - name: t + in: query + description: Number of seconds to wait before killing the container + schema: + type: integer + tags: + - Container + "/containers/{id}/restart": + post: + summary: Restart a container + operationId: ContainerRestart + responses: + "204": + description: no error + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: signal + in: query + description: > + Signal to send to the container as an integer or string (e.g. + `SIGINT`). + schema: + type: string + - name: t + in: query + description: Number of seconds to wait before killing the container + schema: + type: integer + tags: + - Container + "/containers/{id}/kill": + post: + summary: Kill a container + description: | + Send a POSIX signal to a container, defaulting to killing to the + container. + operationId: ContainerKill + responses: + "204": + description: no error + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: container is not running + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: Container + d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 + is not running + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: signal + in: query + description: > + Signal to send to the container as an integer or string (e.g. + `SIGINT`). + schema: + type: string + default: SIGKILL + tags: + - Container + "/containers/{id}/update": + post: + summary: Update a container + description: | + Change various configuration options of a container without having to + recreate it. + operationId: ContainerUpdate + responses: + "200": + description: The container has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerUpdateResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/Resources" + - type: object + properties: + RestartPolicy: + $ref: "#/components/schemas/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpusetCpus: 0,1 + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + RestartPolicy: + MaximumRetryCount: 4 + Name: on-failure + required: true + tags: + - Container + "/containers/{id}/rename": + post: + summary: Rename a container + operationId: ContainerRename + responses: + "204": + description: no error + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: name already in use + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: name + in: query + required: true + description: New name for the container + schema: + type: string + tags: + - Container + "/containers/{id}/pause": + post: + summary: Pause a container + description: | + Use the freezer cgroup to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. + operationId: ContainerPause + responses: + "204": + description: no error + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + tags: + - Container + "/containers/{id}/unpause": + post: + summary: Unpause a container + description: Resume a container which has been paused. + operationId: ContainerUnpause + responses: + "204": + description: no error + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + tags: + - Container + "/containers/{id}/attach": + post: + summary: Attach to a container + description: > + Attach to a container to read its output or send it input. You can + attach + + to the same container multiple times and you can reattach to containers + + that have been detached. + + + Either the `stream` or `logs` parameter must be `true` for this endpoint + + to do anything. + + + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + + for more details. + + + ### Hijacking + + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + + and `stderr` on the same socket. + + + This is the response from the daemon for an attach request: + + + ``` + + HTTP/1.1 200 OK + + Content-Type: application/vnd.docker.raw-stream + + + [STREAM] + + ``` + + + After the headers and two new lines, the TCP connection can now be used + + for raw, bidirectional communication between the client and server. + + + To hint potential proxies about connection hijacking, the Docker client + + can also optionally send connection upgrade headers. + + + For example, the client sends this request to upgrade the connection: + + + ``` + + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + + Upgrade: tcp + + Connection: Upgrade + + ``` + + + The Docker daemon will respond with a `101 UPGRADED` response, and will + + similarly follow with the raw stream: + + + ``` + + HTTP/1.1 101 UPGRADED + + Content-Type: application/vnd.docker.raw-stream + + Connection: Upgrade + + Upgrade: tcp + + + [STREAM] + + ``` + + + ### Stream format + + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + + the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream + + and the stream over the hijacked connected is multiplexed to separate out + + `stdout` and `stderr`. The stream consists of a series of frames, each + + containing a header and a payload. + + + The header contains the information which the stream writes (`stdout` or + + `stderr`). It also contains the size of the associated frame encoded in + + the last four bytes (`uint32`). + + + It is encoded on the first eight bytes like this: + + + ```go + + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + + ``` + + + `STREAM_TYPE` can be: + + + - 0: `stdin` (is written on `stdout`) + + - 1: `stdout` + + - 2: `stderr` + + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + + encoded as big endian. + + + Following the header is the payload, which is the specified number of + + bytes of `STREAM_TYPE`. + + + The simplest way to implement this protocol is the following: + + + 1. Read 8 bytes. + + 2. Choose `stdout` or `stderr` depending on the first byte. + + 3. Extract the frame size from the last four bytes. + + 4. Read the extracted size and output it on the correct output. + + 5. Goto 1. + + + ### Stream format when using a TTY + + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + + the stream is not multiplexed. The data exchanged over the hijacked + + connection is simply the raw data from the process PTY and client's + + `stdin`. + operationId: ContainerAttach + responses: + "101": + description: no error, hints proxy about hijacking + "200": + description: no error, no upgrade header found + "400": + description: bad parameter + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such container + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: detachKeys + in: query + description: > + Override the key sequence for detaching a container.Format is a + single + + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + + `@`, `^`, `[`, `,` or `_`. + schema: + type: string + - name: logs + in: query + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you + want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. + schema: + type: boolean + default: false + - name: stream + in: query + description: | + Stream attached streams from the time the request was made onwards. + schema: + type: boolean + default: false + - name: stdin + in: query + description: Attach to `stdin` + schema: + type: boolean + default: false + - name: stdout + in: query + description: Attach to `stdout` + schema: + type: boolean + default: false + - name: stderr + in: query + description: Attach to `stderr` + schema: + type: boolean + default: false + tags: + - Container + "/containers/{id}/attach/ws": + get: + summary: Attach to a container via a websocket + operationId: ContainerAttachWebsocket + responses: + "101": + description: no error, hints proxy about hijacking + "200": + description: no error, no upgrade header found + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: detachKeys + in: query + description: > + Override the key sequence for detaching a container.Format is a + single + + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + + `@`, `^`, `[`, `,`, or `_`. + schema: + type: string + - name: logs + in: query + description: Return logs + schema: + type: boolean + default: false + - name: stream + in: query + description: Return stream + schema: + type: boolean + default: false + - name: stdin + in: query + description: Attach to `stdin` + schema: + type: boolean + default: false + - name: stdout + in: query + description: Attach to `stdout` + schema: + type: boolean + default: false + - name: stderr + in: query + description: Attach to `stderr` + schema: + type: boolean + default: false + tags: + - Container + "/containers/{id}/wait": + post: + summary: Wait for a container + description: Block until a container stops, then returns the exit code. + operationId: ContainerWait + responses: + "200": + description: The container has exit. + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerWaitResponse" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: condition + in: query + description: | + Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. + schema: + type: string + enum: + - not-running + - next-exit + - removed + default: not-running + tags: + - Container + "/containers/{id}": + delete: + summary: Remove a container + operationId: ContainerDelete + responses: + "204": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: > + You cannot remove a running container: c2ada9df5af8. Stop + the + + container before attempting removal or force remove + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: v + in: query + description: Remove anonymous volumes associated with the container. + schema: + type: boolean + default: false + - name: force + in: query + description: If the container is running, kill it before removing it. + schema: + type: boolean + default: false + - name: link + in: query + description: Remove the specified link associated with the container. + schema: + type: boolean + default: false + tags: + - Container + "/containers/{id}/archive": + head: + summary: Get information about files in a container + description: | + A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + operationId: ContainerArchiveInfo + responses: + "200": + description: no error + headers: + X-Docker-Container-Path-Stat: + description: | + A base64 - encoded JSON object with some filesystem header + information about the path + schema: + type: string + "400": + description: Bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Container or path does not exist + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: path + in: query + required: true + description: Resource in the container’s filesystem to archive. + schema: + type: string + tags: + - Container + get: + summary: Get an archive of a filesystem resource in a container + description: Get a tar archive of a resource in the filesystem of container id. + operationId: ContainerArchive + responses: + "200": + description: no error + "400": + description: Bad parameter + content: + application/x-tar: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Container or path does not exist + content: + application/x-tar: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/x-tar: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: path + in: query + required: true + description: Resource in the container’s filesystem to archive. + schema: + type: string + tags: + - Container + put: + summary: Extract an archive of files or folders to a directory in a container + description: > + Upload a tar archive to be extracted to a path in the filesystem of + container id. + + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + + will be returned with message "not a directory". + operationId: PutContainerArchive + responses: + "200": + description: The content was extracted successfully + "400": + description: Bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: not a directory + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "403": + description: Permission denied, the volume or container rootfs is marked as + read-only. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: No such container or path does not exist inside the container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the container + schema: + type: string + - name: path + in: query + required: true + description: "Path to a directory in the container to extract the archive’s + contents into. " + schema: + type: string + - name: noOverwriteDirNonDir + in: query + description: | + If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + schema: + type: string + - name: copyUIDGID + in: query + description: | + If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + schema: + type: string + requestBody: + content: + application/x-tar: + schema: + type: string + format: binary + application/octet-stream: + schema: + type: string + format: binary + description: | + The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + required: true + tags: + - Container + /containers/prune: + post: + summary: Delete stopped containers + operationId: ContainerPrune + parameters: + - name: filters + in: query + description: > + Filters to process on the prune list, encoded as JSON (a + `map[string][]string`). + + + Available filters: + + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + schema: + type: string + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: ContainerPruneResponse + properties: + ContainersDeleted: + description: Container IDs that were deleted + type: array + items: + type: string + SpaceReclaimed: + description: Disk space reclaimed in bytes + type: integer + format: int64 + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Container + /images/json: + get: + summary: List Images + description: Returns a list of images on the server. Note that it uses a + different, smaller representation of an image than inspecting a single + image. + operationId: ImageList + responses: + "200": + description: Summary image data for the images matching the query + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ImageSummary" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: all + in: query + description: Show all images. Only images from a final layer (no children) are + shown by default. + schema: + type: boolean + default: false + - name: filters + in: query + description: > + A JSON encoded value of the filters (a `map[string][]string`) to + + process on the images list. + + + Available filters: + + + - `before`=(`[:]`, `` or ``) + + - `dangling=true` + + - `label=key` or `label="key=value"` of an image label + + - `reference`=(`[:]`) + + - `since`=(`[:]`, `` or ``) + + - `until=` + schema: + type: string + - name: shared-size + in: query + description: Compute and show shared size as a `SharedSize` field on each image. + schema: + type: boolean + default: false + - name: digests + in: query + description: Show digest information as a `RepoDigests` field on each image. + schema: + type: boolean + default: false + - name: manifests + in: query + description: Include `Manifests` in the image summary. + schema: + type: boolean + default: false + tags: + - Image + /build: + post: + summary: Build an image + description: > + Build an image from a tar archive with a `Dockerfile` in it. + + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: ImageBuild + parameters: + - name: dockerfile + in: query + description: Path within the build context to the `Dockerfile`. This is ignored + if `remote` is specified and points to an external `Dockerfile`. + schema: + type: string + default: Dockerfile + - name: t + in: query + description: A name and optional tag to apply to the image in the `name:tag` + format. If you omit the tag the default `latest` value is assumed. + You can provide several `t` parameters. + schema: + type: string + - name: extrahosts + in: query + description: Extra hosts to add to /etc/hosts + schema: + type: string + - name: remote + in: query + description: A Git repository URI or HTTP/HTTPS context URI. If the URI points + to a single text file, the file’s contents are placed into a file + called `Dockerfile` and the image is built from that file. If the + URI points to a tarball, the file is downloaded by the daemon and + the contents therein used as the context for the build. If the URI + points to a tarball and the `dockerfile` parameter is also + specified, there must be a file with the corresponding path inside + the tarball. + schema: + type: string + - name: q + in: query + description: Suppress verbose build output. + schema: + type: boolean + default: false + - name: nocache + in: query + description: Do not use the cache when building the image. + schema: + type: boolean + default: false + - name: cachefrom + in: query + description: JSON array of images used for build cache resolution. + schema: + type: string + - name: pull + in: query + description: Attempt to pull the image even if an older image exists locally. + schema: + type: string + - name: rm + in: query + description: Remove intermediate containers after a successful build. + schema: + type: boolean + default: true + - name: forcerm + in: query + description: Always remove intermediate containers, even upon failure. + schema: + type: boolean + default: false + - name: memory + in: query + description: Set memory limit for build. + schema: + type: integer + - name: memswap + in: query + description: Total memory (memory + swap). Set as `-1` to disable swap. + schema: + type: integer + - name: cpushares + in: query + description: CPU shares (relative weight). + schema: + type: integer + - name: cpusetcpus + in: query + description: CPUs in which to allow execution (e.g., `0-3`, `0,1`). + schema: + type: string + - name: cpuperiod + in: query + description: The length of a CPU period in microseconds. + schema: + type: integer + - name: cpuquota + in: query + description: Microseconds of CPU time that the container can get in a CPU period. + schema: + type: integer + - name: buildargs + in: query + 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. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + schema: + type: string + - name: shmsize + in: query + description: Size of `/dev/shm` in bytes. The size must be greater than 0. If + omitted the system uses 64MB. + schema: + type: integer + - name: squash + in: query + description: Squash the resulting images layers into a single layer. + *(Experimental release only.)* + schema: + type: boolean + - name: labels + in: query + description: Arbitrary key/value labels to set on the image, as a JSON map of + string pairs. + schema: + type: string + - name: networkmode + in: query + description: > + Sets the networking mode for the run commands during build. + Supported + + standard values are: `bridge`, `host`, `none`, and `container:`. + + Any other value is taken as a custom network's name or ID to which this + + container should connect to. + schema: + type: string + - name: Content-type + in: header + schema: + type: string + enum: + - application/x-tar + default: application/x-tar + - name: X-Registry-Config + in: header + description: > + This is a base64-encoded JSON object with auth configurations for + multiple registries that a build may refer to. + + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + + ``` + + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + + ``` + + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + schema: + type: string + - name: platform + in: query + description: Platform in the format os[/arch[/variant]] + schema: + type: string + default: "" + - name: target + in: query + description: Target build stage + schema: + type: string + default: "" + - name: outputs + in: query + description: BuildKit output configuration + schema: + type: string + default: "" + - name: version + in: query + description: > + Version of the builder backend to use. + + + - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) + + - `2` is [BuildKit](https://github.com/moby/buildkit) + schema: + type: string + enum: + - "1" + - "2" + default: "1" + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + description: "A tar archive compressed with one of the following algorithms: + identity (no compression), gzip, bzip2, xz." + responses: + "200": + description: no error + "400": + description: Bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Image + /build/prune: + post: + summary: Delete builder cache + operationId: BuildPrune + parameters: + - name: keep-storage + in: query + description: > + Amount of disk space in bytes to keep for cache + + + > **Deprecated**: This parameter is deprecated and has been renamed to "reserved-space". + + > It is kept for backward compatibility and will be removed in API v1.49. + schema: + type: integer + format: int64 + - name: reserved-space + in: query + description: Amount of disk space in bytes to keep for cache + schema: + type: integer + format: int64 + - name: max-used-space + in: query + description: Maximum amount of disk space allowed to keep for cache + schema: + type: integer + format: int64 + - name: min-free-space + in: query + description: Target amount of free disk space after pruning + schema: + type: integer + format: int64 + - name: all + in: query + description: Remove all types of build cache + schema: + type: boolean + - name: filters + in: query + description: > + A JSON encoded value of the filters (a `map[string][]string`) to + + process on the list of build cache objects. + + + Available filters: + + + - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. + + - `id=` + + - `parent=` + + - `type=` + + - `description=` + + - `inuse` + + - `shared` + + - `private` + schema: + type: string + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: BuildPruneResponse + properties: + CachesDeleted: + type: array + items: + description: ID of build cache object + type: string + SpaceReclaimed: + description: Disk space reclaimed in bytes + type: integer + format: int64 + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Image + /images/create: + post: + summary: Create an image + description: Pull or import an image. + operationId: ImageCreate + responses: + "200": + description: no error + "404": + description: repository does not exist or no read access + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: fromImage + in: query + description: > + Name of the image to pull. If the name includes a tag or digest, + specific behavior applies: + + + - If only `fromImage` includes a tag, that tag is used. + + - If both `fromImage` and `tag` are provided, `tag` takes precedence. + + - If `fromImage` includes a digest, the image is pulled by digest, and `tag` is ignored. + + - If neither a tag nor digest is specified, all tags are pulled. + schema: + type: string + - name: fromSrc + in: query + description: Source to import. The value may be a URL from which the image can + be retrieved or `-` to read the image from the request body. This + parameter may only be used when importing an image. + schema: + type: string + - name: repo + in: query + description: Repository name given to an image when it is imported. The repo may + include a tag. This parameter may only be used when importing an + image. + schema: + type: string + - name: tag + in: query + description: Tag or digest. If empty when pulling an image, this causes all tags + for the given image to be pulled. + schema: + type: string + - name: message + in: query + description: Set commit message for imported image. + schema: + type: string + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + schema: + type: string + - name: changes + in: query + description: > + Apply `Dockerfile` instructions to the image that is created, + + for example: `changes=ENV DEBUG=true`. + + Note that `ENV DEBUG=true` should be URI component encoded. + + + Supported `Dockerfile` instructions: + + `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + style: form + explode: false + schema: + type: array + items: + type: string + - name: platform + in: query + description: > + Platform in the format os[/arch[/variant]]. + + + When used in combination with the `fromImage` option, the daemon checks + + if the given image is present in the local image cache with the given + + OS and Architecture, and otherwise attempts to pull the image. If the + + option is not set, the host's native OS and Architecture are used. + + If the given image does not exist in the local image cache, the daemon + + attempts to pull the image with the host's native OS and Architecture. + + If the given image does exists in the local image cache, but its OS or + + architecture does not match, a warning is produced. + + + When used with the `fromSrc` option to import an image from an archive, + + this option sets the platform information for the imported image. If + + the option is not set, the host's native OS and Architecture are used + + for the imported image. + schema: + type: string + default: "" + requestBody: + content: + text/plain: + schema: + type: string + application/octet-stream: + schema: + type: string + description: Image content if the value `-` has been specified in fromSrc query + parameter + tags: + - Image + "/images/{name}/json": + get: + summary: Inspect an image + description: Return low-level information about an image. + operationId: ImageInspect + responses: + "200": + description: No error + content: + application/json: + schema: + $ref: "#/components/schemas/ImageInspect" + "404": + description: No such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such image: someimage (tag: latest)" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or id + required: true + schema: + type: string + - name: manifests + in: query + description: Include Manifests in the image summary. + required: false + schema: + type: boolean + default: false + tags: + - Image + "/images/{name}/history": + get: + summary: Get the history of an image + description: Return parent layers of an image. + operationId: ImageHistory + responses: + "200": + description: List of image layers + content: + application/json: + schema: + type: array + items: + type: object + x-go-name: HistoryResponseItem + title: HistoryResponseItem + description: individual image layer information in response to ImageHistory + operation + required: + - Id + - Created + - CreatedBy + - Tags + - Size + - Comment + properties: + Id: + type: string + nullable: false + Created: + type: integer + format: int64 + nullable: false + CreatedBy: + type: string + nullable: false + Tags: + type: array + items: + type: string + Size: + type: integer + format: int64 + nullable: false + Comment: + type: string + nullable: false + examples: + response: + value: + - Id: 3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710 + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD + file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab48\ + 01f2e81e2a5148 in /" + Tags: + - ubuntu:lucid + - ubuntu:10.04 + Size: 182964289 + Comment: "" + - Id: 6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8 + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - + mkimage-debootstrap.sh -i + iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz + lucid http://archive.ubuntu.com/ubuntu/" + Tags: [] + Size: 0 + Comment: "" + - Id: 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 + Created: 1371157430 + CreatedBy: "" + Tags: + - scratch12:latest + - scratch:latest + Size: 0 + Comment: Imported from - + "404": + description: No such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or ID + required: true + schema: + type: string + - name: platform + in: query + description: | + JSON-encoded OCI platform to select the platform-variant. + If omitted, it defaults to any locally available platform, + prioritizing the daemon's host platform. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to show the history for. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + schema: + type: string + tags: + - Image + "/images/{name}/push": + post: + summary: Push an image + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: ImagePush + responses: + "200": + description: No error + "404": + description: No such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: > + Name of the image to push. For example, + `registry.example.com/myimage`. + + The image must be present in the local image store with the same name. + + + The name should be provided without tag; if a tag is provided, it + + is ignored. For example, `registry.example.com/myimage:latest` is + + considered equivalent to `registry.example.com/myimage`. + + + Use the `tag` parameter to specify the tag to push. + required: true + schema: + type: string + - name: tag + in: query + description: > + Tag of the image to push. For example, `latest`. If no tag is + provided, + + all tags of the given image that are present in the local image store + + are pushed. + schema: + type: string + - name: platform + in: query + description: | + JSON-encoded OCI platform to select the platform-variant to push. + If not provided, all available variants will attempt to be pushed. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to push to the registry. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + schema: + type: string + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + required: true + schema: + type: string + tags: + - Image + "/images/{name}/tag": + post: + summary: Tag an image + description: Tag an image so that it becomes part of a repository. + operationId: ImageTag + responses: + "201": + description: No error + "400": + description: Bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: No such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: Conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or ID to tag. + required: true + schema: + type: string + - name: repo + in: query + description: The repository to tag in. For example, `someuser/someimage`. + schema: + type: string + - name: tag + in: query + description: The name of the new tag. + schema: + type: string + tags: + - Image + "/images/{name}": + delete: + summary: Remove an image + description: | + Remove an image, along with any untagged parent images that were + referenced by that image. + + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. + operationId: ImageDelete + responses: + "200": + description: The image was deleted successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ImageDeleteResponseItem" + examples: + response: + value: + - Untagged: 3e2f21a89f + - Deleted: 3e2f21a89f + - Deleted: 53b4f83ac9 + "404": + description: No such image + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: Conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or ID + required: true + schema: + type: string + - name: force + in: query + description: Remove the image even if it is being used by stopped containers or + has other tags + schema: + type: boolean + default: false + - name: noprune + in: query + description: Do not delete untagged parent images + schema: + type: boolean + default: false + - name: platforms + in: query + description: | + Select platform-specific content to delete. + Multiple values are accepted. + Each platform is a OCI platform encoded as a JSON string. + style: form + explode: false + schema: + type: array + items: + type: string + tags: + - Image + /images/search: + get: + summary: Search images + description: Search for an image on Docker Hub. + operationId: ImageSearch + responses: + "200": + description: No error + content: + application/json: + schema: + type: array + items: + type: object + title: ImageSearchResponseItem + properties: + description: + type: string + is_official: + type: boolean + is_automated: + description: > + Whether this repository has automated builds enabled. + + +


+ + + > **Deprecated**: This field is deprecated and will always be "false". + type: boolean + example: false + name: + type: string + star_count: + type: integer + examples: + response: + value: + - description: A minimal Docker image based on Alpine Linux with a complete + package index and only 5 MB in size! + is_official: true + is_automated: false + name: alpine + star_count: 10093 + - description: Busybox base image. + is_official: true + is_automated: false + name: Busybox base image. + star_count: 3037 + - description: The PostgreSQL object-relational database system provides + reliability and data integrity. + is_official: true + is_automated: false + name: postgres + star_count: 12408 + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: term + in: query + description: Term to search + required: true + schema: + type: string + - name: limit + in: query + description: Maximum number of results to return + schema: + type: integer + - name: filters + in: query + description: > + A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. Available filters: + + + - `is-official=(true|false)` + + - `stars=` Matches images that has at least 'number' stars. + schema: + type: string + tags: + - Image + /images/prune: + post: + summary: Delete unused images + operationId: ImagePrune + parameters: + - name: filters + in: query + description: > + Filters to process on the prune list, encoded as JSON (a + `map[string][]string`). Available filters: + + + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + schema: + type: string + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: ImagePruneResponse + properties: + ImagesDeleted: + description: Images that were deleted + type: array + items: + $ref: "#/components/schemas/ImageDeleteResponseItem" + SpaceReclaimed: + description: Disk space reclaimed in bytes + type: integer + format: int64 + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Image + /auth: + post: + summary: Check auth configuration + description: | + Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + operationId: SystemAuth + responses: + "200": + description: An identity token was generated successfully. + content: + application/json: + schema: + type: object + title: SystemAuthResponse + required: + - Status + properties: + Status: + description: The status of the authentication + type: string + nullable: false + IdentityToken: + description: An opaque token used to authenticate a user after a successful + login + type: string + nullable: false + examples: + response: + value: + Status: Login Succeeded + IdentityToken: 9cbaf023786cd7... + "204": + description: No error + "401": + description: Auth error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AuthConfig" + description: Authentication to check + tags: + - System + /info: + get: + summary: Get system information + operationId: SystemInfo + responses: + "200": + description: No error + content: + application/json: + schema: + $ref: "#/components/schemas/SystemInfo" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - System + /version: + get: + summary: Get version + description: Returns the version of Docker that is running and various + information about the system that Docker is running on. + operationId: SystemVersion + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/SystemVersion" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - System + /_ping: + get: + summary: Ping + description: This is a dummy endpoint you can use to test if the server is accessible. + operationId: SystemPing + responses: + "200": + description: no error + headers: + Api-Version: + description: Max API Version the server supports + schema: + type: string + Builder-Version: + description: | + Default version of docker image builder + + The default on Linux is version "2" (BuildKit), but the daemon + can be configured to recommend version "1" (classic Builder). + Windows does not yet support BuildKit for native Windows images, + and uses "1" (classic builder) as a default. + + This value is a recommendation as advertised by the daemon, and + it is up to the client to choose which builder to use. + schema: + type: string + default: "2" + Docker-Experimental: + description: If the server is running with experimental mode enabled + schema: + type: boolean + Swarm: + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + schema: + type: string + enum: + - inactive + - pending + - error + - locked + - active/worker + - active/manager + default: inactive + Cache-Control: + schema: + type: string + default: no-cache, no-store, must-revalidate + Pragma: + schema: + type: string + default: no-cache + content: + text/plain: + schema: + type: string + example: OK + "500": + description: server error + headers: + Cache-Control: + schema: + type: string + default: no-cache, no-store, must-revalidate + Pragma: + schema: + type: string + default: no-cache + content: + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - System + head: + summary: Ping + description: This is a dummy endpoint you can use to test if the server is accessible. + operationId: SystemPingHead + responses: + "200": + description: no error + headers: + Api-Version: + description: Max API Version the server supports + schema: + type: string + Builder-Version: + description: Default version of docker image builder + schema: + type: string + Docker-Experimental: + description: If the server is running with experimental mode enabled + schema: + type: boolean + Swarm: + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + schema: + type: string + enum: + - inactive + - pending + - error + - locked + - active/worker + - active/manager + default: inactive + Cache-Control: + schema: + type: string + default: no-cache, no-store, must-revalidate + Pragma: + schema: + type: string + default: no-cache + content: + text/plain: + schema: + type: string + example: (empty) + "500": + description: server error + content: + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - System + /commit: + post: + summary: Create a new image from a container + operationId: ImageCommit + responses: + "201": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/IDResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: container + in: query + description: The ID or name of the container to commit + schema: + type: string + - name: repo + in: query + description: Repository name for the created image + schema: + type: string + - name: tag + in: query + description: Tag name for the create image + schema: + type: string + - name: comment + in: query + description: Commit message + schema: + type: string + - name: author + in: query + description: Author of the image (e.g., `John Hannibal Smith + `) + schema: + type: string + - name: pause + in: query + description: Whether to pause the container before committing + schema: + type: boolean + default: true + - name: changes + in: query + description: "`Dockerfile` instructions to apply while committing" + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContainerConfig" + description: The container configuration + tags: + - Image + /events: + get: + summary: Monitor events + description: > + Stream real-time events from the server. + + + Various objects within Docker report events when something happens to them. + + + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` + + + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + + + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` + + + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` + + + The Docker daemon reports these events: `reload` + + + Services report these events: `create`, `update`, and `remove` + + + Nodes report these events: `create`, `update`, and `remove` + + + Secrets report these events: `create`, `update`, and `remove` + + + Configs report these events: `create`, `update`, and `remove` + + + The Builder reports `prune` events + operationId: SystemEvents + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/EventMessage" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: since + in: query + description: Show events created since this timestamp then stream new events. + schema: + type: string + - name: until + in: query + description: Show events created until this timestamp then stop streaming. + schema: + type: string + - name: filters + in: query + description: > + A JSON encoded value of filters (a `map[string][]string`) to process + on the event list. Available filters: + + + - `config=` config name or ID + + - `container=` container name or ID + + - `daemon=` daemon name or ID + + - `event=` event type + + - `image=` image name or ID + + - `label=` image or container label + + - `network=` network name or ID + + - `node=` node ID + + - `plugin`= plugin name or ID + + - `scope`= local or swarm + + - `secret=` secret name or ID + + - `service=` service name or ID + + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + + - `volume=` volume name + schema: + type: string + tags: + - System + /system/df: + get: + summary: Get data usage information + operationId: SystemDataUsage + responses: + "200": + description: no error + content: + application/json: + schema: + type: object + title: SystemDataUsageResponse + properties: + LayersSize: + type: integer + format: int64 + Images: + type: array + items: + $ref: "#/components/schemas/ImageSummary" + Containers: + type: array + items: + $ref: "#/components/schemas/ContainerSummary" + Volumes: + type: array + items: + $ref: "#/components/schemas/Volume" + BuildCache: + type: array + items: + $ref: "#/components/schemas/BuildCache" + example: + LayersSize: 1092588 + Images: + - Id: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749 + ParentId: "" + RepoTags: + - busybox:latest + RepoDigests: + - busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + Labels: {} + Containers: 1 + Containers: + - Id: e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148 + Names: + - /top + Image: busybox + ImageID: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749 + Command: top + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: exited + Status: Exited (0) 56 minutes ago + HostConfig: + NetworkMode: default + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92 + EndpointID: 8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a + Gateway: 172.18.0.1 + IPAddress: 172.18.0.2 + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: 02:42:ac:12:00:02 + Mounts: [] + Volumes: + - Name: my-volume + Driver: local + Mountpoint: /var/lib/docker/volumes/my-volume/_data + Labels: null + Scope: local + Options: null + UsageData: + Size: 10920104 + RefCount: 2 + BuildCache: + - ID: hw53o5aio51xtltp5xjp8v7fx + Parents: [] + Type: regular + Description: pulled from + docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0 + InUse: false + Shared: true + Size: 0 + CreatedAt: 2021-06-28T13:31:01.474619385Z + LastUsedAt: 2021-07-07T22:02:32.738075951Z + UsageCount: 26 + - ID: ndlpt0hhvkqcdfkputsk4cq9c + Parents: + - ndlpt0hhvkqcdfkputsk4cq9c + Type: regular + Description: mount / from exec /bin/sh -c echo + 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > + /etc/apt/apt.conf.d/keep-cache + InUse: false + Shared: true + Size: 51 + CreatedAt: 2021-06-28T13:31:03.002625487Z + LastUsedAt: 2021-07-07T22:02:32.773909517Z + UsageCount: 26 + text/plain: + schema: + type: object + title: SystemDataUsageResponse + properties: + LayersSize: + type: integer + format: int64 + Images: + type: array + items: + $ref: "#/components/schemas/ImageSummary" + Containers: + type: array + items: + $ref: "#/components/schemas/ContainerSummary" + Volumes: + type: array + items: + $ref: "#/components/schemas/Volume" + BuildCache: + type: array + items: + $ref: "#/components/schemas/BuildCache" + example: + LayersSize: 1092588 + Images: + - Id: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749 + ParentId: "" + RepoTags: + - busybox:latest + RepoDigests: + - busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + Labels: {} + Containers: 1 + Containers: + - Id: e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148 + Names: + - /top + Image: busybox + ImageID: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749 + Command: top + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: exited + Status: Exited (0) 56 minutes ago + HostConfig: + NetworkMode: default + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92 + EndpointID: 8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a + Gateway: 172.18.0.1 + IPAddress: 172.18.0.2 + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: 02:42:ac:12:00:02 + Mounts: [] + Volumes: + - Name: my-volume + Driver: local + Mountpoint: /var/lib/docker/volumes/my-volume/_data + Labels: null + Scope: local + Options: null + UsageData: + Size: 10920104 + RefCount: 2 + BuildCache: + - ID: hw53o5aio51xtltp5xjp8v7fx + Parents: [] + Type: regular + Description: pulled from + docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0 + InUse: false + Shared: true + Size: 0 + CreatedAt: 2021-06-28T13:31:01.474619385Z + LastUsedAt: 2021-07-07T22:02:32.738075951Z + UsageCount: 26 + - ID: ndlpt0hhvkqcdfkputsk4cq9c + Parents: + - ndlpt0hhvkqcdfkputsk4cq9c + Type: regular + Description: mount / from exec /bin/sh -c echo + 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > + /etc/apt/apt.conf.d/keep-cache + InUse: false + Shared: true + Size: 51 + CreatedAt: 2021-06-28T13:31:03.002625487Z + LastUsedAt: 2021-07-07T22:02:32.773909517Z + UsageCount: 26 + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: type + in: query + description: | + Object types, for which to compute and return data. + explode: true + schema: + type: array + items: + type: string + enum: + - container + - image + - volume + - build-cache + tags: + - System + "/images/{name}/get": + get: + summary: Export an image + description: > + Get a tarball containing all images and metadata for a repository. + + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + + ### Image tarball format + + + An image tarball contains [Content as defined in the OCI Image Layout Specification](https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#content). + + + Additionally, includes the manifest.json file associated with a backwards compatible docker save format. + + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + + ```json + + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + + ``` + operationId: ImageGet + responses: + "200": + description: no error + content: + application/x-tar: + schema: + type: string + format: binary + "500": + description: server error + content: + application/x-tar: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or ID + required: true + schema: + type: string + - name: platform + in: query + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be saved if the image is + multi-platform. + If not provided, the full multi-platform image will be saved. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + schema: + type: string + tags: + - Image + /images/get: + get: + summary: Export several images + description: > + Get a tarball containing all images and metadata for several image + + repositories. + + + For each value of the `names` parameter: if it is a specific name and + + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + + returned; if it is an image ID, similarly only that image (and its parents) + + are returned and there would be no names referenced in the 'repositories' + + file for this image ID. + + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: ImageGetAll + responses: + "200": + description: no error + content: + application/x-tar: + schema: + type: string + format: binary + "500": + description: server error + content: + application/x-tar: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: names + in: query + description: Image names to filter by + style: form + explode: false + schema: + type: array + items: + type: string + - name: platform + in: query + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be saved if the image is + multi-platform. + If not provided, the full multi-platform image will be saved. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + schema: + type: string + tags: + - Image + /images/load: + post: + summary: Import images + description: > + Load a set of images and tags into a repository. + + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: ImageLoad + responses: + "200": + description: no error + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: quiet + in: query + description: Suppress progress details during load. + schema: + type: boolean + default: false + - name: platform + in: query + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be load if the image is + multi-platform. + If not provided, the full multi-platform image will be loaded. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + schema: + type: string + requestBody: + content: + application/x-tar: + schema: + type: string + format: binary + description: Tar archive containing images + tags: + - Image + "/containers/{id}/exec": + post: + summary: Create an exec instance + description: Run a command inside a running container. + operationId: ContainerExec + responses: + "201": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/IDResponse" + "404": + description: no such container + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such container: c2ada9df5af8" + "409": + description: container is paused + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: ID or name of container + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: ExecConfig + properties: + AttachStdin: + type: boolean + description: Attach to `stdin` of the exec command. + AttachStdout: + type: boolean + description: Attach to `stdout` of the exec command. + AttachStderr: + type: boolean + description: Attach to `stderr` of the exec command. + ConsoleSize: + type: array + description: Initial console size, as an `[height, width]` array. + minItems: 2 + maxItems: 2 + items: + type: integer + minimum: 0 + example: + - 80 + - 64 + nullable: true + DetachKeys: + type: string + description: > + Override the key sequence for detaching a container. Format + is + + a single character `[a-Z]` or `ctrl-` where `` + + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + Tty: + type: boolean + description: Allocate a pseudo-TTY. + Env: + description: > + A list of environment variables in the form `["VAR=value", + ...]`. + type: array + items: + type: string + Cmd: + type: array + description: Command to run, as a string or array of strings. + items: + type: string + Privileged: + type: boolean + description: Runs the exec process with extended privileges. + default: false + User: + type: string + description: > + The user, and optionally, group to run the exec process + inside + + the container. Format is one of: `user`, `user:group`, `uid`, + + or `uid:gid`. + WorkingDir: + type: string + description: > + The working directory for the exec process inside the + container. + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: ctrl-p,ctrl-q + Tty: false + Cmd: + - date + Env: + - FOO=bar + - BAZ=quux + description: Exec configuration + required: true + tags: + - Exec + "/exec/{id}/start": + post: + summary: Start an exec instance + description: > + Starts a previously set up exec instance. If detach is true, this + endpoint + + returns immediately after starting the command. Otherwise, it sets up an + + interactive session with the command. + operationId: ExecStart + responses: + "200": + description: No error + "404": + description: No such exec instance + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: Container is stopped or paused + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Exec instance ID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: ExecStartConfig + properties: + Detach: + type: boolean + description: Detach from the command. + example: false + Tty: + type: boolean + description: Allocate a pseudo-TTY. + example: true + ConsoleSize: + type: array + description: Initial console size, as an `[height, width]` array. + minItems: 2 + maxItems: 2 + items: + type: integer + minimum: 0 + example: + - 80 + - 64 + nullable: true + tags: + - Exec + "/exec/{id}/resize": + post: + summary: Resize an exec instance + description: > + Resize the TTY session used by an exec instance. This endpoint only + works + + if `tty` was specified as part of creating and starting the exec instance. + operationId: ExecResize + responses: + "200": + description: No error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: No such exec instance + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Exec instance ID + required: true + schema: + type: string + - name: h + in: query + required: true + description: Height of the TTY session in characters + schema: + type: integer + - name: w + in: query + required: true + description: Width of the TTY session in characters + schema: + type: integer + tags: + - Exec + "/exec/{id}/json": + get: + summary: Inspect an exec instance + description: Return low-level information about an exec instance. + operationId: ExecInspect + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: ExecInspectResponse + properties: + CanRemove: + type: boolean + DetachKeys: + type: string + ID: + type: string + Running: + type: boolean + ExitCode: + type: integer + ProcessConfig: + $ref: "#/components/schemas/ProcessConfig" + OpenStdin: + type: boolean + OpenStderr: + type: boolean + OpenStdout: + type: boolean + ContainerID: + type: string + Pid: + type: integer + description: The system process ID for the exec process. + examples: + response: + value: + CanRemove: false + ContainerID: b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126 + DetachKeys: "" + ExitCode: 2 + ID: f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - -c + - exit 2 + entrypoint: sh + privileged: false + tty: true + user: "1000" + Running: false + Pid: 42000 + "404": + description: No such exec instance + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Exec instance ID + required: true + schema: + type: string + tags: + - Exec + /volumes: + get: + summary: List volumes + operationId: VolumeList + responses: + "200": + description: Summary volume data that matches the query + content: + application/json: + schema: + $ref: "#/components/schemas/VolumeListResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: > + JSON encoded value of the filters (a `map[string][]string`) to + + process on the volumes list. Available filters: + + + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches volumes based on their driver. + + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. + schema: + type: string + format: json + tags: + - Volume + /volumes/create: + post: + summary: Create a volume + operationId: VolumeCreate + responses: + "201": + description: The volume was created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/Volume" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/VolumeCreateOptions" + description: Volume configuration + required: true + tags: + - Volume + "/volumes/{name}": + get: + summary: Inspect a volume + operationId: VolumeInspect + responses: + "200": + description: No error + content: + application/json: + schema: + $ref: "#/components/schemas/Volume" + "404": + description: No such volume + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + required: true + description: Volume name or ID + schema: + type: string + tags: + - Volume + put: + summary: | + "Update a volume. Valid only for Swarm cluster volumes" + operationId: VolumeUpdate + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such volume + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: The name or ID of the volume + required: true + schema: + type: string + - name: version + in: query + description: | + The version number of the volume being updated. This is required to + avoid conflicting writes. Found in the volume's `ClusterVolume` + field. + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + type: object + description: Volume configuration + properties: + Spec: + $ref: "#/components/schemas/ClusterVolumeSpec" + description: | + The spec of the volume to update. Currently, only Availability may + change. All other fields must remain unchanged. + tags: + - Volume + delete: + summary: Remove a volume + description: Instruct the driver to remove the volume. + operationId: VolumeDelete + responses: + "204": + description: The volume was removed + "404": + description: No such volume or volume driver + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: Volume is in use and cannot be removed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + required: true + description: Volume name or ID + schema: + type: string + - name: force + in: query + description: Force the removal of the volume + schema: + type: boolean + default: false + tags: + - Volume + /volumes/prune: + post: + summary: Delete unused volumes + operationId: VolumePrune + parameters: + - name: filters + in: query + description: > + Filters to process on the prune list, encoded as JSON (a + `map[string][]string`). + + + Available filters: + + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + + - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. + schema: + type: string + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: VolumePruneResponse + properties: + VolumesDeleted: + description: Volumes that were deleted + type: array + items: + type: string + SpaceReclaimed: + description: Disk space reclaimed in bytes + type: integer + format: int64 + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Volume + /networks: + get: + summary: List networks + description: > + Returns a list of networks. For details on the format, see the + + [network inspect endpoint](#operation/NetworkInspect). + + + Note that it uses a different, smaller representation of a network than + + inspecting a single network. For example, the list of containers attached + + to the network is not propagated in API versions 1.28 and up. + operationId: NetworkList + responses: + "200": + description: No error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Network" + examples: + response: + value: + - Name: bridge + Id: f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566 + Created: 2016-10-19T06:21:00.416543526Z + Scope: local + Driver: bridge + EnableIPv4: true + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: default + Config: + - Subnet: 172.17.0.0/16 + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: 0.0.0.0 + com.docker.network.bridge.name: docker0 + com.docker.network.driver.mtu: "1500" + - Name: none + Id: e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794 + Created: 0001-01-01T00:00:00Z + Scope: local + Driver: "null" + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: default + Config: [] + Containers: {} + Options: {} + - Name: host + Id: 13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e + Created: 0001-01-01T00:00:00Z + Scope: local + Driver: host + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: default + Config: [] + Containers: {} + Options: {} + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: > + JSON encoded value of the filters (a `map[string][]string`) to + process + + on the networks list. + + + Available filters: + + + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. + - `driver=` Matches a network's driver. + + - `id=` Matches all or part of a network ID. + + - `label=` or `label==` of a network label. + + - `name=` Matches all or part of a network name. + + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). + + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + schema: + type: string + tags: + - Network + "/networks/{id}": + get: + summary: Inspect a network + operationId: NetworkInspect + responses: + "200": + description: No error + content: + application/json: + schema: + $ref: "#/components/schemas/Network" + "404": + description: Network not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Network ID or name + required: true + schema: + type: string + - name: verbose + in: query + description: Detailed inspect output for troubleshooting + schema: + type: boolean + default: false + - name: scope + in: query + description: Filter the network by scope (swarm, global, or local) + schema: + type: string + tags: + - Network + delete: + summary: Remove a network + operationId: NetworkDelete + responses: + "204": + description: No error + "403": + description: operation not supported for pre-defined networks + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such network + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Network ID or name + required: true + schema: + type: string + tags: + - Network + /networks/create: + post: + summary: Create a network + operationId: NetworkCreate + responses: + "201": + description: Network created successfully + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkCreateResponse" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "403": + description: > + Forbidden operation. This happens when trying to create a network + named after a pre-defined network, + + or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: plugin not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + type: object + title: NetworkCreateRequest + required: + - Name + properties: + Name: + description: The network's name. + type: string + example: my_network + Driver: + description: Name of the network driver plugin to use. + type: string + default: bridge + example: bridge + Scope: + description: > + The level at which the network exists (e.g. `swarm` for + cluster-wide + + or `local` for machine level). + type: string + Internal: + description: Restrict external access to the network. + type: boolean + Attachable: + description: | + Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + type: boolean + example: true + Ingress: + description: > + Ingress network is the network which provides the + routing-mesh + + in swarm mode. + type: boolean + example: false + ConfigOnly: + description: > + Creates a config-only network. Config-only networks are + placeholder + + networks for network configurations to be used by other networks. + + Config-only networks cannot be used directly to run containers + + or services. + type: boolean + default: false + example: false + ConfigFrom: + $ref: "#/components/schemas/ConfigReference" + IPAM: + $ref: "#/components/schemas/IPAM" + EnableIPv4: + description: Enable IPv4 on the network. + type: boolean + example: true + EnableIPv6: + description: Enable IPv6 on the network. + type: boolean + example: true + Options: + description: Network specific options to be used by the drivers. + type: object + additionalProperties: + type: string + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: 0.0.0.0 + com.docker.network.bridge.name: docker0 + com.docker.network.driver.mtu: "1500" + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + description: Network configuration + required: true + tags: + - Network + "/networks/{id}/connect": + post: + summary: Connect a container to a network + description: The network must be either a local-scoped network or a swarm-scoped + network with the `attachable` option set. A network cannot be + re-attached to a running container + operationId: NetworkConnect + responses: + "200": + description: No error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "403": + description: Operation forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Network or container not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Network ID or name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: NetworkConnectRequest + properties: + Container: + type: string + description: The ID or name of the container to connect to the network. + EndpointConfig: + $ref: "#/components/schemas/EndpointSettings" + example: + Container: 3613f73ba0e4 + EndpointConfig: + IPAMConfig: + IPv4Address: 172.24.56.89 + IPv6Address: 2001:db8::5689 + MacAddress: 02:42:ac:12:05:02 + Priority: 100 + required: true + tags: + - Network + "/networks/{id}/disconnect": + post: + summary: Disconnect a container from a network + operationId: NetworkDisconnect + responses: + "200": + description: No error + "403": + description: Operation not supported for swarm scoped networks + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: Network or container not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: Network ID or name + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: NetworkDisconnectRequest + properties: + Container: + type: string + description: > + The ID or name of the container to disconnect from the + network. + Force: + type: boolean + description: | + Force the container to disconnect from the network. + required: true + tags: + - Network + /networks/prune: + post: + summary: Delete unused networks + operationId: NetworkPrune + parameters: + - name: filters + in: query + description: > + Filters to process on the prune list, encoded as JSON (a + `map[string][]string`). + + + Available filters: + + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. + schema: + type: string + responses: + "200": + description: No error + content: + application/json: + schema: + type: object + title: NetworkPruneResponse + properties: + NetworksDeleted: + description: Networks that were deleted + type: array + items: + type: string + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Network + /plugins: + get: + summary: List plugins + operationId: PluginList + description: Returns information about installed plugins. + responses: + "200": + description: No error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Plugin" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + schema: + type: string + tags: + - Plugin + /plugins/privileges: + get: + summary: Get plugin privileges + operationId: GetPluginPrivileges + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PluginPrivilege" + example: + - Name: network + Description: "" + Value: + - host + - Name: mount + Description: "" + Value: + - /data + - Name: device + Description: "" + Value: + - /dev/cpu_dma_latency + text/plain: + schema: + type: array + items: + $ref: "#/components/schemas/PluginPrivilege" + example: + - Name: network + Description: "" + Value: + - host + - Name: mount + Description: "" + Value: + - /data + - Name: device + Description: "" + Value: + - /dev/cpu_dma_latency + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: remote + in: query + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + tags: + - Plugin + /plugins/pull: + post: + summary: Install a plugin + operationId: PluginPull + description: > + Pulls and installs a plugin. After the plugin is installed, it can be + + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + responses: + "204": + description: no error + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: remote + in: query + description: > + Remote reference for plugin to install. + + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + schema: + type: string + - name: name + in: query + description: > + Local name for the pulled plugin. + + + The `:latest` tag is optional, and is used as the default if omitted. + required: false + schema: + type: string + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/PluginPrivilegeArray" + tags: + - Plugin + "/plugins/{name}/json": + get: + summary: Inspect a plugin + operationId: PluginInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Plugin" + text/plain: + schema: + $ref: "#/components/schemas/Plugin" + "404": + description: plugin is not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + tags: + - Plugin + "/plugins/{name}": + delete: + summary: Remove a plugin + operationId: PluginDelete + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Plugin" + text/plain: + schema: + $ref: "#/components/schemas/Plugin" + "404": + description: plugin is not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + - name: force + in: query + description: | + Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + schema: + type: boolean + default: false + tags: + - Plugin + "/plugins/{name}/enable": + post: + summary: Enable a plugin + operationId: PluginEnable + responses: + "200": + description: no error + "404": + description: plugin is not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + - name: timeout + in: query + description: Set the HTTP client timeout (in seconds) + schema: + type: integer + default: 0 + tags: + - Plugin + "/plugins/{name}/disable": + post: + summary: Disable a plugin + operationId: PluginDisable + responses: + "200": + description: no error + "404": + description: plugin is not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + - name: force + in: query + description: | + Force disable a plugin even if still in use. + required: false + schema: + type: boolean + tags: + - Plugin + "/plugins/{name}/upgrade": + post: + summary: Upgrade a plugin + operationId: PluginUpgrade + responses: + "204": + description: no error + "404": + description: plugin not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + - name: remote + in: query + description: > + Remote reference to upgrade to. + + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + schema: + type: string + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/PluginPrivilegeArray" + tags: + - Plugin + /plugins/create: + post: + summary: Create a plugin + operationId: PluginCreate + responses: + "204": + description: no error + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: query + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + requestBody: + content: + application/x-tar: + schema: + type: string + format: binary + description: Path to tar containing plugin rootfs and manifest + tags: + - Plugin + "/plugins/{name}/push": + post: + summary: Push a plugin + operationId: PluginPush + description: | + Push a plugin to the registry. + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + responses: + "200": + description: no error + "404": + description: plugin not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Plugin + "/plugins/{name}/set": + post: + summary: Configure a plugin + operationId: PluginSet + parameters: + - name: name + in: path + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + type: string + example: + - DEBUG=1 + responses: + "204": + description: No error + "404": + description: Plugin not installed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Plugin + /nodes: + get: + summary: List nodes + operationId: NodeList + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Node" + text/plain: + schema: + type: array + items: + $ref: "#/components/schemas/Node" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: > + Filters to process on the nodes list, encoded as JSON (a + `map[string][]string`). + + + Available filters: + + - `id=` + + - `label=` + + - `membership=`(`accepted`|`pending`)` + + - `name=` + + - `node.label=` + + - `role=`(`manager`|`worker`)` + schema: + type: string + tags: + - Node + "/nodes/{id}": + get: + summary: Inspect a node + operationId: NodeInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Node" + text/plain: + schema: + $ref: "#/components/schemas/Node" + "404": + description: no such node + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: The ID or name of the node + required: true + schema: + type: string + tags: + - Node + delete: + summary: Delete a node + operationId: NodeDelete + responses: + "200": + description: no error + "404": + description: no such node + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: The ID or name of the node + required: true + schema: + type: string + - name: force + in: query + description: Force remove a node from the swarm + schema: + type: boolean + default: false + tags: + - Node + "/nodes/{id}/update": + post: + summary: Update a node + operationId: NodeUpdate + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such node + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: The ID of the node + required: true + schema: + type: string + - name: version + in: query + description: > + The version number of the node object being updated. This is + required + + to avoid conflicting writes. + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodeSpec" + text/plain: + schema: + $ref: "#/components/schemas/NodeSpec" + tags: + - Node + /swarm: + get: + summary: Inspect swarm + operationId: SwarmInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Swarm" + text/plain: + schema: + $ref: "#/components/schemas/Swarm" + "404": + description: no such swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Swarm + /swarm/init: + post: + summary: Initialize a new swarm + operationId: SwarmInit + responses: + "200": + description: no error + content: + application/json: + schema: + description: The node ID + type: string + example: 7v2t30z9blmxuhnyo6s4cpenp + text/plain: + schema: + description: The node ID + type: string + example: 7v2t30z9blmxuhnyo6s4cpenp + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is already part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + type: object + title: SwarmInitRequest + properties: + ListenAddr: + description: > + Listen address used for inter-manager communication, as well + + as determining the networking interface used for the VXLAN + + Tunnel Endpoint (VTEP). This can either be an address/port + + combination in the form `192.168.1.1:4567`, or an interface + + followed by a port number, like `eth0:4567`. If the port number + + is omitted, the default swarm listening port is used. + type: string + AdvertiseAddr: + description: > + Externally reachable address advertised to other nodes. This + + can either be an address/port combination in the form + + `192.168.1.1:4567`, or an interface followed by a port number, + + like `eth0:4567`. If the port number is omitted, the port + + number from the listen address is used. If `AdvertiseAddr` is + + not specified, it will be automatically detected when possible. + type: string + DataPathAddr: + description: > + Address or interface to use for data path traffic (format: + + ``), for example, `192.168.1.1`, or an interface, + + like `eth0`. If `DataPathAddr` is unspecified, the same address + + as `AdvertiseAddr` is used. + + + The `DataPathAddr` specifies the address that global scope + + network drivers will publish towards other nodes in order to + + reach the containers running on this node. Using this parameter + + it is possible to separate the container data traffic from the + + management traffic of the cluster. + type: string + DataPathPort: + description: > + DataPathPort specifies the data path port number for data + traffic. + + Acceptable port range is 1024 to 49151. + + if no port is set or is set to 0, default port 4789 will be used. + type: integer + format: uint32 + DefaultAddrPool: + description: > + Default Address Pool specifies default subnet pools for + global + + scope networks. + type: array + items: + type: string + example: + - 10.10.0.0/16 + - 20.20.0.0/16 + ForceNewCluster: + description: Force creation of a new swarm. + type: boolean + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + type: integer + format: uint32 + Spec: + $ref: "#/components/schemas/SwarmSpec" + example: + ListenAddr: 0.0.0.0:2377 + AdvertiseAddr: 192.168.1.1:2377 + DataPathPort: 4789 + DefaultAddrPool: + - 10.10.0.0/8 + - 20.20.0.0/8 + SubnetSize: 24 + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + text/plain: + schema: + type: object + title: SwarmInitRequest + properties: + ListenAddr: + description: > + Listen address used for inter-manager communication, as well + + as determining the networking interface used for the VXLAN + + Tunnel Endpoint (VTEP). This can either be an address/port + + combination in the form `192.168.1.1:4567`, or an interface + + followed by a port number, like `eth0:4567`. If the port number + + is omitted, the default swarm listening port is used. + type: string + AdvertiseAddr: + description: > + Externally reachable address advertised to other nodes. This + + can either be an address/port combination in the form + + `192.168.1.1:4567`, or an interface followed by a port number, + + like `eth0:4567`. If the port number is omitted, the port + + number from the listen address is used. If `AdvertiseAddr` is + + not specified, it will be automatically detected when possible. + type: string + DataPathAddr: + description: > + Address or interface to use for data path traffic (format: + + ``), for example, `192.168.1.1`, or an interface, + + like `eth0`. If `DataPathAddr` is unspecified, the same address + + as `AdvertiseAddr` is used. + + + The `DataPathAddr` specifies the address that global scope + + network drivers will publish towards other nodes in order to + + reach the containers running on this node. Using this parameter + + it is possible to separate the container data traffic from the + + management traffic of the cluster. + type: string + DataPathPort: + description: > + DataPathPort specifies the data path port number for data + traffic. + + Acceptable port range is 1024 to 49151. + + if no port is set or is set to 0, default port 4789 will be used. + type: integer + format: uint32 + DefaultAddrPool: + description: > + Default Address Pool specifies default subnet pools for + global + + scope networks. + type: array + items: + type: string + example: + - 10.10.0.0/16 + - 20.20.0.0/16 + ForceNewCluster: + description: Force creation of a new swarm. + type: boolean + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + type: integer + format: uint32 + Spec: + $ref: "#/components/schemas/SwarmSpec" + example: + ListenAddr: 0.0.0.0:2377 + AdvertiseAddr: 192.168.1.1:2377 + DataPathPort: 4789 + DefaultAddrPool: + - 10.10.0.0/8 + - 20.20.0.0/8 + SubnetSize: 24 + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + required: true + tags: + - Swarm + /swarm/join: + post: + summary: Join an existing swarm + operationId: SwarmJoin + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is already part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + type: object + title: SwarmJoinRequest + properties: + ListenAddr: + description: > + Listen address used for inter-manager communication if the + node + + gets promoted to manager, as well as determining the networking + + interface used for the VXLAN Tunnel Endpoint (VTEP). + type: string + AdvertiseAddr: + description: > + Externally reachable address advertised to other nodes. This + + can either be an address/port combination in the form + + `192.168.1.1:4567`, or an interface followed by a port number, + + like `eth0:4567`. If the port number is omitted, the port + + number from the listen address is used. If `AdvertiseAddr` is + + not specified, it will be automatically detected when possible. + type: string + DataPathAddr: + description: > + Address or interface to use for data path traffic (format: + + ``), for example, `192.168.1.1`, or an interface, + + like `eth0`. If `DataPathAddr` is unspecified, the same address + + as `AdvertiseAddr` is used. + + + The `DataPathAddr` specifies the address that global scope + + network drivers will publish towards other nodes in order to + + reach the containers running on this node. Using this parameter + + it is possible to separate the container data traffic from the + + management traffic of the cluster. + type: string + RemoteAddrs: + description: > + Addresses of manager nodes already participating in the + swarm. + type: array + items: + type: string + JoinToken: + description: Secret token for joining this swarm. + type: string + example: + ListenAddr: 0.0.0.0:2377 + AdvertiseAddr: 192.168.1.1:2377 + DataPathAddr: 192.168.1.1 + RemoteAddrs: + - node1:2377 + JoinToken: SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2 + text/plain: + schema: + type: object + title: SwarmJoinRequest + properties: + ListenAddr: + description: > + Listen address used for inter-manager communication if the + node + + gets promoted to manager, as well as determining the networking + + interface used for the VXLAN Tunnel Endpoint (VTEP). + type: string + AdvertiseAddr: + description: > + Externally reachable address advertised to other nodes. This + + can either be an address/port combination in the form + + `192.168.1.1:4567`, or an interface followed by a port number, + + like `eth0:4567`. If the port number is omitted, the port + + number from the listen address is used. If `AdvertiseAddr` is + + not specified, it will be automatically detected when possible. + type: string + DataPathAddr: + description: > + Address or interface to use for data path traffic (format: + + ``), for example, `192.168.1.1`, or an interface, + + like `eth0`. If `DataPathAddr` is unspecified, the same address + + as `AdvertiseAddr` is used. + + + The `DataPathAddr` specifies the address that global scope + + network drivers will publish towards other nodes in order to + + reach the containers running on this node. Using this parameter + + it is possible to separate the container data traffic from the + + management traffic of the cluster. + type: string + RemoteAddrs: + description: > + Addresses of manager nodes already participating in the + swarm. + type: array + items: + type: string + JoinToken: + description: Secret token for joining this swarm. + type: string + example: + ListenAddr: 0.0.0.0:2377 + AdvertiseAddr: 192.168.1.1:2377 + DataPathAddr: 192.168.1.1 + RemoteAddrs: + - node1:2377 + JoinToken: SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2 + required: true + tags: + - Swarm + /swarm/leave: + post: + summary: Leave a swarm + operationId: SwarmLeave + responses: + "200": + description: no error + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: force + description: | + Force leave swarm, even if this is the last manager or that it will + break the cluster. + in: query + schema: + type: boolean + default: false + tags: + - Swarm + /swarm/update: + post: + summary: Update a swarm + operationId: SwarmUpdate + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: version + in: query + description: | + The version number of the swarm object being updated. This is + required to avoid conflicting writes. + required: true + schema: + type: integer + format: int64 + - name: rotateWorkerToken + in: query + description: Rotate the worker join token. + schema: + type: boolean + default: false + - name: rotateManagerToken + in: query + description: Rotate the manager join token. + schema: + type: boolean + default: false + - name: rotateManagerUnlockKey + in: query + description: Rotate the manager unlock key. + schema: + type: boolean + default: false + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SwarmSpec" + text/plain: + schema: + $ref: "#/components/schemas/SwarmSpec" + required: true + tags: + - Swarm + /swarm/unlockkey: + get: + summary: Get the unlock key + operationId: SwarmUnlockkey + responses: + "200": + description: no error + content: + application/json: + schema: + type: object + title: UnlockKeyResponse + properties: + UnlockKey: + description: The swarm's unlock key. + type: string + example: + UnlockKey: SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8 + text/plain: + schema: + type: object + title: UnlockKeyResponse + properties: + UnlockKey: + description: The swarm's unlock key. + type: string + example: + UnlockKey: SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8 + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Swarm + /swarm/unlock: + post: + summary: Unlock a locked manager + operationId: SwarmUnlock + requestBody: + content: + application/json: + schema: + type: object + title: SwarmUnlockRequest + properties: + UnlockKey: + description: The swarm's unlock key. + type: string + example: + UnlockKey: SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8 + required: true + responses: + "200": + description: no error + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Swarm + /services: + get: + summary: List services + operationId: ServiceList + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Service" + text/plain: + schema: + type: array + items: + $ref: "#/components/schemas/Service" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: + + - `id=` + - `label=` + - `mode=["replicated"|"global"]` + - `name=` + schema: + type: string + - name: status + in: query + description: | + Include service status, with count of running and desired tasks. + schema: + type: boolean + tags: + - Service + /services/create: + post: + summary: Create a service + operationId: ServiceCreate + responses: + "201": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceCreateResponse" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "403": + description: network is not eligible for services + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "409": + description: name conflicts with an existing service + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + schema: + type: string + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ServiceSpec" + - type: object + example: + Name: web + TaskTemplate: + ContainerSpec: + Image: nginx:alpine + Mounts: + - ReadOnly: true + Source: web-data + Target: /usr/share/nginx/html + Type: volume + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: something-value + Hosts: + - 10.10.10.10 host1 + - ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2 + User: "33" + DNSConfig: + Nameservers: + - 8.8.8.8 + Search: + - example.org + Options: + - timeout:3 + Secrets: + - File: + Name: www.example.org.key + UID: "33" + GID: "33" + Mode: 384 + SecretID: fpjqlhnwb19zds35k8wn80lq9 + SecretName: example_org_domain_key + OomScoreAdj: 0 + LogDriver: + Name: json-file + Options: + max-file: "3" + max-size: 10M + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: on-failure + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Ports: + - Protocol: tcp + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: bar + required: true + tags: + - Service + "/services/{id}": + get: + summary: Inspect a service + operationId: ServiceInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Service" + text/plain: + schema: + $ref: "#/components/schemas/Service" + "404": + description: no such service + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: ID or name of service. + required: true + schema: + type: string + - name: insertDefaults + in: query + description: Fill empty fields with default values. + schema: + type: boolean + default: false + tags: + - Service + delete: + summary: Delete a service + operationId: ServiceDelete + responses: + "200": + description: no error + "404": + description: no such service + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: ID or name of service. + required: true + schema: + type: string + tags: + - Service + "/services/{id}/update": + post: + summary: Update a service + operationId: ServiceUpdate + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceUpdateResponse" + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such service + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: ID or name of service. + required: true + schema: + type: string + - name: version + in: query + description: | + The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + required: true + schema: + type: integer + - name: registryAuthFrom + in: query + description: | + If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + schema: + type: string + enum: + - spec + - previous-spec + default: spec + - name: rollback + in: query + description: | + Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + schema: + type: string + - name: X-Registry-Auth + in: header + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + schema: + type: string + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ServiceSpec" + - type: object + example: + Name: top + TaskTemplate: + ContainerSpec: + Image: busybox + Args: + - top + OomScoreAdj: 0 + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: any + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: vip + required: true + tags: + - Service + "/services/{id}/logs": + get: + summary: Get service logs + description: | + Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: ServiceLogs + responses: + "200": + description: logs returned as a stream in response body + content: + application/vnd.docker.raw-stream: + schema: + type: string + format: binary + application/vnd.docker.multiplexed-stream: + schema: + type: string + format: binary + "404": + description: no such service + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such service: c2ada9df5af8" + "500": + description: server error + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID or name of the service + schema: + type: string + - name: details + in: query + description: Show service context and extra details provided to logs. + schema: + type: boolean + default: false + - name: follow + in: query + description: Keep connection after returning logs. + schema: + type: boolean + default: false + - name: stdout + in: query + description: Return logs from `stdout` + schema: + type: boolean + default: false + - name: stderr + in: query + description: Return logs from `stderr` + schema: + type: boolean + default: false + - name: since + in: query + description: Only return logs since this time, as a UNIX timestamp + schema: + type: integer + default: 0 + - name: timestamps + in: query + description: Add timestamps to every log line + schema: + type: boolean + default: false + - name: tail + in: query + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + schema: + type: string + default: all + tags: + - Service + /tasks: + get: + summary: List tasks + operationId: TaskList + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Task" + example: + - ID: 0kzzo1i0y4jz6027t0k7aezc7 + Version: + Index: 71 + CreatedAt: 2016-06-07T21:07:31.171892745Z + UpdatedAt: 2016-06-07T21:07:31.376370513Z + Spec: + ContainerSpec: + Image: redis + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: any + MaxAttempts: 0 + Placement: {} + ServiceID: 9mnpnzenvg8p8tdbtq4wvbkcz + Slot: 1 + NodeID: 60gvrl6tm78dmak4yl7srz94v + Status: + Timestamp: 2016-06-07T21:07:31.290032978Z + State: running + Message: started + ContainerStatus: + ContainerID: e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035 + PID: 677 + DesiredState: running + NetworksAttachments: + - Network: + ID: 4qvuz4ko70xaltuqbt8956gd1 + Version: + Index: 18 + CreatedAt: 2016-06-07T20:31:11.912919752Z + UpdatedAt: 2016-06-07T21:07:29.955277358Z + Spec: + Name: ingress + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + DriverState: + Name: overlay + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: default + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + Addresses: + - 10.255.0.10/16 + - ID: 1yljwbmlr8er2waf8orvqpwms + Version: + Index: 30 + CreatedAt: 2016-06-07T21:07:30.019104782Z + UpdatedAt: 2016-06-07T21:07:30.231958098Z + Name: hopeful_cori + Spec: + ContainerSpec: + Image: redis + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: any + MaxAttempts: 0 + Placement: {} + ServiceID: 9mnpnzenvg8p8tdbtq4wvbkcz + Slot: 1 + NodeID: 60gvrl6tm78dmak4yl7srz94v + Status: + Timestamp: 2016-06-07T21:07:30.202183143Z + State: shutdown + Message: shutdown + ContainerStatus: + ContainerID: 1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213 + DesiredState: shutdown + NetworksAttachments: + - Network: + ID: 4qvuz4ko70xaltuqbt8956gd1 + Version: + Index: 18 + CreatedAt: 2016-06-07T20:31:11.912919752Z + UpdatedAt: 2016-06-07T21:07:29.955277358Z + Spec: + Name: ingress + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + DriverState: + Name: overlay + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: default + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + Addresses: + - 10.255.0.5/16 + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + + Available filters: + + - `desired-state=(running | shutdown | accepted)` + - `id=` + - `label=key` or `label="key=value"` + - `name=` + - `node=` + - `service=` + schema: + type: string + tags: + - Task + "/tasks/{id}": + get: + summary: Inspect a task + operationId: TaskInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + "404": + description: no such task + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: ID of the task + required: true + schema: + type: string + tags: + - Task + "/tasks/{id}/logs": + get: + summary: Get task logs + description: | + Get `stdout` and `stderr` logs from a task. + See also [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: TaskLogs + responses: + "200": + description: logs returned as a stream in response body + content: + application/vnd.docker.raw-stream: + schema: + type: string + format: binary + application/vnd.docker.multiplexed-stream: + schema: + type: string + format: binary + "404": + description: no such task + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/json: + examples: + response: + value: + message: "No such task: c2ada9df5af8" + "500": + description: server error + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + application/vnd.docker.multiplexed-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID of the task + schema: + type: string + - name: details + in: query + description: Show task context and extra details provided to logs. + schema: + type: boolean + default: false + - name: follow + in: query + description: Keep connection after returning logs. + schema: + type: boolean + default: false + - name: stdout + in: query + description: Return logs from `stdout` + schema: + type: boolean + default: false + - name: stderr + in: query + description: Return logs from `stderr` + schema: + type: boolean + default: false + - name: since + in: query + description: Only return logs since this time, as a UNIX timestamp + schema: + type: integer + default: 0 + - name: timestamps + in: query + description: Add timestamps to every log line + schema: + type: boolean + default: false + - name: tail + in: query + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + schema: + type: string + default: all + tags: + - Task + /secrets: + get: + summary: List secrets + operationId: SecretList + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Secret" + example: + - ID: blt1owaxmitz71s9v5zh81zun + Version: + Index: 85 + CreatedAt: 2017-07-20T13:55:28.678958722Z + UpdatedAt: 2017-07-20T13:55:28.678958722Z + Spec: + Name: mysql-passwd + Labels: + some.label: some.value + Driver: + Name: secret-bucket + Options: + OptionA: value for driver option A + OptionB: value for driver option B + - ID: ktnbjxoalbkvbvedmg1urrz8h + Version: + Index: 11 + CreatedAt: 2016-11-05T01:20:17.327670065Z + UpdatedAt: 2016-11-05T01:20:17.327670065Z + Spec: + Name: app-dev.crt + Labels: + foo: bar + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + schema: + type: string + tags: + - Secret + /secrets/create: + post: + summary: Create a secret + operationId: SecretCreate + responses: + "201": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/IDResponse" + "409": + description: name conflicts with an existing object + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/SecretSpec" + - type: object + example: + Name: app-key.crt + Labels: + foo: bar + Data: VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg== + Driver: + Name: secret-bucket + Options: + OptionA: value for driver option A + OptionB: value for driver option B + tags: + - Secret + "/secrets/{id}": + get: + summary: Inspect a secret + operationId: SecretInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Secret" + examples: + response: + value: + ID: ktnbjxoalbkvbvedmg1urrz8h + Version: + Index: 11 + CreatedAt: 2016-11-05T01:20:17.327670065Z + UpdatedAt: 2016-11-05T01:20:17.327670065Z + Spec: + Name: app-dev.crt + Labels: + foo: bar + Driver: + Name: secret-bucket + Options: + OptionA: value for driver option A + OptionB: value for driver option B + "404": + description: secret not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID of the secret + schema: + type: string + tags: + - Secret + delete: + summary: Delete a secret + operationId: SecretDelete + responses: + "204": + description: no error + "404": + description: secret not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID of the secret + schema: + type: string + tags: + - Secret + "/secrets/{id}/update": + post: + summary: Update a Secret + operationId: SecretUpdate + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such secret + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: The ID or name of the secret + required: true + schema: + type: string + - name: version + in: query + description: | + The version number of the secret object being updated. This is + required to avoid conflicting writes. + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SecretSpec" + text/plain: + schema: + $ref: "#/components/schemas/SecretSpec" + description: | + The spec of the secret to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [SecretInspect endpoint](#operation/SecretInspect) response values. + tags: + - Secret + /configs: + get: + summary: List configs + operationId: ConfigList + responses: + "200": + description: no error + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Config" + example: + - ID: ktnbjxoalbkvbvedmg1urrz8h + Version: + Index: 11 + CreatedAt: 2016-11-05T01:20:17.327670065Z + UpdatedAt: 2016-11-05T01:20:17.327670065Z + Spec: + Name: server.conf + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: filters + in: query + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the configs list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + schema: + type: string + tags: + - Config + /configs/create: + post: + summary: Create a config + operationId: ConfigCreate + responses: + "201": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/IDResponse" + "409": + description: name conflicts with an existing object + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/ConfigSpec" + - type: object + example: + Name: server.conf + Labels: + foo: bar + Data: VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg== + tags: + - Config + "/configs/{id}": + get: + summary: Inspect a config + operationId: ConfigInspect + responses: + "200": + description: no error + content: + application/json: + schema: + $ref: "#/components/schemas/Config" + examples: + response: + value: + ID: ktnbjxoalbkvbvedmg1urrz8h + Version: + Index: 11 + CreatedAt: 2016-11-05T01:20:17.327670065Z + UpdatedAt: 2016-11-05T01:20:17.327670065Z + Spec: + Name: app-dev.crt + "404": + description: config not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID of the config + schema: + type: string + tags: + - Config + delete: + summary: Delete a config + operationId: ConfigDelete + responses: + "204": + description: no error + "404": + description: config not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + required: true + description: ID of the config + schema: + type: string + tags: + - Config + "/configs/{id}/update": + post: + summary: Update a Config + operationId: ConfigUpdate + responses: + "200": + description: no error + "400": + description: bad parameter + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "404": + description: no such config + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + "503": + description: node is not part of a swarm + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + text/plain: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: id + in: path + description: The ID or name of the config + required: true + schema: + type: string + - name: version + in: query + description: | + The version number of the config object being updated. This is + required to avoid conflicting writes. + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ConfigSpec" + text/plain: + schema: + $ref: "#/components/schemas/ConfigSpec" + description: | + The spec of the config to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [ConfigInspect endpoint](#operation/ConfigInspect) response values. + tags: + - Config + "/distribution/{name}/json": + get: + summary: Get image information from the registry + description: | + Return image digest and platform information by contacting the registry. + operationId: DistributionInspect + responses: + "200": + description: descriptor and platform information + content: + application/json: + schema: + $ref: "#/components/schemas/DistributionInspect" + "401": + description: Failed authentication or no image found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + response: + value: + message: "No such image: someimage (tag: latest)" + "500": + description: Server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + parameters: + - name: name + in: path + description: Image name or id + required: true + schema: + type: string + tags: + - Distribution + /session: + post: + summary: Initialize interactive session + description: | + Start a new interactive session with a server. Session allows server to + call back to the client for advanced capabilities. + + ### Hijacking + + This endpoint hijacks the HTTP connection to HTTP2 transport that allows + the client to expose gPRC services on that connection. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /session HTTP/1.1 + Upgrade: h2c + Connection: Upgrade + ``` + + The Docker daemon responds with a `101 UPGRADED` response follow with + the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Connection: Upgrade + Upgrade: h2c + ``` + operationId: Session + responses: + "101": + description: no error, hijacking successful + "400": + description: bad parameter + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + "500": + description: server error + content: + application/vnd.docker.raw-stream: + schema: + $ref: "#/components/schemas/ErrorResponse" + tags: + - Session +servers: + - url: /v1.51 +components: + requestBodies: + PluginPrivilegeArray: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PluginPrivilege" + example: + - Name: network + Description: "" + Value: + - host + - Name: mount + Description: "" + Value: + - /data + - Name: device + Description: "" + Value: + - /dev/cpu_dma_latency + text/plain: + schema: + type: array + items: + $ref: "#/components/schemas/PluginPrivilege" + example: + - Name: network + Description: "" + Value: + - host + - Name: mount + Description: "" + Value: + - /data + - Name: device + Description: "" + Value: + - /dev/cpu_dma_latency + schemas: + Port: + type: object + description: An open port on a container + required: + - PrivatePort + - Type + properties: + IP: + type: string + format: ip-address + description: Host IP address that the container's port is mapped to + PrivatePort: + type: integer + format: uint16 + description: Port on the container + nullable: false + PublicPort: + type: integer + format: uint16 + description: Port exposed on the host + Type: + type: string + enum: + - tcp + - udp + - sctp + nullable: false + example: + PrivatePort: 8080 + PublicPort: 80 + Type: tcp + MountPoint: + type: object + description: | + MountPoint represents a mount point configuration inside the container. + This is used for reporting the mountpoints in use by a container. + properties: + Type: + description: > + The mount type: + + + - `bind` a mount of a file or directory from the host into the container. + + - `volume` a docker volume with the given `Name`. + + - `image` a docker image + + - `tmpfs` a `tmpfs`. + + - `npipe` a named pipe from the host into the container. + + - `cluster` a Swarm cluster volume + type: string + enum: + - bind + - volume + - image + - tmpfs + - npipe + - cluster + example: volume + Name: + description: > + Name is the name reference to the underlying data defined by + `Source` + + e.g., the volume name. + type: string + example: myvolume + Source: + description: > + Source location of the mount. + + + For volumes, this contains the storage location of the volume (within + + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + + the source (host) part of the bind-mount. For `tmpfs` mount points, this + + field is empty. + type: string + example: /var/lib/docker/volumes/myvolume/_data + Destination: + description: | + Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + type: string + example: /usr/share/nginx/html/ + Driver: + description: > + Driver is the volume driver used to create the volume (if it is a + volume). + type: string + example: local + Mode: + description: | + Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + type: string + example: z + RW: + description: | + Whether the mount is mounted writable (read-write). + type: boolean + example: true + Propagation: + description: > + Propagation describes how mounts are propagated from the host into + the + + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + + for details. This field is not used on Windows. + type: string + example: "" + DeviceMapping: + type: object + description: A device mapping between the host and container + properties: + PathOnHost: + type: string + PathInContainer: + type: string + CgroupPermissions: + type: string + example: + PathOnHost: /dev/deviceName + PathInContainer: /dev/deviceName + CgroupPermissions: mrw + DeviceRequest: + type: object + description: A request for devices to be sent to device drivers + properties: + Driver: + type: string + example: nvidia + Count: + type: integer + example: -1 + DeviceIDs: + type: array + items: + type: string + example: + - "0" + - "1" + - GPU-fef8089b-4820-abfc-e83e-94318197576e + Capabilities: + description: | + A list of capabilities; an OR list of AND lists of capabilities. + type: array + items: + type: array + items: + type: string + example: + - - gpu + - nvidia + - compute + Options: + description: > + Driver-specific options, specified as a key/value pairs. These + options + + are passed directly to the driver. + type: object + additionalProperties: + type: string + ThrottleDevice: + type: object + properties: + Path: + description: Device path + type: string + Rate: + description: Rate + type: integer + format: int64 + minimum: 0 + Mount: + type: object + properties: + Target: + description: Container path. + type: string + Source: + description: Mount source (e.g. a volume name, a host path). + type: string + Type: + description: > + The mount type. Available types: + + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + + - `image` Mounts an image. + + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + + - `cluster` a Swarm cluster volume + type: string + enum: + - bind + - volume + - image + - tmpfs + - npipe + - cluster + ReadOnly: + description: Whether the mount should be read-only. + type: boolean + Consistency: + description: "The consistency requirement for the mount: `default`, + `consistent`, `cached`, or `delegated`." + type: string + BindOptions: + description: Optional configuration for the `bind` type. + type: object + properties: + Propagation: + description: A propagation mode with the value `[r]private`, `[r]shared`, or + `[r]slave`. + type: string + enum: + - private + - rprivate + - shared + - rshared + - slave + - rslave + NonRecursive: + description: Disable recursive bind mount. + type: boolean + default: false + CreateMountpoint: + description: Create mount point on host if missing + type: boolean + default: false + ReadOnlyNonRecursive: + description: > + Make the mount non-recursively read-only, but still leave the + mount recursive + + (unless NonRecursive is set to `true` in conjunction). + + + Added in v1.44, before that version all read-only mounts were + + non-recursive by default. To match the previous behaviour this + + will default to `true` for clients on versions prior to v1.44. + type: boolean + default: false + ReadOnlyForceRecursive: + description: Raise an error if the mount cannot be made recursively read-only. + type: boolean + default: false + VolumeOptions: + description: Optional configuration for the `volume` type. + type: object + properties: + NoCopy: + description: Populate volume with data from the target. + type: boolean + default: false + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + DriverConfig: + description: Map of driver specific options + type: object + properties: + Name: + description: Name of the driver to use to create the volume. + type: string + Options: + description: key/value map of driver specific options. + type: object + additionalProperties: + type: string + Subpath: + description: Source path inside the volume. Must be relative without any back + traversals. + type: string + example: dir-inside-volume/subdirectory + ImageOptions: + description: Optional configuration for the `image` type. + type: object + properties: + Subpath: + description: Source path inside the image. Must be relative without any back + traversals. + type: string + example: dir-inside-image/subdirectory + TmpfsOptions: + description: Optional configuration for the `tmpfs` type. + type: object + properties: + SizeBytes: + description: The size for the tmpfs mount in bytes. + type: integer + format: int64 + Mode: + description: The permission mode for the tmpfs mount in an integer. + type: integer + Options: + description: > + The options to be passed to the tmpfs mount. An array of arrays. + + Flag options should be provided as 1-length arrays. Other types + + should be provided as as 2-length arrays, where the first item is + + the key and the second the value. + type: array + items: + type: array + minItems: 1 + maxItems: 2 + items: + type: string + example: + - - noexec + RestartPolicy: + description: > + The behavior to apply when the container exits. The default is not to + + restart. + + + An ever increasing delay (double the previous delay, starting at 100ms) is + + added before each restart to prevent flooding the server. + type: object + properties: + Name: + type: string + description: > + - Empty string means not to restart + + - `no` Do not automatically restart + + - `always` Always restart + + - `unless-stopped` Restart always except when the user has manually stopped the container + + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "" + - no + - always + - unless-stopped + - on-failure + MaximumRetryCount: + type: integer + description: > + If `on-failure` is used, the number of times to retry before giving + up. + Resources: + description: A container's resources (cgroups config, ulimits, etc) + type: object + properties: + CpuShares: + description: | + An integer value representing this container's relative CPU weight + versus other containers. + type: integer + Memory: + description: Memory limit in bytes. + type: integer + format: int64 + default: 0 + CgroupParent: + description: > + Path to `cgroups` under which the container's `cgroup` is created. + If + + the path is not absolute, the path is considered to be relative to the + + `cgroups` path of the init process. Cgroups are created if they do not + + already exist. + type: string + BlkioWeight: + description: Block IO weight (relative weight). + type: integer + minimum: 0 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + type: array + nullable: true + items: + type: object + properties: + Path: + type: string + Weight: + type: integer + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: array + nullable: true + items: + $ref: "#/components/schemas/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: array + nullable: true + items: + $ref: "#/components/schemas/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: array + nullable: true + items: + $ref: "#/components/schemas/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: array + nullable: true + items: + $ref: "#/components/schemas/ThrottleDevice" + CpuPeriod: + description: The length of a CPU period in microseconds. + type: integer + format: int64 + CpuQuota: + description: | + Microseconds of CPU time that the container can get in a CPU period. + type: integer + format: int64 + CpuRealtimePeriod: + description: | + The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: integer + format: int64 + CpuRealtimeRuntime: + description: | + The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: integer + format: int64 + CpusetCpus: + description: | + CPUs in which to allow execution (e.g., `0-3`, `0,1`). + type: string + example: 0-3 + CpusetMems: + description: | + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + type: string + Devices: + description: A list of devices to add to the container. + type: array + nullable: true + items: + $ref: "#/components/schemas/DeviceMapping" + DeviceCgroupRules: + description: a list of cgroup rules to apply to the container + type: array + nullable: true + items: + type: string + example: c 13:* rwm + DeviceRequests: + description: | + A list of requests for devices to be sent to device drivers. + type: array + nullable: true + items: + $ref: "#/components/schemas/DeviceRequest" + KernelMemoryTCP: + description: > + Hard limit for kernel TCP buffer memory (in bytes). Depending on the + + OCI runtime in use, this option may be ignored. It is no longer supported + + by the default (runc) runtime. + + + This field is omitted when empty. + + + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + + for cgroups v1. This field will be removed in a future release. + type: integer + format: int64 + MemoryReservation: + description: Memory soft limit in bytes. + type: integer + format: int64 + MemorySwap: + description: | + Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + type: integer + format: int64 + MemorySwappiness: + description: | + Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + type: integer + nullable: true + format: int64 + minimum: 0 + maximum: 100 + NanoCpus: + nullable: true + description: CPU quota in units of 10-9 CPUs. + type: integer + format: int64 + OomKillDisable: + nullable: true + description: Disable OOM Killer for the container. + type: boolean + Init: + 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. + type: boolean + nullable: true + PidsLimit: + description: > + Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or + `null` + + to not change. + type: integer + format: int64 + nullable: true + Ulimits: + description: | + A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + type: array + nullable: true + items: + type: object + properties: + Name: + description: Name of ulimit + type: string + Soft: + description: Soft limit + type: integer + Hard: + description: Hard limit + type: integer + CpuCount: + nullable: true + description: > + The number of usable CPUs (Windows only). + + + On Windows Server containers, the processor resource controls are + + mutually exclusive. The order of precedence is `CPUCount` first, then + + `CPUShares`, and `CPUPercent` last. + type: integer + format: int64 + CpuPercent: + description: > + The usable percentage of the available CPUs (Windows only). + + + On Windows Server containers, the processor resource controls are + + mutually exclusive. The order of precedence is `CPUCount` first, then + + `CPUShares`, and `CPUPercent` last. + type: integer + format: int64 + nullable: true + IOMaximumIOps: + description: Maximum IOps for the container system drive (Windows only) + type: integer + format: int64 + nullable: true + IOMaximumBandwidth: + description: | + Maximum IO in bytes per second for the container system drive + (Windows only). + type: integer + format: int64 + nullable: true + Limit: + description: > + An object describing a limit on resources which can be requested by a + task. + type: object + properties: + NanoCPUs: + type: integer + format: int64 + example: 4000000000 + MemoryBytes: + type: integer + format: int64 + example: 8272408576 + Pids: + description: > + Limits the maximum number of PIDs in the container. Set `0` for + unlimited. + type: integer + format: int64 + default: 0 + example: 100 + ResourceObject: + description: | + An object describing the resources which can be advertised by a node and + requested by a task. + type: object + properties: + NanoCPUs: + type: integer + format: int64 + example: 4000000000 + MemoryBytes: + type: integer + format: int64 + example: 8272408576 + GenericResources: + $ref: "#/components/schemas/GenericResources" + GenericResources: + description: | + User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + type: array + items: + type: object + properties: + NamedResourceSpec: + type: object + properties: + Kind: + type: string + Value: + type: string + DiscreteResourceSpec: + type: object + properties: + Kind: + type: string + Value: + type: integer + format: int64 + example: + - DiscreteResourceSpec: + Kind: SSD + Value: 3 + - NamedResourceSpec: + Kind: GPU + Value: UUID1 + - NamedResourceSpec: + Kind: GPU + Value: UUID2 + HealthConfig: + description: A test to perform to check that the container is healthy. + type: object + properties: + Test: + description: | + The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + type: array + items: + type: string + Interval: + description: | + The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + type: integer + format: int64 + Timeout: + description: > + The time to wait before considering the check to have hung. It + should + + be 0 or at least 1000000 (1 ms). 0 means inherit. + type: integer + format: int64 + Retries: + description: | + The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + type: integer + StartPeriod: + description: | + Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + type: integer + format: int64 + StartInterval: + description: > + The time to wait between checks in nanoseconds during the start + period. + + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + type: integer + format: int64 + Health: + description: | + Health stores information about the container's healthcheck results. + type: object + properties: + Status: + description: > + Status is one of `none`, `starting`, `healthy` or `unhealthy` + + + - "none" Indicates there is no healthcheck + + - "starting" Starting indicates that the container is not yet ready + + - "healthy" Healthy indicates that the container is running correctly + + - "unhealthy" Unhealthy indicates that the container has a problem + type: string + enum: + - none + - starting + - healthy + - unhealthy + example: healthy + FailingStreak: + description: FailingStreak is the number of consecutive failures + type: integer + example: 0 + Log: + type: array + description: | + Log contains the last few results (oldest first) + nullable: true + items: + $ref: "#/components/schemas/HealthcheckResult" + nullable: true + HealthcheckResult: + description: > + HealthcheckResult stores information about a single run of a healthcheck + probe + type: object + properties: + Start: + description: > + Date and time at which this check started in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + # format: date-time + example: 2020-01-04T10:44:24.496525531Z + End: + description: > + Date and time at which this check ended in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2020-01-04T10:45:21.364524523Z + ExitCode: + description: | + ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + type: integer + example: 0 + Output: + description: Output from last check + type: string + nullable: true + HostConfig: + description: Container configuration that depends on the host we are running on + nullable: true + allOf: + - $ref: "#/components/schemas/Resources" + - type: object + additionalProperties: true + nullable: true + properties: + Binds: + type: array + nullable: true + description: > + A list of volume bindings for this container. Each volume + binding + + is a string in one of these forms: + + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. + + `options` is an optional, comma-delimited list of: + + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. + items: + type: string + ContainerIDFile: + type: string + description: Path to a file where the container ID is written + example: "" + LogConfig: + type: object + description: The logging configuration for this container + properties: + Type: + description: |- + Name of the logging driver used for the container or "none" + if logging is disabled. + type: string + enum: + - local + - json-file + - syslog + - journald + - gelf + - fluentd + - awslogs + - splunk + - etwlogs + - none + Config: + description: Driver-specific configuration options for the logging driver. + type: object + additionalProperties: + type: string + example: + max-file: "5" + max-size: 10m + NetworkMode: + type: string + description: > + Network mode to use for this container. Supported standard + values + + are: `bridge`, `host`, `none`, and `container:`. Any + + other value is taken as a custom network's name to which this + + container should connect to. + PortBindings: + $ref: "#/components/schemas/PortMap" + RestartPolicy: + $ref: "#/components/schemas/RestartPolicy" + AutoRemove: + type: boolean + description: | + Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + VolumeDriver: + type: string + description: Driver that this container uses to mount volumes. + VolumesFrom: + nullable: true + type: array + description: > + A list of volumes to inherit from another container, specified + in + + the form `[:]`. + items: + type: string + Mounts: + nullable: true + description: | + Specification for mounts to be added to the container. + type: array + items: + $ref: "#/components/schemas/Mount" + ConsoleSize: + type: array + description: | + Initial console size, as an `[height, width]` array. + minItems: 2 + maxItems: 2 + items: + type: integer + minimum: 0 + example: + - 80 + - 64 + nullable: true + Annotations: + nullable: true + type: object + description: | + Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + additionalProperties: + type: string + CapAdd: + type: array + nullable: true + description: | + A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + items: + type: string + CapDrop: + type: array + nullable: true + description: > + A list of kernel capabilities to drop from the container. + Conflicts + + with option 'Capabilities'. + items: + type: string + CgroupnsMode: + type: string + enum: + - private + - host + description: > + cgroup namespace mode for the container. Possible values are: + + + - `"private"`: the container runs in its own private cgroup namespace + + - `"host"`: use the host system's cgroup namespace + + + If not specified, the daemon default is used, which can either be `"private"` + + or `"host"`, depending on daemon version, kernel support and configuration. + Dns: + type: array + nullable: true + description: A list of DNS servers for the container to use. + items: + type: string + DnsOptions: + type: array + nullable: true + description: A list of DNS options. + items: + type: string + DnsSearch: + type: array + nullable: true + description: A list of DNS search domains. + items: + type: string + ExtraHosts: + type: array + nullable: true + description: > + A list of hostnames/IP mappings to add to the container's + `/etc/hosts` + + file. Specified in the form `["hostname:IP"]`. + items: + type: string + GroupAdd: + type: array + nullable: true + description: > + A list of additional groups that the container process will run + as. + items: + type: string + IpcMode: + nullable: true + type: string + description: > + IPC sharing mode for the container. Possible values are: + + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + + - `"private"`: own private IPC namespace + + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + + - `"container:"`: join another (shareable) container's IPC namespace + + - `"host"`: use the host system's IPC namespace + + + If not specified, daemon default is used, which can either be `"private"` + + or `"shareable"`, depending on daemon version and configuration. + Cgroup: + nullable: true + type: string + description: Cgroup to use for the container. + Links: + type: array + nullable: true + description: > + A list of links for the container in the form + `container_name:alias`. + items: + type: string + OomScoreAdj: + nullable: true + type: integer + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 500 + PidMode: + nullable: true + type: string + description: > + Set the PID (Process) Namespace mode for the container. It can + be + + either: + + + - `"container:"`: joins another container's PID namespace + + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: boolean + description: Gives the container full access to the host. + PublishAllPorts: + type: boolean + description: > + Allocates an ephemeral host port for all of a container's + + exposed ports. + + + Ports are de-allocated when the container stops and allocated when + + the container starts. The allocated port might be changed when + + restarting the container. + + + The port is selected from the ephemeral port range that depends on + + the kernel. For example, on Linux the range is defined by + + `/proc/sys/net/ipv4/ip_local_port_range`. + ReadonlyRootfs: + type: boolean + description: Mount the container's root filesystem as read only. + SecurityOpt: + type: array + description: > + A list of string values to customize labels for MLS systems, + such + + as SELinux. + nullable: true + items: + type: string + StorageOpt: + type: object + description: > + Storage driver options for this container, in the form `{"size": + "120G"}`. + additionalProperties: + type: string + Tmpfs: + type: object + description: | + A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + additionalProperties: + type: string + UTSMode: + type: string + description: UTS namespace to use for the container. + UsernsMode: + type: string + description: | + Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + ShmSize: + type: integer + format: int64 + description: | + Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + minimum: 0 + Sysctls: + type: object + description: |- + A list of kernel parameters (sysctls) to set in the container. + + This field is omitted if not set. + additionalProperties: + type: string + example: + net.ipv4.ip_forward: "1" + nullable: true + Runtime: + type: string + description: Runtime to use with this container. + nullable: true + Isolation: + type: string + description: | + Isolation technology of the container. (Windows only) + enum: + - default + - process + - hyperv + - "" + MaskedPaths: + type: array + description: > + The list of paths to be masked inside the container (this + overrides + + the default set of paths). + nullable: true + items: + type: string + example: + - /proc/asound + - /proc/acpi + - /proc/kcore + - /proc/keys + - /proc/latency_stats + - /proc/timer_list + - /proc/timer_stats + - /proc/sched_debug + - /proc/scsi + - /sys/firmware + - /sys/devices/virtual/powercap + ReadonlyPaths: + type: array + description: | + The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + items: + type: string + example: + - /proc/bus + - /proc/fs + - /proc/irq + - /proc/sys + - /proc/sysrq-trigger + ContainerConfig: + description: | + Configuration for a container that is portable between hosts. + type: object + properties: + Hostname: + description: | + The hostname to use for the container, as a valid RFC 1123 hostname. + type: string + example: 439f4e91bd1d + Domainname: + description: | + The domain name to use for the container. + type: string + User: + description: >- + Commands run as this user inside the container. If omitted, commands + + run as the user specified in the image the container was started from. + + + Can be either user-name or UID, and optional group-name or GID, + + separated by a colon (`[<:group-name|GID>]`). + type: string + example: 123:456 + AttachStdin: + description: Whether to attach to `stdin`. + type: boolean + default: false + AttachStdout: + description: Whether to attach to `stdout`. + type: boolean + default: true + AttachStderr: + description: Whether to attach to `stderr`. + type: boolean + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: object + additionalProperties: + nullable: true + type: object + enum: + - {} + default: {} + example: + 80/tcp: {} + 443/tcp: {} + nullable: true + Tty: + description: > + Attach standard streams to a TTY, including `stdin` if it is not + closed. + type: boolean + default: false + OpenStdin: + description: Open `stdin` + type: boolean + default: false + StdinOnce: + description: Close `stdin` after one attached client disconnects + type: boolean + default: false + Env: + description: > + A list of environment variables to set inside the container in the + + form `["VAR=value", ...]`. A variable without `=` is removed from the + + environment, rather than to have an empty value. + type: array + items: + type: string + example: + - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: array + nullable: true + items: + type: string + example: + - /bin/sh + Healthcheck: + $ref: "#/components/schemas/HealthConfig" + ArgsEscaped: + description: Command is already escaped (Windows only) + type: boolean + default: false + example: false + nullable: true + Image: + description: > + The name (or reference) of the image to use when creating the + container, + + or which was used when the container was created. + type: string + example: example-image:1.0 + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: object + nullable: true + additionalProperties: + type: object + enum: + - {} + default: {} + WorkingDir: + description: The working directory for commands to run in. + type: string + example: /public/ + Entrypoint: + description: > + The entry point for the container as a string or an array of + strings. + + + If the array consists of exactly one empty string (`[""]`) then the + + entry point is reset to system default (i.e., the entry point used by + + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: array + items: + type: string + nullable: true + example: [] + NetworkDisabled: + description: Disable networking for the container. + type: boolean + nullable: true + MacAddress: + description: > + MAC address of the container. + + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + type: string + nullable: true + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: array + items: + type: string + example: [] + nullable: true + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: string + example: SIGTERM + nullable: true + StopTimeout: + description: Timeout to stop a container in seconds. + type: integer + default: 10 + nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: array + items: + type: string + example: + - /bin/sh + - -c + nullable: true + ImageConfig: + description: | + Configuration of the image. These fields are used as defaults + when starting a container from the image. + type: object + properties: + User: + description: The user that commands are run as inside the container. + type: string + example: web:web + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: object + additionalProperties: + type: object + enum: + - {} + default: {} + example: + 80/tcp: {} + 443/tcp: {} + nullable: true + Env: + description: > + A list of environment variables to set inside the container in the + + form `["VAR=value", ...]`. A variable without `=` is removed from the + + environment, rather than to have an empty value. + type: array + items: + type: string + example: + - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: array + items: + type: string + example: + - /bin/sh + Healthcheck: + $ref: "#/components/schemas/HealthConfig" + ArgsEscaped: + description: Command is already escaped (Windows only) + type: boolean + default: false + example: false + nullable: true + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: object + additionalProperties: + type: object + enum: + - {} + default: {} + example: + /app/data: {} + /app/config: {} + WorkingDir: + description: The working directory for commands to run in. + type: string + example: /public/ + Entrypoint: + description: > + The entry point for the container as a string or an array of + strings. + + + If the array consists of exactly one empty string (`[""]`) then the + + entry point is reset to system default (i.e., the entry point used by + + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: array + items: + type: string + example: [] + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: array + items: + type: string + example: [] + nullable: true + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: string + example: SIGTERM + nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: array + items: + type: string + example: + - /bin/sh + - -c + nullable: true + NetworkingConfig: + description: | + NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + type: object + properties: + EndpointsConfig: + description: > + A mapping of network name to endpoint configuration for that + network. + + The endpoint configuration can be left empty to connect to that + + network with no particular endpoint configuration. + type: object + additionalProperties: + $ref: "#/components/schemas/EndpointSettings" + example: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: 172.20.30.33 + IPv6Address: 2001:db8:abcd::3033 + LinkLocalIPs: + - 169.254.34.68 + - fe80::3468 + MacAddress: 02:42:ac:12:05:02 + Links: + - container_1 + - container_2 + Aliases: + - server_x + - server_y + database_nw: {} + NetworkSettings: + description: NetworkSettings exposes the network settings in the API + type: object + properties: + Bridge: + description: > + Name of the default bridge interface when dockerd's --bridge flag is + set. + + + Deprecated: This field is only set when the daemon is started with the --bridge flag specified. + type: string + example: docker0 + nullable: true + SandboxID: + description: SandboxID uniquely represents a container's network stack. + type: string + example: 9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3 + HairpinMode: + description: > + Indicates if hairpin NAT should be enabled on the virtual interface. + + + Deprecated: This field is never set and will be removed in a future release. + type: boolean + example: false + LinkLocalIPv6Address: + description: > + IPv6 unicast address using the link-local prefix. + + + Deprecated: This field is never set and will be removed in a future release. + type: string + example: "" + LinkLocalIPv6PrefixLen: + description: > + Prefix length of the IPv6 unicast address. + + + Deprecated: This field is never set and will be removed in a future release. + type: integer + example: "" + Ports: + $ref: "#/components/schemas/PortMap" + SandboxKey: + description: SandboxKey is the full path of the netns handle + type: string + example: /var/run/docker/netns/8ab54b426c38 + SecondaryIPAddresses: + description: "Deprecated: This field is never set and will be removed in a + future release." + type: array + items: + $ref: "#/components/schemas/Address" + nullable: true + SecondaryIPv6Addresses: + description: "Deprecated: This field is never set and will be removed in a + future release." + type: array + items: + $ref: "#/components/schemas/Address" + nullable: true + EndpointID: + description: > + EndpointID uniquely represents a service endpoint in a Sandbox. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b + Gateway: + description: > + Gateway address for the default "bridge" network. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: 172.17.0.1 + GlobalIPv6Address: + description: > + Global IPv6 address for the default "bridge" network. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: 2001:db8::5689 + GlobalIPv6PrefixLen: + description: > + Mask length of the global IPv6 address. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: integer + example: 64 + IPAddress: + description: > + IPv4 address for the default "bridge" network. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: 172.17.0.4 + IPPrefixLen: + description: > + Mask length of the IPv4 address. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: integer + example: 16 + IPv6Gateway: + description: > + IPv6 gateway address for this network. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: 2001:db8:2::100 + MacAddress: + description: > + MAC address for the container on the default "bridge" network. + + +


+ + + > **Deprecated**: This field is only propagated when attached to the + + > default "bridge" network. Use the information from the "bridge" + + > network inside the `Networks` map instead, which contains the same + + > information. This field was deprecated in Docker 1.9 and is scheduled + + > to be removed in Docker 17.12.0 + type: string + example: 02:42:ac:11:00:04 + Networks: + description: | + Information about all networks that the container is connected to. + type: object + additionalProperties: + $ref: "#/components/schemas/EndpointSettings" + Address: + description: Address represents an IPv4 or IPv6 IP address. + type: object + properties: + Addr: + description: IP address. + type: string + PrefixLen: + description: Mask length of the IP address. + type: integer + PortMap: + description: > + PortMap describes the mapping of container ports to host ports, using + the + + container's port-number and protocol as key in the format `/`, + + for example, `80/udp`. + + + If a container's port is mapped for multiple protocols, separate entries + + are added to the mapping table. + type: object + additionalProperties: + type: array + nullable: true + anyOf: + - $ref: "#/components/schemas/PortBinding" + - null + nullable: true + example: + 443/tcp: + - HostIp: 127.0.0.1 + HostPort: "4443" + 80/tcp: + - HostIp: 0.0.0.0 + HostPort: "80" + - HostIp: 0.0.0.0 + HostPort: "8080" + 80/udp: + - HostIp: 0.0.0.0 + HostPort: "80" + 53/udp: + - HostIp: 0.0.0.0 + HostPort: "53" + 2377/tcp: null + PortBinding: + description: | + PortBinding represents a binding between a host IP address and a host + port. + type: object + properties: + HostIp: + description: Host IP address that the container's port is mapped to. + type: string + example: 127.0.0.1 + HostPort: + description: Host port number that the container's port is mapped to. + type: string + example: "4443" + DriverData: + description: | + Information about the storage driver used to store the container's and + image's filesystem. + type: object + required: + - Name + - Data + properties: + Name: + description: Name of the storage driver. + type: string + example: overlay2 + nullable: false + Data: + description: > + Low-level storage metadata, provided as key/value pairs. + + + This information is driver-specific, and depends on the storage-driver + + in use, and should be used for informational purposes only. + type: object + additionalProperties: + type: string + example: + MergedDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged + UpperDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff + WorkDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work + nullable: false + FilesystemChange: + description: | + Change in the container's filesystem. + type: object + required: + - Path + - Kind + properties: + Path: + description: | + Path to file or directory that has changed. + type: string + nullable: false + Kind: + $ref: "#/components/schemas/ChangeType" + ChangeType: + description: | + Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + type: integer + format: uint8 + enum: + - 0 + - 1 + - 2 + nullable: false + ImageInspect: + description: | + Information about an image in the local image cache. + type: object + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: string + example: sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710 + nullable: false + Descriptor: + $ref: "#/components/schemas/OCIDescriptor" + Manifests: + description: > + Manifests is a list of image manifests available in this image. It + + provides a more detailed view of the platform-specific image manifests or + + other image-attached data like build attestations. + + + Only available if the daemon provides a multi-platform image store + + and the `manifests` option is set in the inspect request. + + + WARNING: This is experimental and may change at any time without any backward + + compatibility. + type: array + items: + $ref: "#/components/schemas/ImageManifestSummary" + nullable: true + RepoTags: + description: > + List of image names/tags in the local image cache that reference + this + + image. + + + Multiple image tags can refer to the same image, and this list may be + + empty if no tags reference the image, in which case the image is + + "untagged", in which case it can still be referenced by its ID. + type: array + items: + type: string + example: + - example:1.0 + - example:latest + - example:stable + - internal.registry.example.com:5000/example:1.0 + RepoDigests: + description: > + List of content-addressable digests of locally available image + manifests + + that the image is referenced from. Multiple manifests can refer to the + + same image. + + + These digests are usually only available if the image was either pulled + + from a registry, or if the image was pushed to a registry, which is when + + the manifest is generated and its digest calculated. + type: array + items: + type: string + example: + - example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb + - internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578 + Parent: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + > **Deprecated**: This field is only set when using the deprecated + > legacy builder. It is included in API responses for informational + > purposes, but should not be depended on as it will be omitted + > once the legacy builder is removed. + type: string + example: "" + nullable: false + Comment: + description: > + Optional message that was set when committing or importing the image. + type: string + example: "" + nullable: false + Created: + description: > + Date and time at which the image was created, formatted in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + + This information is only available if present in the image, + + and omitted otherwise. + type: string + format: dateTime + example: 2022-02-04T21:20:12.497794809Z + nullable: true + DockerVersion: + description: | + The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + + > **Deprecated**: This field is only set when using the deprecated + > legacy builder. It is included in API responses for informational + > purposes, but should not be depended on as it will be omitted + > once the legacy builder is removed. + type: string + example: 27.0.1 + nullable: false + Author: + description: > + Name of the author that was specified when committing the image, or + as + + specified through MAINTAINER (deprecated) in the Dockerfile. + type: string + example: "" + nullable: false + Config: + $ref: "#/components/schemas/ImageConfig" + Architecture: + description: | + Hardware CPU architecture that the image runs on. + type: string + example: arm + nullable: false + Variant: + description: | + CPU architecture variant (presently ARM-only). + type: string + example: v7 + nullable: true + Os: + description: | + Operating System the image is built to run on. + type: string + example: linux + nullable: false + OsVersion: + description: | + Operating System version the image is built to run on (especially + for Windows). + type: string + example: "" + nullable: true + Size: + description: | + Total size of the image including all layers it is composed of. + type: integer + format: int64 + example: 1239828 + nullable: false + GraphDriver: + $ref: "#/components/schemas/DriverData" + RootFS: + description: | + Information about the image's RootFS, including the layer IDs. + type: object + required: + - Type + properties: + Type: + type: string + example: layers + nullable: false + Layers: + type: array + items: + type: string + example: + - sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6 + - sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef + Metadata: + description: > + Additional metadata of the image in the local cache. This + information + + is local to the daemon, and not part of the image itself. + type: object + properties: + LastTagTime: + description: > + Date and time at which the image was last tagged in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + + This information is only available if the image was tagged locally, + + and omitted otherwise. + type: string + format: dateTime + example: 2022-02-28T14:40:02.623929178Z + nullable: true + ImageSummary: + type: object + x-go-name: Summary + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - Labels + - Containers + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: string + example: sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710 + nullable: false + ParentId: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + type: string + example: "" + nullable: false + RepoTags: + description: > + List of image names/tags in the local image cache that reference + this + + image. + + + Multiple image tags can refer to the same image, and this list may be + + empty if no tags reference the image, in which case the image is + + "untagged", in which case it can still be referenced by its ID. + type: array + items: + type: string + example: + - example:1.0 + - example:latest + - example:stable + - internal.registry.example.com:5000/example:1.0 + nullable: false + RepoDigests: + description: > + List of content-addressable digests of locally available image + manifests + + that the image is referenced from. Multiple manifests can refer to the + + same image. + + + These digests are usually only available if the image was either pulled + + from a registry, or if the image was pushed to a registry, which is when + + the manifest is generated and its digest calculated. + type: array + items: + type: string + example: + - example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb + - internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578 + nullable: false + Created: + description: | + Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + type: integer + example: "1644009612" + nullable: false + Size: + description: | + Total size of the image including all layers it is composed of. + type: integer + format: int64 + example: 172064416 + nullable: false + SharedSize: + description: > + Total size of image layers that are shared between this image and + other + + images. + + + This size is not calculated by default. `-1` indicates that the value + + has not been set / calculated. + type: integer + format: int64 + example: 1239828 + nullable: false + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + nullable: false + Containers: + description: > + Number of containers using this image. Includes both stopped and + running + + containers. + + + `-1` indicates that the value has not been set / calculated. + type: integer + example: 2 + nullable: false + Manifests: + description: > + Manifests is a list of manifests available in this image. + + It provides a more detailed view of the platform-specific image manifests + + or other image-attached data like build attestations. + + + WARNING: This is experimental and may change at any time without any backward + + compatibility. + type: array + x-omitempty: true + items: + $ref: "#/components/schemas/ImageManifestSummary" + nullable: false + Descriptor: + $ref: "#/components/schemas/OCIDescriptor" + AuthConfig: + type: object + properties: + username: + type: string + password: + type: string + email: + description: > + Email is an optional value associated with the username. + + + > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. + type: string + serveraddress: + type: string + example: + username: hannibal + password: xxxx + serveraddress: https://index.docker.io/v1/ + ProcessConfig: + type: object + properties: + privileged: + type: boolean + user: + type: string + tty: + type: boolean + entrypoint: + type: string + arguments: + type: array + items: + type: string + Volume: + type: object + required: + - Name + - Driver + - Mountpoint + - Labels + - Scope + - Options + properties: + Name: + type: string + description: Name of the volume. + example: tardis + nullable: false + Driver: + type: string + description: Name of the volume driver used by the volume. + example: custom + nullable: false + Mountpoint: + type: string + description: Mount path of the volume on the host. + example: /var/lib/docker/volumes/tardis + nullable: false + CreatedAt: + type: string + format: dateTime + description: Date/Time the volume was created. + example: 2016-06-07T20:31:11.853781916Z + Status: + type: object + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: object + example: + hello: world + Labels: + type: object + description: User-defined key/value metadata. + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + nullable: false + Scope: + type: string + description: > + The level at which the volume exists. Either `global` for + cluster-wide, + + or `local` for machine level. + default: local + enum: + - local + - global + example: local + nullable: false + ClusterVolume: + $ref: "#/components/schemas/ClusterVolume" + Options: + type: object + description: | + The driver specific options used when creating the volume. + additionalProperties: + type: string + example: + device: tmpfs + o: size=100m,uid=1000 + type: tmpfs + UsageData: + type: object + x-go-name: UsageData + required: + - Size + - RefCount + description: | + Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + properties: + Size: + type: integer + format: int64 + default: -1 + description: > + Amount of disk space used by the volume (in bytes). This + information + + is only available for volumes created with the `"local"` volume + + driver. For volumes created with other volume drivers, this field + + is set to `-1` ("not available") + nullable: false + RefCount: + type: integer + format: int64 + default: -1 + description: | + The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + nullable: false + nullable: true + VolumeCreateOptions: + description: Volume configuration + type: object + title: VolumeConfig + x-go-name: CreateOptions + properties: + Name: + description: | + The new volume's name. If not specified, Docker generates a name. + type: string + example: tardis + nullable: false + Driver: + description: Name of the volume driver to use. + type: string + default: local + example: custom + nullable: false + DriverOpts: + description: | + A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + type: object + additionalProperties: + type: string + example: + device: tmpfs + o: size=100m,uid=1000 + type: tmpfs + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + ClusterVolumeSpec: + $ref: "#/components/schemas/ClusterVolumeSpec" + VolumeListResponse: + type: object + title: VolumeListResponse + x-go-name: ListResponse + description: Volume list response + properties: + Volumes: + type: array + description: List of volumes + items: + $ref: "#/components/schemas/Volume" + Warnings: + type: array + description: | + Warnings that occurred when fetching the list of volumes. + items: + type: string + example: [] + Network: + type: object + properties: + Name: + description: | + Name of the network. + type: string + example: my_network + Id: + description: | + ID that uniquely identifies a network on a single machine. + type: string + example: 7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99 + Created: + description: > + Date and time at which the network was created in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2016-10-19T04:33:30.360899459Z + Scope: + description: | + The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + type: string + example: local + Driver: + description: | + The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + type: string + example: overlay + EnableIPv4: + description: | + Whether the network was created with IPv4 enabled. + type: boolean + example: true + EnableIPv6: + description: | + Whether the network was created with IPv6 enabled. + type: boolean + example: false + IPAM: + $ref: "#/components/schemas/IPAM" + Internal: + description: | + Whether the network is created to only allow internal networking + connectivity. + type: boolean + default: false + example: false + Attachable: + description: > + Whether a global / swarm scope network is manually attachable by + regular + + containers from workers in swarm mode. + type: boolean + default: false + example: false + Ingress: + description: > + Whether the network is providing the routing-mesh for the swarm + cluster. + type: boolean + default: false + example: false + ConfigFrom: + $ref: "#/components/schemas/ConfigReference" + ConfigOnly: + description: > + Whether the network is a config-only network. Config-only networks + are + + placeholder networks for network configurations to be used by other + + networks. Config-only networks cannot be used directly to run containers + + or services. + type: boolean + default: false + Containers: + description: | + Contains endpoints attached to the network. + type: object + additionalProperties: + $ref: "#/components/schemas/NetworkContainer" + example: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: test + EndpointID: 628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a + MacAddress: 02:42:ac:13:00:02 + IPv4Address: 172.19.0.2/16 + IPv6Address: "" + Options: + description: | + Network-specific options uses when creating the network. + type: object + additionalProperties: + type: string + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: 0.0.0.0 + com.docker.network.bridge.name: docker0 + com.docker.network.driver.mtu: "1500" + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + Peers: + description: > + List of peer nodes for an overlay network. This field is only + present + + for overlay networks, and omitted for other network types. + type: array + items: + $ref: "#/components/schemas/PeerInfo" + nullable: true + ConfigReference: + description: | + The config-only network source to provide the configuration for + this network. + type: object + properties: + Network: + description: | + The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + type: string + example: config_only_network_01 + IPAM: + type: object + properties: + Driver: + description: Name of the IPAM driver to use. + type: string + default: default + example: default + Config: + description: > + List of IPAM configuration options, specified as a map: + + + ``` + + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + + ``` + type: array + items: + $ref: "#/components/schemas/IPAMConfig" + Options: + description: Driver-specific options, specified as a map. + type: object + additionalProperties: + type: string + example: + foo: bar + IPAMConfig: + type: object + properties: + Subnet: + type: string + example: 172.20.0.0/16 + IPRange: + type: string + example: 172.20.10.0/24 + Gateway: + type: string + example: 172.20.10.11 + AuxiliaryAddresses: + type: object + additionalProperties: + type: string + NetworkContainer: + type: object + properties: + Name: + type: string + example: container_1 + EndpointID: + type: string + example: 628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a + MacAddress: + type: string + example: 02:42:ac:13:00:02 + IPv4Address: + type: string + example: 172.19.0.2/16 + IPv6Address: + type: string + example: "" + PeerInfo: + description: | + PeerInfo represents one peer of an overlay network. + type: object + properties: + Name: + description: ID of the peer-node in the Swarm cluster. + type: string + example: 6869d7c1732b + IP: + description: IP-address of the peer-node in the Swarm cluster. + type: string + example: 10.133.77.91 + NetworkCreateResponse: + description: OK response to NetworkCreate operation + type: object + title: NetworkCreateResponse + x-go-name: CreateResponse + required: + - Id + - Warning + properties: + Id: + description: The ID of the created network. + type: string + example: b5c4fc71e8022147cd25de22b22173de4e3b170134117172eb595cb91b4e7e5d + nullable: false + Warning: + description: Warnings encountered when creating the container + type: string + example: "" + nullable: false + BuildInfo: + type: object + properties: + id: + type: string + stream: + type: string + error: + type: string + description: >- + errors encountered during the operation. + + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + nullable: true + errorDetail: + $ref: "#/components/schemas/ErrorDetail" + status: + type: string + progress: + type: string + description: >- + Progress is a pre-formatted presentation of progressDetail. + + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + nullable: true + progressDetail: + $ref: "#/components/schemas/ProgressDetail" + aux: + $ref: "#/components/schemas/ImageID" + BuildCache: + type: object + description: | + BuildCache contains information about a build cache record. + properties: + ID: + type: string + description: | + Unique ID of the build cache record. + example: ndlpt0hhvkqcdfkputsk4cq9c + Parent: + description: | + ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + type: string + example: "" + nullable: true + Parents: + description: | + List of parent build cache record IDs. + type: array + items: + type: string + example: + - hw53o5aio51xtltp5xjp8v7fx + nullable: true + Type: + type: string + description: | + Cache record type. + example: regular + enum: + - internal + - frontend + - source.local + - source.git.checkout + - exec.cachemount + - regular + Description: + type: string + description: | + Description of the build-step that produced the build cache. + example: mount / from exec /bin/sh -c echo + 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > + /etc/apt/apt.conf.d/keep-cache + InUse: + type: boolean + description: | + Indicates if the build cache is in use. + example: false + Shared: + type: boolean + description: | + Indicates if the build cache is shared. + example: true + Size: + description: | + Amount of disk space used by the build cache (in bytes). + type: integer + example: 51 + CreatedAt: + description: > + Date and time at which the build cache was created in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2016-08-18T10:44:24.496525531Z + LastUsedAt: + description: > + Date and time at which the build cache was last used in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2017-08-09T07:09:37.632105588Z + nullable: true + UsageCount: + type: integer + example: 26 + ImageID: + type: object + description: Image ID or Digest + properties: + ID: + type: string + example: + ID: sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c + CreateImageInfo: + type: object + properties: + id: + type: string + error: + type: string + description: >- + errors encountered during the operation. + + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + nullable: true + errorDetail: + $ref: "#/components/schemas/ErrorDetail" + status: + type: string + progress: + type: string + description: >- + Progress is a pre-formatted presentation of progressDetail. + + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + nullable: true + progressDetail: + $ref: "#/components/schemas/ProgressDetail" + PushImageInfo: + type: object + properties: + error: + type: string + description: >- + errors encountered during the operation. + + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + nullable: true + errorDetail: + $ref: "#/components/schemas/ErrorDetail" + status: + type: string + progress: + type: string + description: >- + Progress is a pre-formatted presentation of progressDetail. + + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + nullable: true + progressDetail: + $ref: "#/components/schemas/ProgressDetail" + DeviceInfo: + type: object + description: | + DeviceInfo represents a device that can be used by a container. + properties: + Source: + type: string + example: cdi + description: | + The origin device driver. + ID: + type: string + example: vendor.com/gpu=0 + description: | + The unique identifier for the device within its source driver. + For CDI devices, this would be an FQDN like "vendor.com/gpu=0". + ErrorDetail: + type: object + properties: + code: + type: integer + message: + type: string + ProgressDetail: + type: object + properties: + current: + type: integer + total: + type: integer + ErrorResponse: + description: Represents an error. + type: object + required: + - message + properties: + message: + description: The error message. + type: string + nullable: false + example: + message: Something went wrong. + IDResponse: + description: Response to an API call that returns just an Id + type: object + x-go-name: IDResponse + required: + - Id + properties: + Id: + description: The id of the newly created object. + type: string + nullable: false + EndpointSettings: + description: Configuration for a network endpoint. + type: object + properties: + IPAMConfig: + $ref: "#/components/schemas/EndpointIPAMConfig" + Links: + nullable: true + type: array + items: + type: string + example: + - container_1 + - container_2 + MacAddress: + description: > + MAC address for the endpoint on this network. The network driver + might ignore this parameter. + type: string + example: 02:42:ac:11:00:04 + Aliases: + type: array + nullable: true + items: + type: string + example: + - server_x + - server_y + DriverOpts: + description: | + DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + nullable: true + GwPriority: + description: | + This property determines which endpoint will provide the default + gateway for a container. The endpoint with the highest priority will + be used. If multiple endpoints have the same priority, endpoints are + lexicographically sorted based on their network name, and the one + that sorts first is picked. + type: integer + format: int64 + example: + - 10 + NetworkID: + description: | + Unique ID of the network. + type: string + example: 08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a + EndpointID: + description: | + Unique ID for the service endpoint in a Sandbox. + type: string + example: b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b + Gateway: + description: | + Gateway address for this network. + type: string + example: 172.17.0.1 + IPAddress: + description: | + IPv4 address. + type: string + example: 172.17.0.4 + IPPrefixLen: + description: | + Mask length of the IPv4 address. + type: integer + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address. + type: string + example: 2001:db8:2::100 + GlobalIPv6Address: + description: | + Global IPv6 address. + type: string + example: 2001:db8::5689 + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + type: integer + format: int64 + example: 64 + DNSNames: + description: > + List of all DNS names an endpoint has on a specific network. This + + list is based on the container name, network aliases, container short + + ID, and hostname. + + + These DNS names are non-fully qualified but can contain several dots. + + You can get fully qualified DNS names by appending `.`. + + For instance, if container name is `my.ctr` and the network is named + + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + + `my.ctr.testnet`. + type: array + nullable: true + items: + type: string + example: + - foobar + - server_x + - server_y + - my.ctr + EndpointIPAMConfig: + description: | + EndpointIPAMConfig represents an endpoint's IPAM configuration. + type: object + nullable: true + properties: + IPv4Address: + type: string + nullable: true + example: 172.20.30.33 + IPv6Address: + type: string + nullable: true + example: 2001:db8:abcd::3033 + LinkLocalIPs: + type: array + items: + type: string + example: + - 169.254.34.68 + - fe80::3468 + PluginMount: + type: object + required: + - Name + - Description + - Settable + - Source + - Destination + - Type + - Options + properties: + Name: + type: string + example: some-mount + nullable: false + Description: + type: string + example: This is a mount that's used by the plugin. + nullable: false + Settable: + type: array + items: + type: string + Source: + type: string + example: /var/lib/docker/plugins/ + Destination: + type: string + example: /mnt/state + nullable: false + Type: + type: string + example: bind + nullable: false + Options: + type: array + items: + type: string + example: + - rbind + - rw + nullable: false + PluginDevice: + type: object + required: + - Name + - Description + - Settable + - Path + properties: + Name: + type: string + nullable: false + Description: + type: string + nullable: false + Settable: + type: array + items: + type: string + Path: + type: string + example: /dev/fuse + nullable: false + PluginEnv: + type: object + required: + - Name + - Description + - Settable + - Value + properties: + Name: + type: string + nullable: false + Description: + type: string + nullable: false + Settable: + type: array + items: + type: string + Value: + type: string + nullable: false + PluginInterfaceType: + type: object + required: + - Prefix + - Capability + - Version + properties: + Prefix: + type: string + nullable: false + Capability: + type: string + nullable: false + Version: + type: string + nullable: false + nullable: false + PluginPrivilege: + description: | + Describes a permission the user has to accept upon installing + the plugin. + type: object + x-go-name: PluginPrivilege + properties: + Name: + type: string + example: network + Description: + type: string + Value: + type: array + items: + type: string + example: + - host + Plugin: + description: A plugin for the Engine API + type: object + required: + - Settings + - Enabled + - Config + - Name + properties: + Id: + type: string + example: 5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078 + Name: + type: string + example: tiborvass/sample-volume-plugin + nullable: false + Enabled: + description: True if the plugin is running. False if the plugin is not running, + only installed. + type: boolean + example: true + nullable: false + Settings: + description: Settings that can be modified by users. + type: object + required: + - Args + - Devices + - Env + - Mounts + properties: + Mounts: + type: array + items: + $ref: "#/components/schemas/PluginMount" + Env: + type: array + items: + type: string + example: + - DEBUG=0 + Args: + type: array + items: + type: string + Devices: + type: array + items: + $ref: "#/components/schemas/PluginDevice" + nullable: false + PluginReference: + description: plugin remote reference used to push/pull the plugin + type: string + example: localhost:5000/tiborvass/sample-volume-plugin:latest + nullable: false + Config: + description: The config of a plugin. + type: object + required: + - Description + - Documentation + - Interface + - Entrypoint + - WorkDir + - Network + - Linux + - PidHost + - PropagatedMount + - IpcHost + - Mounts + - Env + - Args + properties: + DockerVersion: + description: >- + Docker Version used to create the plugin. + + + Depending on how the plugin was created, this field may be empty or omitted. + + + Deprecated: this field is no longer set, and will be removed in the next API version. + type: string + x-omitempty: true + nullable: false + Description: + type: string + example: A sample volume plugin for Docker + nullable: false + Documentation: + type: string + example: https://docs.docker.com/engine/extend/plugins/ + nullable: false + Interface: + description: The interface between Docker and the plugin + type: object + required: + - Types + - Socket + properties: + Types: + type: array + items: + $ref: "#/components/schemas/PluginInterfaceType" + example: + - docker.volumedriver/1.0 + Socket: + type: string + example: plugins.sock + nullable: false + ProtocolScheme: + type: string + example: some.protocol/v1.0 + description: Protocol to use for clients connecting to the plugin. + enum: + - "" + - moby.plugins.http/v1 + nullable: false + Entrypoint: + type: array + items: + type: string + example: + - /usr/bin/sample-volume-plugin + - /data + WorkDir: + type: string + example: /bin/ + nullable: false + User: + type: object + properties: + UID: + type: integer + format: uint32 + example: 1000 + GID: + type: integer + format: uint32 + example: 1000 + nullable: false + Network: + type: object + required: + - Type + properties: + Type: + type: string + example: host + nullable: false + nullable: false + Linux: + type: object + required: + - Capabilities + - AllowAllDevices + - Devices + properties: + Capabilities: + type: array + items: + type: string + example: + - CAP_SYS_ADMIN + - CAP_SYSLOG + AllowAllDevices: + type: boolean + example: false + nullable: false + Devices: + type: array + items: + $ref: "#/components/schemas/PluginDevice" + nullable: false + PropagatedMount: + type: string + example: /mnt/volumes + nullable: false + IpcHost: + type: boolean + example: false + nullable: false + PidHost: + type: boolean + example: false + nullable: false + Mounts: + type: array + items: + $ref: "#/components/schemas/PluginMount" + Env: + type: array + items: + $ref: "#/components/schemas/PluginEnv" + example: + - Name: DEBUG + Description: If set, prints debug messages + Settable: null + Value: "0" + Args: + type: object + required: + - Name + - Description + - Settable + - Value + properties: + Name: + type: string + example: args + nullable: false + Description: + type: string + example: command line arguments + nullable: false + Settable: + type: array + items: + type: string + Value: + type: array + items: + type: string + nullable: false + rootfs: + type: object + properties: + type: + type: string + example: layers + diff_ids: + type: array + items: + type: string + example: + - sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887 + - sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8 + nullable: false + ObjectVersion: + description: > + The version number of the object such as node, service, etc. This is + needed + + to avoid conflicting writes. The client must send the version number along + + with the modified specification when updating these objects. + + + This approach ensures safe concurrency and determinism in that the change + + on the object may not be applied if the version number has changed from the + + last read. In other words, if two update requests specify the same base + + version, only one of the requests can succeed. As a result, two separate + + update requests that happen at the same time will not unintentionally + + overwrite each other. + type: object + properties: + Index: + type: integer + format: uint64 + example: 373531 + NodeSpec: + type: object + properties: + Name: + description: Name for the node. + type: string + example: my-node + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + Role: + description: Role of the node. + type: string + enum: + - worker + - manager + example: manager + Availability: + description: Availability of the node. + type: string + enum: + - active + - pause + - drain + example: active + example: + Availability: active + Name: node-name + Role: manager + Labels: + foo: bar + Node: + type: object + properties: + ID: + type: string + example: 24ifsmvkjbyhk + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + description: > + Date and time at which the node was added to the swarm in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2016-08-18T10:44:24.496525531Z + UpdatedAt: + description: > + Date and time at which the node was last updated in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2017-08-09T07:09:37.632105588Z + Spec: + $ref: "#/components/schemas/NodeSpec" + Description: + $ref: "#/components/schemas/NodeDescription" + Status: + $ref: "#/components/schemas/NodeStatus" + ManagerStatus: + $ref: "#/components/schemas/ManagerStatus" + NodeDescription: + description: > + NodeDescription encapsulates the properties of the Node as reported by + the + + agent. + type: object + properties: + Hostname: + type: string + example: bf3067039e47 + Platform: + $ref: "#/components/schemas/Platform" + Resources: + $ref: "#/components/schemas/ResourceObject" + Engine: + $ref: "#/components/schemas/EngineDescription" + TLSInfo: + $ref: "#/components/schemas/TLSInfo" + Platform: + description: | + Platform represents the platform (Arch/OS). + type: object + properties: + Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). + type: string + example: x86_64 + OS: + description: > + OS represents the Operating System (for example, `linux` or + `windows`). + type: string + example: linux + EngineDescription: + description: EngineDescription provides information about an engine. + type: object + properties: + EngineVersion: + type: string + example: 17.06.0 + Labels: + type: object + additionalProperties: + type: string + example: + foo: bar + Plugins: + type: array + items: + type: object + properties: + Type: + type: string + Name: + type: string + example: + - Type: Log + Name: awslogs + - Type: Log + Name: fluentd + - Type: Log + Name: gcplogs + - Type: Log + Name: gelf + - Type: Log + Name: journald + - Type: Log + Name: json-file + - Type: Log + Name: splunk + - Type: Log + Name: syslog + - Type: Network + Name: bridge + - Type: Network + Name: host + - Type: Network + Name: ipvlan + - Type: Network + Name: macvlan + - Type: Network + Name: "null" + - Type: Network + Name: overlay + - Type: Volume + Name: local + - Type: Volume + Name: localhost:5000/vieux/sshfs:latest + - Type: Volume + Name: vieux/sshfs:latest + TLSInfo: + description: > + Information about the issuer of leaf TLS certificates and the trusted + root + + CA certificate. + type: object + properties: + TrustRoot: + description: | + The root CA certificate(s) that are used to validate leaf TLS + certificates. + type: string + CertIssuerSubject: + description: The base64-url-safe-encoded raw subject bytes of the issuer. + type: string + CertIssuerPublicKey: + description: | + The base64-url-safe-encoded raw public key bytes of the issuer. + type: string + example: + TrustRoot: | + -----BEGIN CERTIFICATE----- + MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw + EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 + MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf + 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB + Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO + PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz + pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H + -----END CERTIFICATE----- + CertIssuerSubject: MBMxETAPBgNVBAMTCHN3YXJtLWNh + CertIssuerPublicKey: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A== + NodeStatus: + description: | + NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + type: object + properties: + State: + $ref: "#/components/schemas/NodeState" + Message: + type: string + example: "" + Addr: + description: IP address of the node. + type: string + example: 172.17.0.2 + NodeState: + description: NodeState represents the state of a node. + type: string + enum: + - unknown + - down + - ready + - disconnected + example: ready + ManagerStatus: + description: > + ManagerStatus represents the status of a manager. + + + It provides the current status of a node's manager component, if the node + + is a manager. + type: object + properties: + Leader: + type: boolean + default: false + example: true + Reachability: + $ref: "#/components/schemas/Reachability" + Addr: + description: | + The IP address and port at which the manager is reachable. + type: string + example: 10.0.0.46:2377 + nullable: true + Reachability: + description: Reachability represents the reachability of a node. + type: string + enum: + - unknown + - unreachable + - reachable + example: reachable + SwarmSpec: + description: User modifiable swarm configuration. + type: object + properties: + Name: + description: Name of the swarm. + type: string + example: default + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.corp.type: production + com.example.corp.department: engineering + Orchestration: + description: Orchestration configuration. + type: object + properties: + TaskHistoryRetentionLimit: + description: | + The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + type: integer + format: int64 + example: 10 + nullable: true + Raft: + description: Raft configuration. + type: object + properties: + SnapshotInterval: + description: The number of log entries between snapshots. + type: integer + format: uint64 + example: 10000 + KeepOldSnapshots: + description: | + The number of snapshots to keep beyond the current snapshot. + type: integer + format: uint64 + LogEntriesForSlowFollowers: + description: > + The number of log entries to keep around to sync up slow + followers + + after a snapshot is created. + type: integer + format: uint64 + example: 500 + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: integer + example: 3 + HeartbeatTick: + description: > + The number of ticks between heartbeats. Every HeartbeatTick + ticks, + + the leader will send a heartbeat to the followers. + + + A tick currently defaults to one second, so these translate + + directly to seconds currently, but this is NOT guaranteed. + type: integer + example: 1 + Dispatcher: + description: Dispatcher configuration. + type: object + properties: + HeartbeatPeriod: + description: | + The delay for an agent to send a heartbeat to the dispatcher. + type: integer + format: int64 + example: 5000000000 + nullable: true + CAConfig: + description: CA configuration. + type: object + properties: + NodeCertExpiry: + description: The duration node certificates are issued for. + type: integer + format: int64 + example: 7776000000000000 + ExternalCAs: + description: | + Configuration for forwarding signing requests to an external + certificate authority. + type: array + items: + type: object + properties: + Protocol: + description: | + Protocol for communication with the external CA (currently + only `cfssl` is supported). + type: string + enum: + - cfssl + default: cfssl + URL: + description: | + URL where certificate signing requests should be sent. + type: string + Options: + description: | + An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + type: object + additionalProperties: + type: string + CACert: + description: > + The root CA certificate (in PEM format) this external CA + uses + + to issue TLS certificates (assumed to be to the current swarm + + root CA certificate if not provided). + type: string + SigningCACert: + description: | + The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + type: string + SigningCAKey: + description: > + The desired signing CA key for all swarm node TLS leaf + certificates, + + in PEM format. + type: string + ForceRotate: + description: | + An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + format: uint64 + type: integer + nullable: true + EncryptionConfig: + description: Parameters related to encryption-at-rest. + type: object + properties: + AutoLockManagers: + description: | + If set, generate a key and use it to lock data stored on the + managers. + type: boolean + example: false + TaskDefaults: + description: Defaults for creating tasks in this cluster. + type: object + properties: + LogDriver: + description: > + The log driver to use for tasks created in the orchestrator if + + unspecified by a service. + + + Updating this value only affects new tasks. Existing tasks continue + + to use their previously configured log driver until recreated. + type: object + properties: + Name: + description: | + The log driver to use as a default for new tasks. + type: string + example: json-file + Options: + description: > + Driver-specific options for the selected log driver, + specified + + as key/value pairs. + type: object + additionalProperties: + type: string + example: + max-file: "10" + max-size: 100m + ClusterInfo: + description: | + ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + type: object + properties: + ID: + description: The ID of the swarm. + type: string + example: abajmipo7b4xz5ip2nrla6b11 + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + description: > + Date and time at which the swarm was initialised in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2016-08-18T10:44:24.496525531Z + UpdatedAt: + description: > + Date and time at which the swarm was last updated in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2017-08-09T07:09:37.632105588Z + Spec: + $ref: "#/components/schemas/SwarmSpec" + TLSInfo: + $ref: "#/components/schemas/TLSInfo" + RootRotationInProgress: + description: > + Whether there is currently a root CA rotation in progress for the + swarm + type: boolean + example: false + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + type: integer + format: uint32 + default: 4789 + example: 4789 + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global scope + networks. + type: array + items: + type: string + format: CIDR + example: + - 10.10.0.0/16 + - 20.20.0.0/16 + SubnetSize: + description: > + SubnetSize specifies the subnet size of the networks created from + the + + default subnet pool. + type: integer + format: uint32 + maximum: 29 + default: 24 + example: 24 + nullable: true + JoinTokens: + description: > + JoinTokens contains the tokens workers and managers need to join the + swarm. + type: object + properties: + Worker: + description: | + The token workers can use to join the swarm. + type: string + example: SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx + Manager: + description: | + The token managers can use to join the swarm. + type: string + example: SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2 + Swarm: + type: object + allOf: + - $ref: "#/components/schemas/ClusterInfo" + - type: object + properties: + JoinTokens: + $ref: "#/components/schemas/JoinTokens" + TaskSpec: + description: User modifiable task configuration. + type: object + properties: + PluginSpec: + type: object + description: | + Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Name: + description: The name or 'alias' to use for the plugin. + type: string + Remote: + description: The plugin image reference to use. + type: string + Disabled: + description: Disable the plugin once scheduled. + type: boolean + PluginPrivilege: + type: array + items: + $ref: "#/components/schemas/PluginPrivilege" + ContainerSpec: + type: object + description: | + Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Image: + description: The image name to use for the container + type: string + Labels: + description: User-defined key/value data. + type: object + additionalProperties: + type: string + Command: + description: The command to be run in the image. + type: array + items: + type: string + Args: + description: Arguments to the command. + type: array + items: + type: string + Hostname: + description: | + The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + type: string + Env: + description: | + A list of environment variables in the form `VAR=value`. + type: array + items: + type: string + Dir: + description: The working directory for commands to run in. + type: string + User: + description: The user inside the container. + type: string + Groups: + type: array + description: > + A list of additional groups that the container process will run + as. + items: + type: string + Privileges: + type: object + description: Security options for the container + properties: + CredentialSpec: + type: object + description: CredentialSpec for managed service account (Windows only) + properties: + Config: + type: string + example: 0bt9dmxjvjiqermk6xrop3ekq + description: > + Load credential spec from a Swarm Config with the given + ID. + + The specified config must also be present in the Configs + + field with the Runtime property set. + + +


+ + + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + + > and `CredentialSpec.Config` are mutually exclusive. + File: + type: string + example: spec.json + description: > + Load credential spec from this file. The file is read by + + the daemon, and must be present in the `CredentialSpecs` + + subdirectory in the docker data directory, which defaults + + to `C:\ProgramData\Docker\` on Windows. + + + For example, specifying `spec.json` loads + + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + + > and `CredentialSpec.Config` are mutually exclusive. + Registry: + type: string + description: > + Load credential spec from this value in the Windows + + registry. The specified registry value must be located in: + + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + + +


+ + + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + + > and `CredentialSpec.Config` are mutually exclusive. + SELinuxContext: + type: object + description: SELinux labels of the container + properties: + Disable: + type: boolean + description: Disable SELinux + User: + type: string + description: SELinux user label + Role: + type: string + description: SELinux role label + Type: + type: string + description: SELinux type label + Level: + type: string + description: SELinux level label + Seccomp: + type: object + description: Options for configuring seccomp on the container + properties: + Mode: + type: string + enum: + - default + - unconfined + - custom + Profile: + description: The custom seccomp profile as a json object + type: string + AppArmor: + type: object + description: Options for configuring AppArmor on the container + properties: + Mode: + type: string + enum: + - default + - disabled + NoNewPrivileges: + type: boolean + description: Configuration of the no_new_privs bit in the container + TTY: + description: Whether a pseudo-TTY should be allocated. + type: boolean + OpenStdin: + description: Open `stdin` + type: boolean + ReadOnly: + description: Mount the container's root filesystem as read only. + type: boolean + Mounts: + description: > + Specification for mounts to be added to containers created as + part + + of the service. + type: array + items: + $ref: "#/components/schemas/Mount" + StopSignal: + description: Signal to stop the container. + type: string + StopGracePeriod: + description: | + Amount of time to wait for the container to terminate before + forcefully killing it. + type: integer + format: int64 + HealthCheck: + $ref: "#/components/schemas/HealthConfig" + Hosts: + type: array + description: | + A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + items: + type: string + DNSConfig: + description: > + Specification for DNS related configurations in resolver + configuration + + file (`resolv.conf`). + type: object + properties: + Nameservers: + description: The IP addresses of the name servers. + type: array + items: + type: string + Search: + description: A search list for host-name lookup. + type: array + items: + type: string + Options: + description: | + A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + type: array + items: + type: string + Secrets: + description: | + Secrets contains references to zero or more secrets that will be + exposed to the service. + type: array + items: + type: object + properties: + File: + description: > + File represents a specific target that is backed by a file. + type: object + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: string + UID: + description: UID represents the file UID. + type: string + GID: + description: GID represents the file GID. + type: string + Mode: + description: Mode represents the FileMode of the file. + type: integer + format: uint32 + SecretID: + description: > + SecretID represents the ID of the specific secret that + we're + + referencing. + type: string + SecretName: + description: | + SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + type: string + OomScoreAdj: + type: integer + format: int64 + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 0 + Configs: + description: | + Configs contains references to zero or more configs that will be + exposed to the service. + type: array + items: + type: object + properties: + File: + description: > + File represents a specific target that is backed by a + file. + + +


+ + + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + type: object + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: string + UID: + description: UID represents the file UID. + type: string + GID: + description: GID represents the file GID. + type: string + Mode: + description: Mode represents the FileMode of the file. + type: integer + format: uint32 + Runtime: + description: > + Runtime represents a target that is not mounted into the + + container but is used by the task + + +


+ + + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + + > exclusive + type: object + ConfigID: + description: > + ConfigID represents the ID of the specific config that + we're + + referencing. + type: string + ConfigName: + description: | + ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + type: string + Isolation: + type: string + description: | + Isolation technology of the containers running the service. + (Windows only) + enum: + - default + - process + - hyperv + - "" + Init: + 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. + type: boolean + nullable: true + Sysctls: + description: > + Set kernel namedspaced parameters (sysctls) in the container. + + The Sysctls option on services accepts the same sysctls as the + + are supported on containers. Note that while the same sysctls are + + supported, no guarantees or checks are made about their + + suitability for a clustered environment, and it's up to the user + + to determine whether a given sysctl will work properly in a + + Service. + type: object + additionalProperties: + type: string + CapabilityAdd: + type: array + description: | + A list of kernel capabilities to add to the default set + for the container. + items: + type: string + example: + - CAP_NET_RAW + - CAP_SYS_ADMIN + - CAP_SYS_CHROOT + - CAP_SYSLOG + CapabilityDrop: + type: array + description: | + A list of kernel capabilities to drop from the default set + for the container. + items: + type: string + example: + - CAP_NET_RAW + Ulimits: + description: > + A list of resource limits to set in the container. For example: + `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: array + items: + type: object + properties: + Name: + description: Name of ulimit + type: string + Soft: + description: Soft limit + type: integer + Hard: + description: Hard limit + type: integer + NetworkAttachmentSpec: + description: > + Read-only spec type for non-swarm containers attached to swarm + overlay + + networks. + + +


+ + + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + + > mutually exclusive. PluginSpec is only used when the Runtime field + + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + + > field is set to `attachment`. + type: object + properties: + ContainerID: + description: ID of the container represented by this task + type: string + Resources: + description: > + Resource requirements which apply to each individual container + created + + as part of the service. + type: object + properties: + Limits: + $ref: "#/components/schemas/Limit" + Reservations: + $ref: "#/components/schemas/ResourceObject" + RestartPolicy: + description: | + Specification for the restart policy which applies to containers + created as part of this service. + type: object + properties: + Condition: + description: Condition for restart. + type: string + enum: + - none + - on-failure + - any + Delay: + description: Delay between restart attempts. + type: integer + format: int64 + MaxAttempts: + description: | + Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + type: integer + format: int64 + default: 0 + Window: + description: | + Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + type: integer + format: int64 + default: 0 + Placement: + type: object + properties: + Constraints: + description: > + An array of constraint expressions to limit the set of nodes + where + + a task can be scheduled. Constraint expressions can either use a + + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + + nodes that satisfy every expression (AND match). Constraints can + + match node or Docker Engine labels as follows: + + + node attribute | matches | example + + ---------------------|--------------------------------|----------------------------------------------- + + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + + `node.hostname` | Node hostname | `node.hostname!=node-2` + + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + + `node.platform.os` | Node operating system | `node.platform.os==windows` + + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + + `node.labels` | User-defined node labels | `node.labels.security==high` + + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + + `engine.labels` apply to Docker Engine labels like operating system, + + drivers, etc. Swarm administrators add `node.labels` for operational + + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + type: array + items: + type: string + example: + - node.hostname!=node3.corp.example.com + - node.role!=manager + - node.labels.type==production + - node.platform.os==linux + - node.platform.arch==x86_64 + Preferences: + description: | + Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + type: array + items: + type: object + properties: + Spread: + type: object + properties: + SpreadDescriptor: + description: | + label descriptor, such as `engine.labels.az`. + type: string + example: + - Spread: + SpreadDescriptor: node.labels.datacenter + - Spread: + SpreadDescriptor: node.labels.rack + MaxReplicas: + description: > + Maximum number of replicas for per node (default value is 0, + which + + is unlimited) + type: integer + format: int64 + default: 0 + Platforms: + description: > + Platforms stores all the platforms that the service's image can + + run on. This field is used in the platform filter for scheduling. + + If empty, then the platform filter is off, meaning there are no + + scheduling restrictions. + type: array + items: + $ref: "#/components/schemas/Platform" + ForceUpdate: + description: > + A counter that triggers an update even if no relevant parameters + have + + been changed. + type: integer + format: uint64 + Runtime: + description: | + Runtime is the type of runtime specified for the task executor. + type: string + Networks: + description: Specifies which networks the service should attach to. + type: array + items: + $ref: "#/components/schemas/NetworkAttachmentConfig" + nullable: true + LogDriver: + description: | + Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + type: object + properties: + Name: + type: string + Options: + type: object + additionalProperties: + type: string + TaskState: + type: string + enum: + - new + - allocated + - pending + - assigned + - accepted + - preparing + - ready + - starting + - running + - complete + - shutdown + - failed + - rejected + - remove + - orphaned + ContainerStatus: + type: object + description: represents the status of a container. + properties: + ContainerID: + type: string + PID: + type: integer + ExitCode: + type: integer + PortStatus: + type: object + description: represents the port status of a task's host ports whose service has + published host ports + properties: + Ports: + type: array + items: + $ref: "#/components/schemas/EndpointPortConfig" + TaskStatus: + type: object + description: represents the status of a task. + properties: + Timestamp: + type: string + format: dateTime + State: + $ref: "#/components/schemas/TaskState" + Message: + type: string + Err: + type: string + ContainerStatus: + $ref: "#/components/schemas/ContainerStatus" + PortStatus: + $ref: "#/components/schemas/PortStatus" + Task: + type: object + properties: + ID: + description: The ID of the task. + type: string + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + type: string + format: dateTime + UpdatedAt: + type: string + format: dateTime + Name: + description: Name of the task. + type: string + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + Spec: + $ref: "#/components/schemas/TaskSpec" + ServiceID: + description: The ID of the service this task is part of. + type: string + Slot: + type: integer + NodeID: + description: The ID of the node that this task is on. + type: string + AssignedGenericResources: + $ref: "#/components/schemas/GenericResources" + Status: + $ref: "#/components/schemas/TaskStatus" + DesiredState: + $ref: "#/components/schemas/TaskState" + JobIteration: + $ref: "#/components/schemas/ObjectVersion" + example: + ID: 0kzzo1i0y4jz6027t0k7aezc7 + Version: + Index: 71 + CreatedAt: 2016-06-07T21:07:31.171892745Z + UpdatedAt: 2016-06-07T21:07:31.376370513Z + Spec: + ContainerSpec: + Image: redis + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: any + MaxAttempts: 0 + Placement: {} + ServiceID: 9mnpnzenvg8p8tdbtq4wvbkcz + Slot: 1 + NodeID: 60gvrl6tm78dmak4yl7srz94v + Status: + Timestamp: 2016-06-07T21:07:31.290032978Z + State: running + Message: started + ContainerStatus: + ContainerID: e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035 + PID: 677 + DesiredState: running + NetworksAttachments: + - Network: + ID: 4qvuz4ko70xaltuqbt8956gd1 + Version: + Index: 18 + CreatedAt: 2016-06-07T20:31:11.912919752Z + UpdatedAt: 2016-06-07T21:07:29.955277358Z + Spec: + Name: ingress + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + DriverState: + Name: overlay + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: default + Configs: + - Subnet: 10.255.0.0/16 + Gateway: 10.255.0.1 + Addresses: + - 10.255.0.10/16 + AssignedGenericResources: + - DiscreteResourceSpec: + Kind: SSD + Value: 3 + - NamedResourceSpec: + Kind: GPU + Value: UUID1 + - NamedResourceSpec: + Kind: GPU + Value: UUID2 + ServiceSpec: + description: User modifiable configuration for a service. + type: object + properties: + Name: + description: Name of the service. + type: string + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + TaskTemplate: + $ref: "#/components/schemas/TaskSpec" + Mode: + description: Scheduling mode for the service. + type: object + properties: + Replicated: + type: object + properties: + Replicas: + type: integer + format: int64 + Global: + type: object + ReplicatedJob: + description: > + The mode used for services with a finite number of tasks that + run + + to a completed state. + type: object + properties: + MaxConcurrent: + description: | + The maximum number of replicas to run simultaneously. + type: integer + format: int64 + default: 1 + TotalCompletions: + description: > + The total number of replicas desired to reach the Completed + + state. If unset, will default to the value of `MaxConcurrent` + type: integer + format: int64 + GlobalJob: + description: > + The mode used for services which run a task to the completed + state + + on each valid node. + type: object + UpdateConfig: + description: Specification for the update strategy of the service. + type: object + properties: + Parallelism: + description: | + Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + type: integer + format: int64 + Delay: + description: Amount of time between updates, in nanoseconds. + type: integer + format: int64 + FailureAction: + description: | + Action to take if an updated task fails to run, or stops running + during the update. + type: string + enum: + - continue + - pause + - rollback + Monitor: + description: | + Amount of time to monitor each updated task for failures, in + nanoseconds. + type: integer + format: int64 + MaxFailureRatio: + description: | + The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: number + default: 0 + Order: + description: | + The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + type: string + enum: + - stop-first + - start-first + RollbackConfig: + description: Specification for the rollback strategy of the service. + type: object + properties: + Parallelism: + description: > + Maximum number of tasks to be rolled back in one iteration (0 + means + + unlimited parallelism). + type: integer + format: int64 + Delay: + description: | + Amount of time between rollback iterations, in nanoseconds. + type: integer + format: int64 + FailureAction: + description: | + Action to take if an rolled back task fails to run, or stops + running during the rollback. + type: string + enum: + - continue + - pause + Monitor: + description: | + Amount of time to monitor each rolled back task for failures, in + nanoseconds. + type: integer + format: int64 + MaxFailureRatio: + description: | + The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: number + default: 0 + Order: + description: > + The order of operations when rolling back a task. Either the old + + task is shut down before the new task is started, or the new task + + is started before the old task is shut down. + type: string + enum: + - stop-first + - start-first + Networks: + description: > + Specifies which networks the service should attach to. + + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + type: array + items: + $ref: "#/components/schemas/NetworkAttachmentConfig" + nullable: true + EndpointSpec: + $ref: "#/components/schemas/EndpointSpec" + EndpointPortConfig: + type: object + properties: + Name: + type: string + Protocol: + type: string + enum: + - tcp + - udp + - sctp + TargetPort: + description: The port inside the container. + type: integer + PublishedPort: + description: The port on the swarm hosts. + type: integer + PublishMode: + description: | + The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + type: string + enum: + - ingress + - host + default: ingress + example: ingress + EndpointSpec: + description: Properties that can be configured to access and load balance a service. + type: object + properties: + Mode: + description: > + The mode of resolution to use for internal load balancing between + tasks. + type: string + enum: + - vip + - dnsrr + default: vip + Ports: + description: > + List of exposed ports that this service is accessible on from the + + outside. Ports can only be provided if `vip` resolution mode is used. + type: array + items: + $ref: "#/components/schemas/EndpointPortConfig" + Service: + type: object + properties: + ID: + type: string + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + type: string + format: dateTime + UpdatedAt: + type: string + format: dateTime + Spec: + $ref: "#/components/schemas/ServiceSpec" + Endpoint: + type: object + properties: + Spec: + $ref: "#/components/schemas/EndpointSpec" + Ports: + type: array + items: + $ref: "#/components/schemas/EndpointPortConfig" + VirtualIPs: + type: array + items: + type: object + properties: + NetworkID: + type: string + Addr: + type: string + UpdateStatus: + description: The status of a service update. + type: object + properties: + State: + type: string + enum: + - updating + - paused + - completed + StartedAt: + type: string + format: dateTime + CompletedAt: + type: string + format: dateTime + Message: + type: string + ServiceStatus: + description: | + The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + type: object + properties: + RunningTasks: + description: > + The number of tasks for the service currently in the Running + state. + type: integer + format: uint64 + example: 7 + DesiredTasks: + description: | + The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + type: integer + format: uint64 + example: 10 + CompletedTasks: + description: > + The number of tasks for a job that are in the Completed state. + + This field must be cross-referenced with the service type, as the + + value of 0 may mean the service is not in a job mode, or it may + + mean the job-mode service has no tasks yet Completed. + type: integer + format: uint64 + JobStatus: + description: | + The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + type: object + properties: + JobIteration: + $ref: "#/components/schemas/ObjectVersion" + LastExecution: + description: | + The last time, as observed by the server, that this job was + started. + type: string + format: dateTime + example: + ID: 9mnpnzenvg8p8tdbtq4wvbkcz + Version: + Index: 19 + CreatedAt: 2016-06-07T21:05:51.880065305Z + UpdatedAt: 2016-06-07T21:07:29.962229872Z + Spec: + Name: hopeful_cori + TaskTemplate: + ContainerSpec: + Image: redis + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: any + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: pause + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: vip + Ports: + - Protocol: tcp + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: vip + Ports: + - Protocol: tcp + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - Protocol: tcp + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - NetworkID: 4qvuz4ko70xaltuqbt8956gd1 + Addr: 10.255.0.2/16 + - NetworkID: 4qvuz4ko70xaltuqbt8956gd1 + Addr: 10.255.0.3/16 + ImageDeleteResponseItem: + type: object + x-go-name: DeleteResponse + properties: + Untagged: + description: The image ID of an image that was untagged + type: string + Deleted: + description: The image ID of an image that was deleted + type: string + ServiceCreateResponse: + type: object + description: | + contains the information returned to a client on the + creation of a new service. + properties: + ID: + description: The ID of the created service. + type: string + example: ak7w3gjqoa3kuz8xcpnyy0pvl + nullable: false + Warnings: + description: > + Optional warning message. + + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + type: array + items: + type: string + example: + - "unable to pin image doesnotexist:latest to digest: image + library/doesnotexist:latest not found" + nullable: true + ServiceUpdateResponse: + type: object + properties: + Warnings: + description: Optional warning messages + type: array + items: + type: string + example: + Warnings: + - "unable to pin image doesnotexist:latest to digest: image + library/doesnotexist:latest not found" + ContainerInspectResponse: + type: object + title: ContainerInspectResponse + x-go-name: InspectResponse + properties: + Id: + description: The ID of this container as a 128-bit (64-character) hexadecimal + string (32 bytes). + type: string + x-go-name: ID + minLength: 64 + maxLength: 64 + pattern: ^[0-9a-fA-F]{64}$ + example: aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf + Created: + description: >- + Date and time at which the container was created, formatted in + + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: string + format: dateTime + example: 2025-02-17T17:43:39.64001363Z + nullable: true + Path: + description: The path to the command being run + type: string + example: /bin/sh + Args: + description: The arguments to the command being run + type: array + items: + type: string + example: + - -c + - exit 9 + State: + $ref: "#/components/schemas/ContainerState" + Image: + description: The ID (digest) of the image that this container was created from. + type: string + example: sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 + ResolvConfPath: + description: >- + Location of the `/etc/resolv.conf` generated for the container on + the + + host. + + + This file is managed through the docker daemon, and should not be + + accessed or modified by other tools. + type: string + example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/resolv.conf + HostnamePath: + description: |- + Location of the `/etc/hostname` generated for the container on the + host. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: string + example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hostname + HostsPath: + description: |- + Location of the `/etc/hosts` generated for the container on the + host. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: string + example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hosts + LogPath: + description: >- + Location of the file used to buffer the container's logs. Depending + on + + the logging-driver used for the container, this field may be omitted. + + + This file is managed through the docker daemon, and should not be + + accessed or modified by other tools. + type: string + example: /var/lib/docker/containers/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59-json.log + nullable: true + Name: + description: >- + The name associated with this container. + + + For historic reasons, the name may be prefixed with a forward-slash (`/`). + type: string + example: /funny_chatelet + RestartCount: + description: |- + Number of times the container was restarted since it was created, + or since daemon was started. + type: integer + example: 0 + Driver: + description: |- + The storage-driver used for the container's filesystem (graph-driver + or snapshotter). + type: string + example: overlayfs + Platform: + description: >- + The platform (operating system) for which the container was created. + + + This field was introduced for the experimental "LCOW" (Linux Containers + + On Windows) features, which has been removed. In most cases, this field + + is equal to the host's operating system (`linux` or `windows`). + type: string + example: linux + ImageManifestDescriptor: + $ref: "#/components/schemas/OCIDescriptor" + MountLabel: + description: SELinux mount label set for the container. + type: string + example: "" + ProcessLabel: + description: SELinux process label set for the container. + type: string + example: "" + AppArmorProfile: + description: The AppArmor profile set for the container. + type: string + example: "" + ExecIDs: + description: IDs of exec instances that are running in the container. + type: array + items: + type: string + example: + - b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca + - 3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4 + nullable: true + HostConfig: + $ref: "#/components/schemas/HostConfig" + GraphDriver: + $ref: "#/components/schemas/DriverData" + SizeRw: + description: >- + The size of files that have been created or changed by this + container. + + + This field is omitted by default, and only set when size is requested + + in the API request. + type: integer + format: int64 + example: "122880" + nullable: true + SizeRootFs: + description: >- + The total size of all files in the read-only layers from the image + + that the container uses. These layers can be shared between containers. + + + This field is omitted by default, and only set when size is requested + + in the API request. + type: integer + format: int64 + example: "1653948416" + nullable: true + Mounts: + description: List of mounts used by the container. + type: array + items: + $ref: "#/components/schemas/MountPoint" + Config: + $ref: "#/components/schemas/ContainerConfig" + NetworkSettings: + $ref: "#/components/schemas/NetworkSettings" + ContainerSummary: + type: object + properties: + Id: + description: The ID of this container as a 128-bit (64-character) hexadecimal + string (32 bytes). + type: string + x-go-name: ID + minLength: 64 + maxLength: 64 + pattern: ^[0-9a-fA-F]{64}$ + example: aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf + Names: + description: >- + The names associated with this container. Most containers have a + single + + name, but when using legacy "links", the container can have multiple + + names. + + + For historic reasons, names are prefixed with a forward-slash (`/`). + type: array + items: + type: string + example: + - /funny_chatelet + Image: + description: >- + The name or ID of the image used to create the container. + + + This field shows the image reference as was specified when creating the container, + + which can be in its canonical form (e.g., `docker.io/library/ubuntu:latest` + + or `docker.io/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`), + + short form (e.g., `ubuntu:latest`)), or the ID(-prefix) of the image (e.g., `72297848456d`). + + + The content of this field can be updated at runtime if the image used to + + create the container is untagged, in which case the field is updated to + + contain the the image ID (digest) it was resolved to in its canonical, + + non-truncated form (e.g., `sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`). + type: string + example: docker.io/library/ubuntu:latest + ImageID: + description: The ID (digest) of the image that this container was created from. + type: string + example: sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 + ImageManifestDescriptor: + $ref: "#/components/schemas/OCIDescriptor" + Command: + description: Command to run when starting the container + type: string + example: /bin/bash + Created: + description: |- + Date and time at which the container was created as a Unix timestamp + (number of seconds since EPOCH). + type: integer + format: int64 + example: "1739811096" + Ports: + description: Port-mappings for the container. + type: array + items: + $ref: "#/components/schemas/Port" + SizeRw: + description: >- + The size of files that have been created or changed by this + container. + + + This field is omitted by default, and only set when size is requested + + in the API request. + type: integer + format: int64 + example: "122880" + nullable: true + SizeRootFs: + description: >- + The total size of all files in the read-only layers from the image + + that the container uses. These layers can be shared between containers. + + + This field is omitted by default, and only set when size is requested + + in the API request. + type: integer + format: int64 + example: "1653948416" + nullable: true + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.vendor: Acme + com.example.license: GPL + com.example.version: "1.0" + State: + description: | + The state of this container. + type: string + enum: + - created + - running + - paused + - restarting + - exited + - removing + - dead + example: running + Status: + description: Additional human-readable status of this container (e.g. `Exit 0`) + type: string + example: Up 4 days + HostConfig: + type: object + description: |- + Summary of host-specific runtime information of the container. This + is a reduced set of information in the container's "HostConfig" as + available in the container "inspect" response. + properties: + NetworkMode: + description: >- + Networking mode (`host`, `none`, `container:`) or name of + the + + primary network the container is using. + + + This field is primarily for backward compatibility. The container + + can be connected to multiple networks for which information can be + + found in the `NetworkSettings.Networks` field, which enumerates + + settings per network. + type: string + example: mynetwork + Annotations: + description: Arbitrary key-value metadata attached to the container. + type: object + additionalProperties: + type: string + example: + io.kubernetes.docker.type: container + io.kubernetes.sandbox.id: 3befe639bed0fd6afdd65fd1fa84506756f59360ec4adc270b0fdac9be22b4d3 + nullable: true + NetworkSettings: + description: Summary of the container's network settings + type: object + properties: + Networks: + type: object + description: |- + Summary of network-settings for each network the container is + attached to. + additionalProperties: + $ref: "#/components/schemas/EndpointSettings" + Mounts: + type: array + description: List of mounts used by the container. + items: + $ref: "#/components/schemas/MountPoint" + Driver: + description: Driver represents a driver (network, logging, secrets). + type: object + required: + - Name + properties: + Name: + description: Name of the driver. + type: string + example: some-driver + nullable: false + Options: + description: Key/value map of driver-specific options. + type: object + additionalProperties: + type: string + example: + OptionA: value for driver-specific option A + OptionB: value for driver-specific option B + nullable: false + SecretSpec: + type: object + properties: + Name: + description: User-defined name of the secret. + type: string + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-value + com.example.some-other-label: some-other-value + Data: + description: > + Data is the data to store as a secret, formatted as a + Base64-url-safe-encoded + + ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + + It must be empty if the Driver field is set, in which case the data is + + loaded from an external secret store. The maximum allowed size is 500KB, + + as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). + + + This field is only used to _create_ a secret, and is not returned by + + other endpoints. + type: string + example: "" + Driver: + $ref: "#/components/schemas/Driver" + Templating: + $ref: "#/components/schemas/Driver" + Secret: + type: object + properties: + ID: + type: string + example: blt1owaxmitz71s9v5zh81zun + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + type: string + format: dateTime + example: 2017-07-20T13:55:28.678958722Z + UpdatedAt: + type: string + format: dateTime + example: 2017-07-20T13:55:28.678958722Z + Spec: + $ref: "#/components/schemas/SecretSpec" + ConfigSpec: + type: object + properties: + Name: + description: User-defined name of the config. + type: string + Labels: + description: User-defined key/value metadata. + type: object + additionalProperties: + type: string + Data: + description: > + Data is the data to store as a config, formatted as a + Base64-url-safe-encoded + + ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + + The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). + type: string + Templating: + $ref: "#/components/schemas/Driver" + Config: + type: object + properties: + ID: + type: string + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + type: string + format: dateTime + UpdatedAt: + type: string + format: dateTime + Spec: + $ref: "#/components/schemas/ConfigSpec" + ContainerState: + description: > + ContainerState stores container's running state. It's part of + ContainerJSONBase + + and will be returned by the "inspect" command. + type: object + properties: + Status: + description: > + String representation of the container state. Can be one of + "created", + + "running", "paused", "restarting", "removing", "exited", or "dead". + type: string + enum: + - created + - running + - paused + - restarting + - removing + - exited + - dead + example: running + Running: + description: > + Whether this container is running. + + + Note that a running container can be _paused_. The `Running` and `Paused` + + booleans are not mutually exclusive: + + + When pausing a container (on Linux), the freezer cgroup is used to suspend + + all processes in the container. Freezing the process requires the process to + + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + + Use the `Status` field instead to determine if a container's state is "running". + type: boolean + example: true + Paused: + description: Whether this container is paused. + type: boolean + example: false + Restarting: + description: Whether this container is restarting. + type: boolean + example: false + OOMKilled: + description: > + Whether a process within this container has been killed because it + ran + + out of memory since the container was last started. + type: boolean + example: false + Dead: + type: boolean + example: false + Pid: + description: The process ID of this container + type: integer + example: 1234 + ExitCode: + description: The last exit code of this container + type: integer + example: 0 + Error: + type: string + StartedAt: + description: The time when this container was last started. + type: string + example: 2020-01-06T09:06:59.461876391Z + FinishedAt: + description: The time when this container last exited. + type: string + example: 2020-01-06T09:07:59.461876391Z + Health: + $ref: "#/components/schemas/Health" + nullable: true + ContainerCreateResponse: + description: OK response to ContainerCreate operation + type: object + title: ContainerCreateResponse + x-go-name: CreateResponse + required: + - Id + - Warnings + properties: + Id: + description: The ID of the created container + type: string + example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743 + nullable: false + Warnings: + description: Warnings encountered when creating the container + type: array + items: + type: string + example: [] + nullable: false + ContainerUpdateResponse: + type: object + title: ContainerUpdateResponse + x-go-name: UpdateResponse + description: Response for a successful container-update. + properties: + Warnings: + type: array + description: Warnings encountered when updating the container. + items: + type: string + example: + - Published ports are discarded when using host network mode + ContainerStatsResponse: + description: | + Statistics sample for a container. + type: object + x-go-name: StatsResponse + title: ContainerStatsResponse + properties: + name: + description: Name of the container + type: string + example: boring_wozniak + nullable: true + id: + description: ID of the container + type: string + example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743 + nullable: true + read: + description: > + Date and time at which this sample was collected. + + The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + + with nano-seconds. + type: string + format: date-time + example: 2025-01-16T13:55:22.165243637Z + preread: + description: > + Date and time at which this first sample was collected. This field + + is not propagated if the "one-shot" option is set. If the "one-shot" + + option is set, this field may be omitted, empty, or set to a default + + date (`0001-01-01T00:00:00Z`). + + + The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + + with nano-seconds. + type: string + format: date-time + example: 2025-01-16T13:55:21.160452595Z + pids_stats: + $ref: "#/components/schemas/ContainerPidsStats" + blkio_stats: + $ref: "#/components/schemas/ContainerBlkioStats" + num_procs: + description: | + The number of processors on the system. + + This field is Windows-specific and always zero for Linux containers. + type: integer + format: uint32 + example: 16 + storage_stats: + $ref: "#/components/schemas/ContainerStorageStats" + cpu_stats: + $ref: "#/components/schemas/ContainerCPUStats" + precpu_stats: + $ref: "#/components/schemas/ContainerCPUStats" + memory_stats: + $ref: "#/components/schemas/ContainerMemoryStats" + networks: + description: | + Network statistics for the container per interface. + + This field is omitted if the container has no networking enabled. + additionalProperties: + $ref: "#/components/schemas/ContainerNetworkStats" + example: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + nullable: true + ContainerBlkioStats: + description: > + BlkioStats stores all IO service stats for data read and write. + + + This type is Linux-specific and holds many fields that are specific to cgroups v1. + + On a cgroup v2 host, all fields other than `io_service_bytes_recursive` + + are omitted or `null`. + + + This type is only populated on Linux and omitted for Windows containers. + type: object + x-go-name: BlkioStats + properties: + io_service_bytes_recursive: + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + io_serviced_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + io_queue_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + io_service_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + io_wait_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + io_merged_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + io_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + sectors_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + type: array + items: + $ref: "#/components/schemas/ContainerBlkioStatEntry" + nullable: true + example: + io_service_bytes_recursive: + - major: 254 + minor: 0 + op: read + value: 7593984 + - major: 254 + minor: 0 + op: write + value: 100 + io_serviced_recursive: null + io_queue_recursive: null + io_service_time_recursive: null + io_wait_time_recursive: null + io_merged_recursive: null + io_time_recursive: null + sectors_recursive: null + nullable: true + ContainerBlkioStatEntry: + description: | + Blkio stats entry. + + This type is Linux-specific and omitted for Windows containers. + type: object + x-go-name: BlkioStatEntry + properties: + major: + type: integer + format: uint64 + example: 254 + minor: + type: integer + format: uint64 + example: 0 + op: + type: string + example: read + value: + type: integer + format: uint64 + example: 7593984 + nullable: true + ContainerCPUStats: + description: | + CPU related info of the container + type: object + x-go-name: CPUStats + properties: + cpu_usage: + $ref: "#/components/schemas/ContainerCPUUsage" + system_cpu_usage: + description: | + System Usage. + + This field is Linux-specific and omitted for Windows containers. + type: integer + format: uint64 + example: 5 + nullable: true + online_cpus: + description: | + Number of online CPUs. + + This field is Linux-specific and omitted for Windows containers. + type: integer + format: uint32 + example: 5 + nullable: true + throttling_data: + $ref: "#/components/schemas/ContainerThrottlingData" + nullable: true + ContainerCPUUsage: + description: | + All CPU stats aggregated since container inception. + type: object + x-go-name: CPUUsage + properties: + total_usage: + description: > + Total CPU time consumed in nanoseconds (Linux) or 100's of + nanoseconds (Windows). + type: integer + format: uint64 + example: 29912000 + percpu_usage: + description: | + Total CPU time (in nanoseconds) consumed per core (Linux). + + This field is Linux-specific when using cgroups v1. It is omitted + when using cgroups v2 and Windows containers. + type: array + items: + type: integer + format: uint64 + example: 29912000 + nullable: true + usage_in_kernelmode: + description: > + Time (in nanoseconds) spent by tasks of the cgroup in kernel mode + (Linux), + + or time spent (in 100's of nanoseconds) by all container processes in + + kernel mode (Windows). + + + Not populated for Windows containers using Hyper-V isolation. + type: integer + format: uint64 + example: 21994000 + usage_in_usermode: + description: > + Time (in nanoseconds) spent by tasks of the cgroup in user mode + (Linux), + + or time spent (in 100's of nanoseconds) by all container processes in + + kernel mode (Windows). + + + Not populated for Windows containers using Hyper-V isolation. + type: integer + format: uint64 + example: 7918000 + nullable: true + ContainerPidsStats: + description: > + PidsStats contains Linux-specific stats of a container's process-IDs + (PIDs). + + + This type is Linux-specific and omitted for Windows containers. + type: object + x-go-name: PidsStats + properties: + current: + description: | + Current is the number of PIDs in the cgroup. + type: integer + format: uint64 + example: 5 + nullable: true + limit: + description: | + Limit is the hard limit on the number of pids in the cgroup. + A "Limit" of 0 means that there is no limit. + type: integer + format: uint64 + example: "18446744073709551615" + nullable: true + nullable: true + ContainerThrottlingData: + description: | + CPU throttling stats of the container. + + This type is Linux-specific and omitted for Windows containers. + type: object + x-go-name: ThrottlingData + properties: + periods: + description: | + Number of periods with throttling active. + type: integer + format: uint64 + example: 0 + throttled_periods: + description: | + Number of periods when the container hit its throttling limit. + type: integer + format: uint64 + example: 0 + throttled_time: + description: | + Aggregated time (in nanoseconds) the container was throttled for. + type: integer + format: uint64 + example: 0 + nullable: true + ContainerMemoryStats: + description: | + Aggregates all memory stats since container inception on Linux. + Windows returns stats for commit and private working set only. + type: object + x-go-name: MemoryStats + properties: + usage: + description: | + Current `res_counter` usage for memory. + + This field is Linux-specific and omitted for Windows containers. + type: integer + format: uint64 + example: 0 + nullable: true + max_usage: + description: | + Maximum usage ever recorded. + + This field is Linux-specific and only supported on cgroups v1. + It is omitted when using cgroups v2 and for Windows containers. + type: integer + format: uint64 + example: 0 + nullable: true + stats: + description: | + All the stats exported via memory.stat. when using cgroups v2. + + This field is Linux-specific and omitted for Windows containers. + type: object + additionalProperties: + type: integer + format: uint64 + nullable: true + example: + active_anon: 1572864 + active_file: 5115904 + anon: 1572864 + anon_thp: 0 + file: 7626752 + file_dirty: 0 + file_mapped: 2723840 + file_writeback: 0 + inactive_anon: 0 + inactive_file: 2510848 + kernel_stack: 16384 + pgactivate: 0 + pgdeactivate: 0 + pgfault: 2042 + pglazyfree: 0 + pglazyfreed: 0 + pgmajfault: 45 + pgrefill: 0 + pgscan: 0 + pgsteal: 0 + shmem: 0 + slab: 1180928 + slab_reclaimable: 725576 + slab_unreclaimable: 455352 + sock: 0 + thp_collapse_alloc: 0 + thp_fault_alloc: 1 + unevictable: 0 + workingset_activate: 0 + workingset_nodereclaim: 0 + workingset_refault: 0 + failcnt: + description: | + Number of times memory usage hits limits. + + This field is Linux-specific and only supported on cgroups v1. + It is omitted when using cgroups v2 and for Windows containers. + type: integer + format: uint64 + example: 0 + nullable: true + limit: + description: | + This field is Linux-specific and omitted for Windows containers. + type: integer + format: uint64 + example: 8217579520 + nullable: true + commitbytes: + description: | + Committed bytes. + + This field is Windows-specific and omitted for Linux containers. + type: integer + format: uint64 + example: 0 + nullable: true + commitpeakbytes: + description: | + Peak committed bytes. + + This field is Windows-specific and omitted for Linux containers. + type: integer + format: uint64 + example: 0 + nullable: true + privateworkingset: + description: | + Private working set. + + This field is Windows-specific and omitted for Linux containers. + type: integer + format: uint64 + example: 0 + nullable: true + ContainerNetworkStats: + description: | + Aggregates the network stats of one container + type: object + x-go-name: NetworkStats + properties: + rx_bytes: + description: | + Bytes received. Windows and Linux. + type: integer + format: uint64 + example: 5338 + rx_packets: + description: | + Packets received. Windows and Linux. + type: integer + format: uint64 + example: 36 + rx_errors: + description: | + Received errors. Not used on Windows. + + This field is Linux-specific and always zero for Windows containers. + type: integer + format: uint64 + example: 0 + rx_dropped: + description: | + Incoming packets dropped. Windows and Linux. + type: integer + format: uint64 + example: 0 + tx_bytes: + description: | + Bytes sent. Windows and Linux. + type: integer + format: uint64 + example: 1200 + tx_packets: + description: | + Packets sent. Windows and Linux. + type: integer + format: uint64 + example: 12 + tx_errors: + description: | + Sent errors. Not used on Windows. + + This field is Linux-specific and always zero for Windows containers. + type: integer + format: uint64 + example: 0 + tx_dropped: + description: | + Outgoing packets dropped. Windows and Linux. + type: integer + format: uint64 + example: 0 + endpoint_id: + description: | + Endpoint ID. Not used on Linux. + + This field is Windows-specific and omitted for Linux containers. + type: string + nullable: true + instance_id: + description: | + Instance ID. Not used on Linux. + + This field is Windows-specific and omitted for Linux containers. + type: string + nullable: true + nullable: true + ContainerStorageStats: + description: | + StorageStats is the disk I/O stats for read/write on Windows. + + This type is Windows-specific and omitted for Linux containers. + type: object + x-go-name: StorageStats + properties: + read_count_normalized: + type: integer + format: uint64 + example: 7593984 + nullable: true + read_size_bytes: + type: integer + format: uint64 + example: 7593984 + nullable: true + write_count_normalized: + type: integer + format: uint64 + example: 7593984 + nullable: true + write_size_bytes: + type: integer + format: uint64 + example: 7593984 + nullable: true + nullable: true + ContainerTopResponse: + type: object + x-go-name: TopResponse + title: ContainerTopResponse + description: Container "top" response. + properties: + Titles: + description: The ps column titles + type: array + items: + type: string + example: + Titles: + - UID + - PID + - PPID + - C + - STIME + - TTY + - TIME + - CMD + Processes: + description: |- + Each process running in the container, where each process + is an array of values corresponding to the titles. + type: array + items: + type: array + items: + type: string + example: + Processes: + - - root + - "13642" + - "882" + - "0" + - 17:03 + - pts/0 + - 00:00:00 + - /bin/bash + - - root + - "13735" + - "13642" + - "0" + - 17:06 + - pts/0 + - 00:00:00 + - sleep 10 + ContainerWaitResponse: + description: OK response to ContainerWait operation + type: object + x-go-name: WaitResponse + title: ContainerWaitResponse + required: + - StatusCode + properties: + StatusCode: + description: Exit code of the container + type: integer + format: int64 + nullable: false + Error: + $ref: "#/components/schemas/ContainerWaitExitError" + ContainerWaitExitError: + description: container waiting error, if any + type: object + x-go-name: WaitExitError + properties: + Message: + description: Details of an error + type: string + SystemVersion: + type: object + description: | + Response of Engine API: GET "/version" + properties: + Platform: + type: object + required: + - Name + properties: + Name: + type: string + Components: + type: array + description: | + Information about system components + items: + type: object + x-go-name: ComponentVersion + required: + - Name + - Version + properties: + Name: + description: | + Name of the component + type: string + example: Engine + Version: + description: | + Version of the component + type: string + example: 27.0.1 + nullable: false + Details: + description: > + Key/value pairs of strings with additional information about + the + + component. These values are intended for informational purposes + + only, and their content is not defined, and not part of the API + + specification. + + + These messages can be printed by the client as information to the user. + type: object + nullable: true + Version: + description: The version of the daemon + type: string + example: 27.0.1 + ApiVersion: + description: > + The default (and highest) API version that is supported by the daemon + type: string + example: "1.47" + MinAPIVersion: + description: | + The minimum API version that is supported by the daemon + type: string + example: "1.24" + GitCommit: + description: | + The Git commit of the source code that was used to build the daemon + type: string + example: 48a66213fe + GoVersion: + description: | + The version Go used to compile the daemon, and the version of the Go + runtime in use. + type: string + example: go1.22.7 + Os: + description: > + The operating system that the daemon is running on ("linux" or + "windows") + type: string + example: linux + Arch: + description: | + The architecture that the daemon is running on + type: string + example: amd64 + KernelVersion: + description: | + The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + type: string + example: 6.8.0-31-generic + Experimental: + description: > + Indicates if the daemon is started with experimental features + enabled. + + + This field is omitted when empty / false. + type: boolean + example: true + BuildTime: + description: | + The date and time that the daemon was compiled. + type: string + example: 2020-06-22T15:49:27.000000000+00:00 + SystemInfo: + type: object + properties: + ID: + description: | + Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + type: string + example: 7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS + Containers: + description: Total number of containers on the host. + type: integer + example: 14 + ContainersRunning: + description: | + Number of containers with status `"running"`. + type: integer + example: 3 + ContainersPaused: + description: | + Number of containers with status `"paused"`. + type: integer + example: 1 + ContainersStopped: + description: | + Number of containers with status `"stopped"`. + type: integer + example: 10 + Images: + description: | + Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + type: integer + example: 508 + Driver: + description: Name of the storage driver in use. + type: string + example: overlay2 + DriverStatus: + description: | + Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: array + items: + type: array + items: + type: string + example: + - - Backing Filesystem + - extfs + - - Supports d_type + - "true" + - - Native Overlay Diff + - "true" + DockerRootDir: + description: | + Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + type: string + example: /var/lib/docker + Plugins: + $ref: "#/components/schemas/PluginsInfo" + MemoryLimit: + description: Indicates if the host has memory limit support enabled. + type: boolean + example: true + SwapLimit: + description: Indicates if the host has memory swap limit support enabled. + type: boolean + example: true + KernelMemoryTCP: + description: > + Indicates if the host has kernel memory TCP limit support enabled. + This + + field is omitted if not supported. + + + Kernel memory TCP limits are not supported when using cgroups v2, which + + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + + + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. + type: boolean + example: true + CpuCfsPeriod: + description: > + Indicates if CPU CFS(Completely Fair Scheduler) period is supported + by + + the host. + type: boolean + example: true + CpuCfsQuota: + description: > + Indicates if CPU CFS(Completely Fair Scheduler) quota is supported + by + + the host. + type: boolean + example: true + CPUShares: + description: | + Indicates if CPU Shares limiting is supported by the host. + type: boolean + example: true + CPUSet: + description: > + Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the + host. + + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + type: boolean + example: true + PidsLimit: + description: Indicates if the host kernel has PID limit support enabled. + type: boolean + example: true + OomKillDisable: + description: Indicates if OOM killer disable is supported on the host. + type: boolean + IPv4Forwarding: + description: Indicates IPv4 forwarding is enabled. + type: boolean + example: true + Debug: + description: | + Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + type: boolean + example: true + NFd: + description: | + The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + type: integer + example: 64 + NGoroutines: + description: | + The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + type: integer + example: 174 + SystemTime: + description: > + Current system-time in [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) + + format with nano-seconds. + type: string + example: 2017-08-08T20:28:29.06202363Z + LoggingDriver: + description: | + The logging driver to use as a default for new containers. + type: string + CgroupDriver: + description: | + The driver to use for managing cgroups. + type: string + enum: + - cgroupfs + - systemd + - none + default: cgroupfs + example: cgroupfs + CgroupVersion: + description: | + The version of the cgroup. + type: string + enum: + - "1" + - "2" + default: "1" + example: "1" + NEventsListener: + description: Number of event listeners subscribed. + type: integer + example: 30 + KernelVersion: + description: > + Kernel version of the host. + + + On Linux, this information obtained from `uname`. On Windows this + + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + type: string + example: 6.8.0-31-generic + OperatingSystem: + description: | + Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + type: string + example: Ubuntu 24.04 LTS + OSVersion: + description: > + Version of the host's operating system + + +


+ + + > **Note**: The information returned in this field, including its + + > very existence, and the formatting of values, should not be considered + + > stable, and may change without notice. + type: string + example: "24.04" + OSType: + description: > + Generic type of the operating system of the host, as returned by the + + Go runtime (`GOOS`). + + + Currently returned values are "linux" and "windows". A full list of + + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: string + example: linux + Architecture: + description: > + Hardware architecture of the host, as returned by the Go runtime + + (`GOARCH`). + + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: string + example: x86_64 + NCPU: + description: | + The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + type: integer + example: 4 + MemTotal: + description: | + Total amount of physical memory available on the host, in bytes. + type: integer + format: int64 + example: 2095882240 + IndexServerAddress: + description: > + Address / URL of the index server that is used for image search, + + and as a default for user authentication for Docker Hub and Docker Cloud. + default: https://index.docker.io/v1/ + type: string + example: https://index.docker.io/v1/ + RegistryConfig: + $ref: "#/components/schemas/RegistryServiceConfig" + GenericResources: + $ref: "#/components/schemas/GenericResources" + HttpProxy: + description: > + HTTP-proxy configured for the daemon. This value is obtained from + the + + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + + are masked in the API response. + + + Containers do not automatically inherit this configuration. + type: string + example: http://xxxxx:xxxxx@proxy.corp.example.com:8080 + HttpsProxy: + description: > + HTTPS-proxy configured for the daemon. This value is obtained from + the + + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + + are masked in the API response. + + + Containers do not automatically inherit this configuration. + type: string + example: https://xxxxx:xxxxx@proxy.corp.example.com:4443 + NoProxy: + description: > + Comma-separated list of domain extensions for which no proxy should + be + + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + + environment variable. + + + Containers do not automatically inherit this configuration. + type: string + example: "*.local, 169.254/16" + Name: + description: Hostname of the host. + type: string + example: node5.corp.example.com + Labels: + description: > + User-defined labels (key/value metadata) as set on the daemon. + + +


+ + + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + + > set through the daemon configuration, and _node_ labels, set from a + + > manager node in the Swarm. Node labels are not included in this + + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + + > on a manager node in the Swarm. + type: array + items: + type: string + example: + - storage=ssd + - production + ExperimentalBuild: + description: | + Indicates if experimental features are enabled on the daemon. + type: boolean + example: true + ServerVersion: + description: | + Version string of the daemon. + type: string + example: 27.0.1 + Runtimes: + description: > + List of [OCI + compliant](https://github.com/opencontainers/runtime-spec) + + runtimes configured on the daemon. Keys hold the "name" used to + + reference the runtime. + + + The Docker daemon relies on an OCI compliant runtime (invoked via the + + `containerd` daemon) as its interface to the Linux kernel namespaces, + + cgroups, and SELinux. + + + The default runtime is `runc`, and automatically configured. Additional + + runtimes can be configured by the user and will be listed here. + type: object + additionalProperties: + $ref: "#/components/schemas/Runtime" + default: + runc: + path: runc + example: + runc: + path: runc + runc-master: + path: /go/bin/runc + custom: + path: /usr/local/bin/my-oci-runtime + runtimeArgs: + - --debug + - --systemd-cgroup=false + DefaultRuntime: + description: > + Name of the default OCI runtime that is used when starting + containers. + + + The default can be overridden per-container at create time. + type: string + default: runc + example: runc + Swarm: + $ref: "#/components/schemas/SwarmInfo" + LiveRestoreEnabled: + description: | + Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + type: boolean + default: false + example: false + Isolation: + description: > + Represents the isolation technology to use as a default for + containers. + + The supported values are platform-specific. + + + If no isolation value is specified on daemon start, on Windows client, + + the default is `hyperv`, and on Windows server, the default is `process`. + + + This option is currently not used on other platforms. + default: default + type: string + enum: + - default + - hyperv + - process + - "" + InitBinary: + description: > + Name and, optional, path of the `docker-init` binary. + + + If the path is omitted, the daemon searches the host's `$PATH` for the + + binary and uses the first result. + type: string + example: docker-init + ContainerdCommit: + $ref: "#/components/schemas/Commit" + RuncCommit: + $ref: "#/components/schemas/Commit" + InitCommit: + $ref: "#/components/schemas/Commit" + SecurityOptions: + description: | + List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + type: array + items: + type: string + example: + - name=apparmor + - name=seccomp,profile=default + - name=selinux + - name=userns + - name=rootless + ProductLicense: + description: | + Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + type: string + example: Community Engine + DefaultAddressPools: + description: > + List of custom default address pools for local networks, which can + be + + specified in the daemon.json file or dockerd option. + + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + + 10.10.[0-255].0/24 address pools. + type: array + items: + type: object + properties: + Base: + description: The network address in CIDR format + type: string + example: 10.10.0.0/16 + Size: + description: The network pool size + type: integer + example: "24" + FirewallBackend: + $ref: "#/components/schemas/FirewallInfo" + DiscoveredDevices: + description: > + List of devices discovered by device drivers. + + + Each device includes information about its source driver, kind, name, + + and additional driver-specific attributes. + type: array + items: + $ref: "#/components/schemas/DeviceInfo" + Warnings: + description: > + List of warnings / informational messages about missing features, or + + issues related to the daemon configuration. + + + These messages can be printed by the client as information to the user. + type: array + items: + type: string + example: + - "WARNING: No memory limit support" + CDISpecDirs: + description: > + List of directories where (Container Device Interface) CDI + + specifications are located. + + + These specifications define vendor-specific modifications to an OCI + + runtime specification for a container being created. + + + An empty list indicates that CDI device injection is disabled. + + + Note that since using CDI device injection requires the daemon to have + + experimental enabled. For non-experimental daemons an empty list will + + always be returned. + type: array + items: + type: string + example: + - /etc/cdi + - /var/run/cdi + Containerd: + $ref: "#/components/schemas/ContainerdInfo" + ContainerdInfo: + description: > + Information for connecting to the containerd instance that is used by + the daemon. + + This is included for debugging purposes only. + type: object + properties: + Address: + description: The address of the containerd socket. + type: string + example: /run/containerd/containerd.sock + Namespaces: + description: | + The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + type: object + properties: + Containers: + description: | + The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: string + default: moby + example: moby + Plugins: + description: | + The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: string + default: plugins.moby + example: plugins.moby + nullable: true + FirewallInfo: + description: > + Information about the daemon's firewalling configuration. + + + This field is currently only used on Linux, and omitted on other platforms. + type: object + properties: + Driver: + description: | + The name of the firewall backend driver. + type: string + example: nftables + Info: + description: | + Information about the firewall backend, provided as + "label" / "value" pairs. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: array + items: + type: array + items: + type: string + example: + - - ReloadedAt + - 2025-01-01T00:00:00Z + nullable: true + PluginsInfo: + description: | + Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + type: object + properties: + Volume: + description: Names of available volume-drivers, and network-driver plugins. + type: array + items: + type: string + example: + - local + Network: + description: Names of available network-drivers, and network-driver plugins. + type: array + items: + type: string + example: + - bridge + - host + - ipvlan + - macvlan + - "null" + - overlay + Authorization: + description: Names of available authorization plugins. + type: array + items: + type: string + example: + - img-authz-plugin + - hbm + Log: + description: Names of available logging-drivers, and logging-driver plugins. + type: array + items: + type: string + example: + - awslogs + - fluentd + - gcplogs + - gelf + - journald + - json-file + - splunk + - syslog + RegistryServiceConfig: + description: | + RegistryServiceConfig stores daemon registry services configuration. + type: object + properties: + InsecureRegistryCIDRs: + description: > + List of IP ranges of insecure registries, using the CIDR syntax + + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + + from unknown CAs) communication. + + + By default, local registries (`::1/128` and `127.0.0.0/8`) are configured as + + insecure. All other registries are secure. Communicating with an + + insecure registry is not possible if the daemon assumes that registry + + is secure. + + + This configuration override this behavior, insecure communication with + + registries whose resolved IP address is within the subnet described by + + the CIDR syntax. + + + Registries can also be marked insecure by hostname. Those registries + + are listed under `IndexConfigs` and have their `Secure` field set to + + `false`. + + + > **Warning**: Using this option can be useful when running a local + + > registry, but introduces security vulnerabilities. This option + + > should therefore ONLY be used for testing purposes. For increased + + > security, users should add their CA to their system's list of trusted + + > CAs instead of enabling this option. + type: array + items: + type: string + example: + - ::1/128 + - 127.0.0.0/8 + IndexConfigs: + type: object + additionalProperties: + $ref: "#/components/schemas/IndexInfo" + example: + 127.0.0.1:5000: + Name: 127.0.0.1:5000 + Mirrors: [] + Secure: false + Official: false + "[2001:db8:a0b:12f0::1]:80": + Name: "[2001:db8:a0b:12f0::1]:80" + Mirrors: [] + Secure: false + Official: false + docker.io: + Name: docker.io + Mirrors: + - https://hub-mirror.corp.example.com:5000/ + Secure: true + Official: true + registry.internal.corp.example.com:3000: + Name: registry.internal.corp.example.com:3000 + Mirrors: [] + Secure: false + Official: false + Mirrors: + description: | + List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + type: array + items: + type: string + example: + - https://hub-mirror.corp.example.com:5000/ + - https://[2001:db8:a0b:12f0::1]/ + nullable: true + IndexInfo: + description: IndexInfo contains information about a registry. + type: object + properties: + Name: + description: | + Name of the registry, such as "docker.io". + type: string + example: docker.io + Mirrors: + description: | + List of mirrors, expressed as URIs. + type: array + items: + type: string + example: + - https://hub-mirror.corp.example.com:5000/ + - https://registry-2.docker.io/ + - https://registry-3.docker.io/ + Secure: + description: > + Indicates if the registry is part of the list of insecure + + registries. + + + If `false`, the registry is insecure. Insecure registries accept + + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + + unknown CAs) communication. + + + > **Warning**: Insecure registries can be useful when running a local + + > registry. However, because its use creates security vulnerabilities + + > it should ONLY be enabled for testing purposes. For increased + + > security, users should add their CA to their system's list of + + > trusted CAs instead of enabling this option. + type: boolean + example: true + Official: + description: > + Indicates whether this is an official registry (i.e., Docker Hub / + docker.io) + type: boolean + example: true + nullable: true + Runtime: + description: > + Runtime describes an [OCI + compliant](https://github.com/opencontainers/runtime-spec) + + runtime. + + + The runtime is invoked by the daemon via the `containerd` daemon. OCI + + runtimes act as an interface to the Linux kernel namespaces, cgroups, + + and SELinux. + type: object + properties: + path: + description: > + Name and, optional, path, of the OCI executable binary. + + + If the path is omitted, the daemon searches the host's `$PATH` for the + + binary and uses the first result. + type: string + example: /usr/local/bin/my-oci-runtime + runtimeArgs: + description: | + List of command-line arguments to pass to the runtime when invoked. + type: array + items: + type: string + example: + - --debug + - --systemd-cgroup=false + nullable: true + status: + description: > + Information specific to the runtime. + + + While this API specification does not define data provided by runtimes, + + the following well-known properties may be provided by runtimes: + + + `org.opencontainers.runtime-spec.features`: features structure as defined + + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + + in a JSON string representation. + + +


+ + + > **Note**: The information returned in this field, including the + + > formatting of values and labels, should not be considered stable, + + > and may change without notice. + type: object + additionalProperties: + type: string + example: + org.opencontainers.runtime-spec.features: '{"ociVersionMin":"1.0.0","ociVersionMax":"1.1.0","...":"..."}' + nullable: true + Commit: + description: | + Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + type: object + properties: + ID: + description: Actual commit ID of external tool. + type: string + example: cfb82a876ecc11b5ca0977d1733adbe58599088a + SwarmInfo: + description: | + Represents generic information about swarm. + type: object + properties: + NodeID: + description: Unique identifier of for this node in the swarm. + type: string + default: "" + example: k67qz4598weg5unwwffg6z1m1 + NodeAddr: + description: | + IP address at which this node can be reached by other nodes in the + swarm. + type: string + default: "" + example: 10.0.0.46 + LocalNodeState: + $ref: "#/components/schemas/LocalNodeState" + ControlAvailable: + type: boolean + default: false + example: true + Error: + type: string + default: "" + RemoteManagers: + description: | + List of ID's and addresses of other managers in the swarm. + type: array + default: null + items: + $ref: "#/components/schemas/PeerNode" + example: + - NodeID: 71izy0goik036k48jg985xnds + Addr: 10.0.0.158:2377 + - NodeID: 79y6h1o4gv8n120drcprv5nmc + Addr: 10.0.0.159:2377 + - NodeID: k67qz4598weg5unwwffg6z1m1 + Addr: 10.0.0.46:2377 + nullable: true + Nodes: + description: Total number of nodes in the swarm. + type: integer + example: 4 + nullable: true + Managers: + description: Total number of managers in the swarm. + type: integer + example: 3 + nullable: true + Cluster: + $ref: "#/components/schemas/ClusterInfo" + LocalNodeState: + description: Current local status of this node. + type: string + default: "" + enum: + - "" + - inactive + - pending + - active + - error + - locked + example: active + PeerNode: + description: Represents a peer-node in the swarm + type: object + properties: + NodeID: + description: Unique identifier of for this node in the swarm. + type: string + Addr: + description: | + IP address and ports at which this node can be reached. + type: string + NetworkAttachmentConfig: + description: | + Specifies how a service should be attached to a particular network. + type: object + properties: + Target: + description: | + The target network for attachment. Must be a network name or ID. + type: string + Aliases: + description: | + Discoverable alternate names for the service on this network. + type: array + nullable: true + items: + type: string + DriverOpts: + description: | + Driver attachment options for the network target. + type: object + additionalProperties: + type: string + EventActor: + description: > + Actor describes something that generates events, like a container, + network, + + or a volume. + type: object + properties: + ID: + description: The ID of the object emitting the event + type: string + example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743 + Attributes: + description: | + Various key/value attributes of the object, depending on its type. + type: object + additionalProperties: + type: string + example: + com.example.some-label: some-label-value + image: alpine:latest + name: my-container + EventMessage: + description: | + EventMessage represents the information an event contains. + type: object + title: SystemEventsResponse + properties: + Type: + description: The type of object emitting the event + type: string + enum: + - builder + - config + - container + - daemon + - image + - network + - node + - plugin + - secret + - service + - volume + example: container + Action: + description: The type of event + type: string + example: create + Actor: + $ref: "#/components/schemas/EventActor" + scope: + description: | + Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + type: string + enum: + - local + - swarm + time: + description: Timestamp of event + type: integer + format: int64 + example: 1629574695 + timeNano: + description: Timestamp of event, with nanosecond accuracy + type: integer + format: int64 + example: 1629574695515050000 + OCIDescriptor: + type: object + x-go-name: Descriptor + description: > + A descriptor struct containing digest, media type, and size, as defined + in + + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + properties: + mediaType: + description: | + The media type of the object this schema refers to. + type: string + example: application/vnd.oci.image.manifest.v1+json + digest: + description: | + The digest of the targeted content. + type: string + example: sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96 + size: + description: | + The size in bytes of the blob. + type: integer + format: int64 + example: 424 + urls: + description: List of URLs from which this object MAY be downloaded. + type: array + items: + type: string + format: uri + nullable: true + annotations: + description: Arbitrary metadata relating to the targeted content. + type: object + additionalProperties: + type: string + example: + com.docker.official-images.bashbrew.arch: amd64 + org.opencontainers.image.base.digest: sha256:0d0ef5c914d3ea700147da1bd050c59edb8bb12ca312f3800b29d7c8087eabd8 + org.opencontainers.image.base.name: scratch + org.opencontainers.image.created: 2025-01-27T00:00:00Z + org.opencontainers.image.revision: 9fabb4bad5138435b01857e2fe9363e2dc5f6a79 + org.opencontainers.image.source: https://git.launchpad.net/cloud-images/+oci/ubuntu-base + org.opencontainers.image.url: https://hub.docker.com/_/ubuntu + org.opencontainers.image.version: "24.04" + nullable: true + data: + type: string + description: >- + Data is an embedding of the targeted content. This is encoded as a + base64 + + string when marshalled to JSON (automatically, by encoding/json). If + + present, Data can be used directly to avoid fetching the targeted content. + example: null + nullable: true + platform: + $ref: "#/components/schemas/OCIPlatform" + artifactType: + description: ArtifactType is the IANA media type of this artifact. + type: string + example: null + nullable: true + OCIPlatform: + type: object + x-go-name: Platform + description: > + Describes the platform which the image in the manifest runs on, as + defined + + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + properties: + architecture: + description: | + The CPU architecture, for example `amd64` or `ppc64`. + type: string + example: arm + os: + description: | + The operating system, for example `linux` or `windows`. + type: string + example: windows + os.version: + description: > + Optional field specifying the operating system version, for example + on + + Windows `10.0.19041.1165`. + type: string + example: 10.0.19041.1165 + os.features: + description: > + Optional field specifying an array of strings, each listing a + required + + OS feature (for example on Windows `win32k`). + type: array + items: + type: string + example: + - win32k + variant: + description: | + Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + type: string + example: v7 + nullable: true + DistributionInspect: + type: object + x-go-name: DistributionInspect + title: DistributionInspectResponse + required: + - Descriptor + - Platforms + description: | + Describes the result obtained from contacting the registry to retrieve + image metadata. + properties: + Descriptor: + $ref: "#/components/schemas/OCIDescriptor" + Platforms: + type: array + description: | + An array containing all platforms supported by the image. + items: + $ref: "#/components/schemas/OCIPlatform" + ClusterVolume: + type: object + description: | + Options and information specific to, and only present on, Swarm CSI + cluster volumes. + properties: + ID: + type: string + description: | + The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + Version: + $ref: "#/components/schemas/ObjectVersion" + CreatedAt: + type: string + format: dateTime + UpdatedAt: + type: string + format: dateTime + Spec: + $ref: "#/components/schemas/ClusterVolumeSpec" + Info: + type: object + description: | + Information about the global status of the volume. + properties: + CapacityBytes: + type: integer + format: int64 + description: | + The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + VolumeContext: + type: object + description: > + A map of strings to strings returned from the storage plugin + when + + the volume is created. + additionalProperties: + type: string + VolumeID: + type: string + description: > + The ID of the volume as returned by the CSI storage plugin. This + + is distinct from the volume's ID as provided by Docker. This ID + + is never used by the user when communicating with Docker to refer + + to this volume. If the ID is blank, then the Volume has not been + + successfully created in the plugin yet. + AccessibleTopology: + type: array + description: | + The topology this volume is actually accessible from. + items: + $ref: "#/components/schemas/Topology" + PublishStatus: + type: array + description: | + The status of the volume as it pertains to its publishing and use on + specific nodes + items: + type: object + properties: + NodeID: + type: string + description: | + The ID of the Swarm node the volume is published on. + State: + type: string + description: > + The published state of the volume. + + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + + * `published` The volume is published successfully to the node. + + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + enum: + - pending-publish + - published + - pending-node-unpublish + - pending-controller-unpublish + PublishContext: + type: object + description: | + A map of strings to strings returned by the CSI controller + plugin when a volume is published. + additionalProperties: + type: string + ClusterVolumeSpec: + type: object + description: | + Cluster-specific options used to create the volume. + properties: + Group: + type: string + description: | + Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + AccessMode: + type: object + description: | + Defines how the volume is used by tasks. + properties: + Scope: + type: string + description: > + The set of nodes this volume can be used on at one time. + + - `single` The volume may only be scheduled to one node at a time. + + - `multi` the volume may be scheduled to any supported number of nodes at a time. + default: single + enum: + - single + - multi + nullable: false + Sharing: + type: string + description: > + The number and way that different tasks can use this volume + + at one time. + + - `none` The volume may only be used by one task at a time. + + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + + - `all` The volume may have any number of readers and writers. + default: none + enum: + - none + - readonly + - onewriter + - all + nullable: false + MountVolume: + type: object + description: | + Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + Secrets: + type: array + description: | + Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + items: + type: object + description: | + One cluster volume secret entry. Defines a key-value pair that + is passed to the plugin. + properties: + Key: + type: string + description: | + Key is the name of the key of the key-value pair passed to + the plugin. + Secret: + type: string + description: | + Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + AccessibilityRequirements: + type: object + description: | + Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + properties: + Requisite: + type: array + description: | + A list of required topologies, at least one of which the + volume must be accessible from. + items: + $ref: "#/components/schemas/Topology" + Preferred: + type: array + description: | + A list of topologies that the volume should attempt to be + provisioned in. + items: + $ref: "#/components/schemas/Topology" + CapacityRange: + type: object + description: | + The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + properties: + RequiredBytes: + type: integer + format: int64 + description: | + The volume must be at least this big. The value of 0 + indicates an unspecified minimum + LimitBytes: + type: integer + format: int64 + description: | + The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + Availability: + type: string + description: > + The availability of the volume for use in tasks. + + - `active` The volume is fully available for scheduling on the cluster + + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + default: active + enum: + - active + - pause + - drain + nullable: false + Topology: + description: | + A map of topological domains to topological segments. For in depth + details, see documentation for the Topology object in the CSI + specification. + type: object + additionalProperties: + type: string + ImageManifestSummary: + x-go-name: ManifestSummary + description: | + ImageManifestSummary represents a summary of an image manifest. + type: object + required: + - ID + - Descriptor + - Available + - Size + - Kind + properties: + ID: + description: | + ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + type: string + example: sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f + Descriptor: + $ref: "#/components/schemas/OCIDescriptor" + Available: + description: Indicates whether all the child content (image config, layers) is + fully available locally. + type: boolean + example: true + Size: + type: object + required: + - Content + - Total + properties: + Total: + type: integer + format: int64 + example: 8213251 + description: > + Total is the total size (in bytes) of all the locally present + + data (both distributable and non-distributable) that's related to + + this manifest and its children. + + This equal to the sum of [Content] size AND all the sizes in the + + [Size] struct present in the Kind-specific data struct. + + For example, for an image kind (Kind == "image") + + this would include the size of the image content and unpacked + + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + Content: + description: | + Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + type: integer + format: int64 + example: 3987495 + nullable: false + Kind: + type: string + example: image + enum: + - image + - attestation + - unknown + description: > + The kind of the manifest. + + + kind | description + + -------------|----------------------------------------------------------- + + image | Image manifest that can be used to start a container. + + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + ImageData: + description: | + The image data for the image manifest. + This field is only populated when Kind is "image". + type: object + x-omitempty: true + required: + - Platform + - Containers + - Size + - UnpackedSize + properties: + Platform: + $ref: "#/components/schemas/OCIPlatform" + Containers: + description: | + The IDs of the containers that are using this image. + type: array + items: + type: string + example: + - ede54ee1fda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c7430 + - abadbce344c096744d8d6071a90d474d28af8f1034b5ea9fb03c3f4bfc6d005e + Size: + type: object + required: + - Unpacked + properties: + Unpacked: + type: integer + format: int64 + example: 3987495 + description: > + Unpacked is the size (in bytes) of the locally unpacked + + (uncompressed) image content that's directly usable by the containers + + running this image. + + It's independent of the distributable content - e.g. + + the image might still have an unpacked data that's still used by + + some container even when the distributable/compressed content is + + already gone. + nullable: false + nullable: true + AttestationData: + description: | + The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + type: object + x-omitempty: true + required: + - For + properties: + For: + description: | + The digest of the image manifest that this attestation is for. + type: string + example: sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f + nullable: true diff --git a/spec/docker-v1.51.yaml b/spec/docker-v1.51.yaml new file mode 100644 index 0000000..6ca2c2b --- /dev/null +++ b/spec/docker-v1.51.yaml @@ -0,0 +1,13387 @@ +# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. +# +# This is used for generating API documentation and the types used by the +# client/server. See api/README.md for more information. +# +# Some style notes: +# - This file is used by ReDoc, which allows GitHub Flavored Markdown in +# descriptions. +# - There is no maximum line length, for ease of editing and pretty diffs. +# - operationIds are in the format "NounVerb", with a singular noun. + +swagger: "2.0" +schemes: + - "http" + - "https" +produces: + - "application/json" + - "text/plain" +consumes: + - "application/json" + - "text/plain" +basePath: "/v1.51" +info: + title: "Docker Engine API" + version: "1.51" + x-logo: + url: "https://docs.docker.com/assets/images/logo-docker-main.png" + description: | + The Engine API is an HTTP API served by Docker Engine. It is the API the + Docker client uses to communicate with the Engine, so everything the Docker + client can do can be done with the API. + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` + is `GET /containers/json`). The notable exception is running containers, + which consists of several API calls. + + # Errors + + The API uses standard HTTP status codes to indicate the success or failure + of the API call. The body of the response will be JSON in the following + format: + + ``` + { + "message": "page not found" + } + ``` + + # Versioning + + The API is usually changed in each release, so API calls are versioned to + ensure that clients don't break. To lock to a specific version of the API, + you prefix the URL with its version, for example, call `/v1.30/info` to use + the v1.30 version of the `/info` endpoint. If the API version specified in + the URL is not supported by the daemon, a HTTP `400 Bad Request` error message + is returned. + + If you omit the version-prefix, the current version of the API (v1.50) is used. + For example, calling `/info` is the same as calling `/v1.51/info`. Using the + API without a version-prefix is deprecated and will be removed in a future release. + + Engine releases in the near future should support this version of the API, + so your client will continue to work even if it is talking to a newer Engine. + + The API uses an open schema model, which means the server may add extra properties + to responses. Likewise, the server will ignore any extra query parameters and + request body properties. When you write clients, you need to ignore additional + properties in responses to ensure they do not break when talking to newer + daemons. + + + # Authentication + + Authentication for registries is handled client side. The client has to send + authentication details to various endpoints that need to communicate with + registries, such as `POST /images/(name)/push`. These are sent as + `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) + (JSON) string with the following structure: + + ``` + { + "username": "string", + "password": "string", + "serveraddress": "string" + } + ``` + + The `serveraddress` is a domain/IP without a protocol. Throughout this + structure, double quotes are required. + + If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), + you can just pass this instead of credentials: + + ``` + { + "identitytoken": "9cbaf023786cd7..." + } + ``` + +# The tags on paths define the menu sections in the ReDoc documentation, so +# the usage of tags must make sense for that: +# - They should be singular, not plural. +# - There should not be too many tags, or the menu becomes unwieldy. For +# example, it is preferable to add a path to the "System" tag instead of +# creating a tag with a single path in it. +# - The order of tags in this list defines the order in the menu. +tags: + # Primary objects + - name: "Container" + x-displayName: "Containers" + description: | + Create and manage containers. + - name: "Image" + x-displayName: "Images" + - name: "Network" + x-displayName: "Networks" + description: | + Networks are user-defined networks that containers can be attached to. + See the [networking documentation](https://docs.docker.com/network/) + for more information. + - name: "Volume" + x-displayName: "Volumes" + description: | + Create and manage persistent storage that can be attached to containers. + - name: "Exec" + x-displayName: "Exec" + description: | + Run new commands inside running containers. Refer to the + [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) + for more information. + + To exec a command in a container, you first need to create an exec instance, + then start it. These two API endpoints are wrapped up in a single command-line + command, `docker exec`. + + # Swarm things + - name: "Swarm" + x-displayName: "Swarm" + description: | + Engines can be clustered together in a swarm. Refer to the + [swarm mode documentation](https://docs.docker.com/engine/swarm/) + for more information. + - name: "Node" + x-displayName: "Nodes" + description: | + Nodes are instances of the Engine participating in a swarm. Swarm mode + must be enabled for these endpoints to work. + - name: "Service" + x-displayName: "Services" + description: | + Services are the definitions of tasks to run on a swarm. Swarm mode must + be enabled for these endpoints to work. + - name: "Task" + x-displayName: "Tasks" + description: | + A task is a container running on a swarm. It is the atomic scheduling unit + of swarm. Swarm mode must be enabled for these endpoints to work. + - name: "Secret" + x-displayName: "Secrets" + description: | + Secrets are sensitive data that can be used by services. Swarm mode must + be enabled for these endpoints to work. + - name: "Config" + x-displayName: "Configs" + description: | + Configs are application configurations that can be used by services. Swarm + mode must be enabled for these endpoints to work. + # System things + - name: "Plugin" + x-displayName: "Plugins" + - name: "System" + x-displayName: "System" + +definitions: + Port: + type: "object" + description: "An open port on a container" + required: [PrivatePort, Type] + properties: + IP: + type: "string" + format: "ip-address" + description: "Host IP address that the container's port is mapped to" + PrivatePort: + type: "integer" + format: "uint16" + x-nullable: false + description: "Port on the container" + PublicPort: + type: "integer" + format: "uint16" + description: "Port exposed on the host" + Type: + type: "string" + x-nullable: false + enum: ["tcp", "udp", "sctp"] + example: + PrivatePort: 8080 + PublicPort: 80 + Type: "tcp" + + MountPoint: + type: "object" + description: | + MountPoint represents a mount point configuration inside the container. + This is used for reporting the mountpoints in use by a container. + properties: + Type: + description: | + The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `image` a docker image + - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. + - `cluster` a Swarm cluster volume + type: "string" + enum: + - "bind" + - "volume" + - "image" + - "tmpfs" + - "npipe" + - "cluster" + example: "volume" + Name: + description: | + Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + type: "string" + example: "myvolume" + Source: + description: | + Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + type: "string" + example: "/var/lib/docker/volumes/myvolume/_data" + Destination: + description: | + Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + type: "string" + example: "/usr/share/nginx/html/" + Driver: + description: | + Driver is the volume driver used to create the volume (if it is a volume). + type: "string" + example: "local" + Mode: + description: | + Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + type: "string" + example: "z" + RW: + description: | + Whether the mount is mounted writable (read-write). + type: "boolean" + example: true + Propagation: + description: | + Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + type: "string" + example: "" + + DeviceMapping: + type: "object" + description: "A device mapping between the host and container" + properties: + PathOnHost: + type: "string" + PathInContainer: + type: "string" + CgroupPermissions: + type: "string" + example: + PathOnHost: "/dev/deviceName" + PathInContainer: "/dev/deviceName" + CgroupPermissions: "mrw" + + DeviceRequest: + type: "object" + description: "A request for devices to be sent to device drivers" + properties: + Driver: + type: "string" + example: "nvidia" + Count: + type: "integer" + example: -1 + DeviceIDs: + type: "array" + items: + type: "string" + example: + - "0" + - "1" + - "GPU-fef8089b-4820-abfc-e83e-94318197576e" + Capabilities: + description: | + A list of capabilities; an OR list of AND lists of capabilities. + type: "array" + items: + type: "array" + items: + type: "string" + example: + # gpu AND nvidia AND compute + - ["gpu", "nvidia", "compute"] + Options: + description: | + Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + type: "object" + additionalProperties: + type: "string" + + ThrottleDevice: + type: "object" + properties: + Path: + description: "Device path" + type: "string" + Rate: + description: "Rate" + type: "integer" + format: "int64" + minimum: 0 + + Mount: + type: "object" + properties: + Target: + description: "Container path." + type: "string" + Source: + description: "Mount source (e.g. a volume name, a host path)." + type: "string" + Type: + description: | + The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `image` Mounts an image. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + - `cluster` a Swarm cluster volume + type: "string" + enum: + - "bind" + - "volume" + - "image" + - "tmpfs" + - "npipe" + - "cluster" + ReadOnly: + description: "Whether the mount should be read-only." + type: "boolean" + Consistency: + description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." + type: "string" + BindOptions: + description: "Optional configuration for the `bind` type." + type: "object" + properties: + Propagation: + description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." + type: "string" + enum: + - "private" + - "rprivate" + - "shared" + - "rshared" + - "slave" + - "rslave" + NonRecursive: + description: "Disable recursive bind mount." + type: "boolean" + default: false + CreateMountpoint: + description: "Create mount point on host if missing" + type: "boolean" + default: false + ReadOnlyNonRecursive: + description: | + Make the mount non-recursively read-only, but still leave the mount recursive + (unless NonRecursive is set to `true` in conjunction). + + Added in v1.44, before that version all read-only mounts were + non-recursive by default. To match the previous behaviour this + will default to `true` for clients on versions prior to v1.44. + type: "boolean" + default: false + ReadOnlyForceRecursive: + description: "Raise an error if the mount cannot be made recursively read-only." + type: "boolean" + default: false + VolumeOptions: + description: "Optional configuration for the `volume` type." + type: "object" + properties: + NoCopy: + description: "Populate volume with data from the target." + type: "boolean" + default: false + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + DriverConfig: + description: "Map of driver specific options" + type: "object" + properties: + Name: + description: "Name of the driver to use to create the volume." + type: "string" + Options: + description: "key/value map of driver specific options." + type: "object" + additionalProperties: + type: "string" + Subpath: + description: "Source path inside the volume. Must be relative without any back traversals." + type: "string" + example: "dir-inside-volume/subdirectory" + ImageOptions: + description: "Optional configuration for the `image` type." + type: "object" + properties: + Subpath: + description: "Source path inside the image. Must be relative without any back traversals." + type: "string" + example: "dir-inside-image/subdirectory" + TmpfsOptions: + description: "Optional configuration for the `tmpfs` type." + type: "object" + properties: + SizeBytes: + description: "The size for the tmpfs mount in bytes." + type: "integer" + format: "int64" + Mode: + description: "The permission mode for the tmpfs mount in an integer." + type: "integer" + Options: + description: | + The options to be passed to the tmpfs mount. An array of arrays. + Flag options should be provided as 1-length arrays. Other types + should be provided as as 2-length arrays, where the first item is + the key and the second the value. + type: "array" + items: + type: "array" + minItems: 1 + maxItems: 2 + items: + type: "string" + example: + [["noexec"]] + + RestartPolicy: + description: | + The behavior to apply when the container exits. The default is not to + restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. + type: "object" + properties: + Name: + type: "string" + description: | + - Empty string means not to restart + - `no` Do not automatically restart + - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "" + - "no" + - "always" + - "unless-stopped" + - "on-failure" + MaximumRetryCount: + type: "integer" + description: | + If `on-failure` is used, the number of times to retry before giving up. + + Resources: + description: "A container's resources (cgroups config, ulimits, etc)" + type: "object" + properties: + # Applicable to all platforms + CpuShares: + description: | + An integer value representing this container's relative CPU weight + versus other containers. + type: "integer" + Memory: + description: "Memory limit in bytes." + type: "integer" + format: "int64" + default: 0 + # Applicable to UNIX platforms + CgroupParent: + description: | + Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + type: "string" + BlkioWeight: + description: "Block IO weight (relative weight)." + type: "integer" + minimum: 0 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + type: "array" + items: + type: "object" + properties: + Path: + type: "string" + Weight: + type: "integer" + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + CpuPeriod: + description: "The length of a CPU period in microseconds." + type: "integer" + format: "int64" + CpuQuota: + description: | + Microseconds of CPU time that the container can get in a CPU period. + type: "integer" + format: "int64" + CpuRealtimePeriod: + description: | + The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpuRealtimeRuntime: + description: | + The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpusetCpus: + description: | + CPUs in which to allow execution (e.g., `0-3`, `0,1`). + type: "string" + example: "0-3" + CpusetMems: + description: | + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + type: "string" + Devices: + description: "A list of devices to add to the container." + type: "array" + items: + $ref: "#/definitions/DeviceMapping" + DeviceCgroupRules: + description: "a list of cgroup rules to apply to the container" + type: "array" + items: + type: "string" + example: "c 13:* rwm" + DeviceRequests: + description: | + A list of requests for devices to be sent to device drivers. + type: "array" + items: + $ref: "#/definitions/DeviceRequest" + KernelMemoryTCP: + description: | + Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field + for cgroups v1. This field will be removed in a future release. + type: "integer" + format: "int64" + MemoryReservation: + description: "Memory soft limit in bytes." + type: "integer" + format: "int64" + MemorySwap: + description: | + Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + type: "integer" + format: "int64" + MemorySwappiness: + description: | + Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + type: "integer" + format: "int64" + minimum: 0 + maximum: 100 + NanoCpus: + description: "CPU quota in units of 10-9 CPUs." + type: "integer" + format: "int64" + OomKillDisable: + description: "Disable OOM Killer for the container." + type: "boolean" + Init: + 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. + type: "boolean" + x-nullable: true + PidsLimit: + description: | + Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + type: "integer" + format: "int64" + x-nullable: true + Ulimits: + description: | + A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + # Applicable to Windows + CpuCount: + description: | + The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + CpuPercent: + description: | + The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + IOMaximumIOps: + description: "Maximum IOps for the container system drive (Windows only)" + type: "integer" + format: "int64" + IOMaximumBandwidth: + description: | + Maximum IO in bytes per second for the container system drive + (Windows only). + type: "integer" + format: "int64" + + Limit: + description: | + An object describing a limit on resources which can be requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + Pids: + description: | + Limits the maximum number of PIDs in the container. Set `0` for unlimited. + type: "integer" + format: "int64" + default: 0 + example: 100 + + ResourceObject: + description: | + An object describing the resources which can be advertised by a node and + requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + GenericResources: + $ref: "#/definitions/GenericResources" + + GenericResources: + description: | + User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + type: "array" + items: + type: "object" + properties: + NamedResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "string" + DiscreteResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "integer" + format: "int64" + example: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + HealthConfig: + description: "A test to perform to check that the container is healthy." + type: "object" + properties: + Test: + description: | + The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + type: "array" + items: + type: "string" + Interval: + description: | + The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + Timeout: + description: | + The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + Retries: + description: | + The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + type: "integer" + StartPeriod: + description: | + Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + StartInterval: + description: | + The time to wait between checks in nanoseconds during the start period. + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + + Health: + description: | + Health stores information about the container's healthcheck results. + type: "object" + x-nullable: true + properties: + Status: + description: | + Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + type: "string" + enum: + - "none" + - "starting" + - "healthy" + - "unhealthy" + example: "healthy" + FailingStreak: + description: "FailingStreak is the number of consecutive failures" + type: "integer" + example: 0 + Log: + type: "array" + description: | + Log contains the last few results (oldest first) + items: + $ref: "#/definitions/HealthcheckResult" + + HealthcheckResult: + description: | + HealthcheckResult stores information about a single run of a healthcheck probe + type: "object" + x-nullable: true + properties: + Start: + description: | + Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "date-time" + example: "2020-01-04T10:44:24.496525531Z" + End: + description: | + Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2020-01-04T10:45:21.364524523Z" + ExitCode: + description: | + ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + type: "integer" + example: 0 + Output: + description: "Output from last check" + type: "string" + + HostConfig: + description: "Container configuration that depends on the host we are running on" + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + # Applicable to all platforms + Binds: + type: "array" + description: | + A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. + + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. + items: + type: "string" + ContainerIDFile: + type: "string" + description: "Path to a file where the container ID is written" + example: "" + LogConfig: + type: "object" + description: "The logging configuration for this container" + properties: + Type: + description: |- + Name of the logging driver used for the container or "none" + if logging is disabled. + type: "string" + enum: + - "local" + - "json-file" + - "syslog" + - "journald" + - "gelf" + - "fluentd" + - "awslogs" + - "splunk" + - "etwlogs" + - "none" + Config: + description: |- + Driver-specific configuration options for the logging driver. + type: "object" + additionalProperties: + type: "string" + example: + "max-file": "5" + "max-size": "10m" + NetworkMode: + type: "string" + description: | + Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + PortBindings: + $ref: "#/definitions/PortMap" + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + AutoRemove: + type: "boolean" + description: | + Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + VolumeDriver: + type: "string" + description: "Driver that this container uses to mount volumes." + VolumesFrom: + type: "array" + description: | + A list of volumes to inherit from another container, specified in + the form `[:]`. + items: + type: "string" + Mounts: + description: | + Specification for mounts to be added to the container. + type: "array" + items: + $ref: "#/definitions/Mount" + ConsoleSize: + type: "array" + description: | + Initial console size, as an `[height, width]` array. + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + example: [80, 64] + Annotations: + type: "object" + description: | + Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + additionalProperties: + type: "string" + + # Applicable to UNIX platforms + CapAdd: + type: "array" + description: | + A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CapDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CgroupnsMode: + type: "string" + enum: + - "private" + - "host" + description: | + cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + Dns: + type: "array" + description: "A list of DNS servers for the container to use." + items: + type: "string" + DnsOptions: + type: "array" + description: "A list of DNS options." + items: + type: "string" + DnsSearch: + type: "array" + description: "A list of DNS search domains." + items: + type: "string" + ExtraHosts: + type: "array" + description: | + A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + items: + type: "string" + GroupAdd: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + IpcMode: + type: "string" + description: | + IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + Cgroup: + type: "string" + description: "Cgroup to use for the container." + Links: + type: "array" + description: | + A list of links for the container in the form `container_name:alias`. + items: + type: "string" + OomScoreAdj: + type: "integer" + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 500 + PidMode: + type: "string" + description: | + Set the PID (Process) Namespace mode for the container. It can be + either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: "boolean" + description: |- + Gives the container full access to the host. + PublishAllPorts: + type: "boolean" + description: | + Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + ReadonlyRootfs: + type: "boolean" + description: "Mount the container's root filesystem as read only." + SecurityOpt: + type: "array" + description: | + A list of string values to customize labels for MLS systems, such + as SELinux. + items: + type: "string" + StorageOpt: + type: "object" + description: | + Storage driver options for this container, in the form `{"size": "120G"}`. + additionalProperties: + type: "string" + Tmpfs: + type: "object" + description: | + A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + additionalProperties: + type: "string" + UTSMode: + type: "string" + description: "UTS namespace to use for the container." + UsernsMode: + type: "string" + description: | + Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + ShmSize: + type: "integer" + format: "int64" + description: | + Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + minimum: 0 + Sysctls: + type: "object" + x-nullable: true + description: |- + A list of kernel parameters (sysctls) to set in the container. + + This field is omitted if not set. + additionalProperties: + type: "string" + example: + "net.ipv4.ip_forward": "1" + Runtime: + type: "string" + x-nullable: true + description: |- + Runtime to use with this container. + # Applicable to Windows + Isolation: + type: "string" + description: | + Isolation technology of the container. (Windows only) + enum: + - "default" + - "process" + - "hyperv" + - "" + MaskedPaths: + type: "array" + description: | + The list of paths to be masked inside the container (this overrides + the default set of paths). + items: + type: "string" + example: + - "/proc/asound" + - "/proc/acpi" + - "/proc/kcore" + - "/proc/keys" + - "/proc/latency_stats" + - "/proc/timer_list" + - "/proc/timer_stats" + - "/proc/sched_debug" + - "/proc/scsi" + - "/sys/firmware" + - "/sys/devices/virtual/powercap" + ReadonlyPaths: + type: "array" + description: | + The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + items: + type: "string" + example: + - "/proc/bus" + - "/proc/fs" + - "/proc/irq" + - "/proc/sys" + - "/proc/sysrq-trigger" + + ContainerConfig: + description: | + Configuration for a container that is portable between hosts. + type: "object" + properties: + Hostname: + description: | + The hostname to use for the container, as a valid RFC 1123 hostname. + type: "string" + example: "439f4e91bd1d" + Domainname: + description: | + The domain name to use for the container. + type: "string" + User: + description: |- + Commands run as this user inside the container. If omitted, commands + run as the user specified in the image the container was started from. + + Can be either user-name or UID, and optional group-name or GID, + separated by a colon (`[<:group-name|GID>]`). + type: "string" + example: "123:456" + AttachStdin: + description: "Whether to attach to `stdin`." + type: "boolean" + default: false + AttachStdout: + description: "Whether to attach to `stdout`." + type: "boolean" + default: true + AttachStderr: + description: "Whether to attach to `stderr`." + type: "boolean" + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + x-nullable: true + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: { + "80/tcp": {}, + "443/tcp": {} + } + Tty: + description: | + Attach standard streams to a TTY, including `stdin` if it is not closed. + type: "boolean" + default: false + OpenStdin: + description: "Open `stdin`" + type: "boolean" + default: false + StdinOnce: + description: "Close `stdin` after one attached client disconnects" + type: "boolean" + default: false + Env: + description: | + A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + type: "array" + items: + type: "string" + example: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: "array" + items: + type: "string" + example: ["/bin/sh"] + Healthcheck: + $ref: "#/definitions/HealthConfig" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + default: false + example: false + x-nullable: true + Image: + description: | + The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + type: "string" + example: "example-image:1.0" + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + example: "/public/" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: "array" + items: + type: "string" + example: [] + NetworkDisabled: + description: "Disable networking for the container." + type: "boolean" + x-nullable: true + MacAddress: + description: | + MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + type: "string" + x-nullable: true + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: "array" + x-nullable: true + items: + type: "string" + example: [] + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: "string" + example: "SIGTERM" + x-nullable: true + StopTimeout: + description: "Timeout to stop a container in seconds." + type: "integer" + default: 10 + x-nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: "array" + x-nullable: true + items: + type: "string" + example: ["/bin/sh", "-c"] + + ImageConfig: + description: | + Configuration of the image. These fields are used as defaults + when starting a container from the image. + type: "object" + properties: + User: + description: "The user that commands are run as inside the container." + type: "string" + example: "web:web" + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + x-nullable: true + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: { + "80/tcp": {}, + "443/tcp": {} + } + Env: + description: | + A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + type: "array" + items: + type: "string" + example: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: "array" + items: + type: "string" + example: ["/bin/sh"] + Healthcheck: + $ref: "#/definitions/HealthConfig" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + default: false + example: false + x-nullable: true + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: + "/app/data": {} + "/app/config": {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + example: "/public/" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: "array" + items: + type: "string" + example: [] + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: "array" + x-nullable: true + items: + type: "string" + example: [] + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: "string" + example: "SIGTERM" + x-nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: "array" + x-nullable: true + items: + type: "string" + example: ["/bin/sh", "-c"] + + NetworkingConfig: + description: | + NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + type: "object" + properties: + EndpointsConfig: + description: | + A mapping of network name to endpoint configuration for that network. + The endpoint configuration can be left empty to connect to that + network with no particular endpoint configuration. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + example: + # putting an example here, instead of using the example values from + # /definitions/EndpointSettings, because EndpointSettings contains + # operational data returned when inspecting a container that we don't + # accept here. + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + MacAddress: "02:42:ac:12:05:02" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + database_nw: {} + + NetworkSettings: + description: "NetworkSettings exposes the network settings in the API" + type: "object" + properties: + Bridge: + description: | + Name of the default bridge interface when dockerd's --bridge flag is set. + + Deprecated: This field is only set when the daemon is started with the --bridge flag specified. + type: "string" + example: "docker0" + SandboxID: + description: SandboxID uniquely represents a container's network stack. + type: "string" + example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" + HairpinMode: + description: | + Indicates if hairpin NAT should be enabled on the virtual interface. + + Deprecated: This field is never set and will be removed in a future release. + type: "boolean" + example: false + LinkLocalIPv6Address: + description: | + IPv6 unicast address using the link-local prefix. + + Deprecated: This field is never set and will be removed in a future release. + type: "string" + example: "" + LinkLocalIPv6PrefixLen: + description: | + Prefix length of the IPv6 unicast address. + + Deprecated: This field is never set and will be removed in a future release. + type: "integer" + example: "" + Ports: + $ref: "#/definitions/PortMap" + SandboxKey: + description: SandboxKey is the full path of the netns handle + type: "string" + example: "/var/run/docker/netns/8ab54b426c38" + + SecondaryIPAddresses: + description: "Deprecated: This field is never set and will be removed in a future release." + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + SecondaryIPv6Addresses: + description: "Deprecated: This field is never set and will be removed in a future release." + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + # TODO properties below are part of DefaultNetworkSettings, which is + # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 + EndpointID: + description: | + EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.1" + GlobalIPv6Address: + description: | + Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 64 + IPAddress: + description: | + IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8:2::100" + MacAddress: + description: | + MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "02:42:ac:11:00:04" + Networks: + description: | + Information about all networks that the container is connected to. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + + Address: + description: Address represents an IPv4 or IPv6 IP address. + type: "object" + properties: + Addr: + description: IP address. + type: "string" + PrefixLen: + description: Mask length of the IP address. + type: "integer" + + PortMap: + description: | + PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + type: "object" + additionalProperties: + type: "array" + x-nullable: true + items: + $ref: "#/definitions/PortBinding" + example: + "443/tcp": + - HostIp: "127.0.0.1" + HostPort: "4443" + "80/tcp": + - HostIp: "0.0.0.0" + HostPort: "80" + - HostIp: "0.0.0.0" + HostPort: "8080" + "80/udp": + - HostIp: "0.0.0.0" + HostPort: "80" + "53/udp": + - HostIp: "0.0.0.0" + HostPort: "53" + "2377/tcp": null + + PortBinding: + description: | + PortBinding represents a binding between a host IP address and a host + port. + type: "object" + properties: + HostIp: + description: "Host IP address that the container's port is mapped to." + type: "string" + example: "127.0.0.1" + HostPort: + description: "Host port number that the container's port is mapped to." + type: "string" + example: "4443" + + DriverData: + description: | + Information about the storage driver used to store the container's and + image's filesystem. + type: "object" + required: [Name, Data] + properties: + Name: + description: "Name of the storage driver." + type: "string" + x-nullable: false + example: "overlay2" + Data: + description: | + Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: { + "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged", + "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff", + "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work" + } + + FilesystemChange: + description: | + Change in the container's filesystem. + type: "object" + required: [Path, Kind] + properties: + Path: + description: | + Path to file or directory that has changed. + type: "string" + x-nullable: false + Kind: + $ref: "#/definitions/ChangeType" + + ChangeType: + description: | + Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + type: "integer" + format: "uint8" + enum: [0, 1, 2] + x-nullable: false + + ImageInspect: + description: | + Information about an image in the local image cache. + type: "object" + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: "string" + x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" + Descriptor: + description: | + Descriptor is an OCI descriptor of the image target. + In case of a multi-platform image, this descriptor points to the OCI index + or a manifest list. + + This field is only present if the daemon provides a multi-platform image store. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + x-nullable: true + $ref: "#/definitions/OCIDescriptor" + Manifests: + description: | + Manifests is a list of image manifests available in this image. It + provides a more detailed view of the platform-specific image manifests or + other image-attached data like build attestations. + + Only available if the daemon provides a multi-platform image store + and the `manifests` option is set in the inspect request. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + type: "array" + x-nullable: true + items: + $ref: "#/definitions/ImageManifestSummary" + RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + type: "array" + items: + type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" + RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + type: "array" + items: + type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" + Parent: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + > **Deprecated**: This field is only set when using the deprecated + > legacy builder. It is included in API responses for informational + > purposes, but should not be depended on as it will be omitted + > once the legacy builder is removed. + type: "string" + x-nullable: false + example: "" + Comment: + description: | + Optional message that was set when committing or importing the image. + type: "string" + x-nullable: false + example: "" + Created: + description: | + Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if present in the image, + and omitted otherwise. + type: "string" + format: "dateTime" + x-nullable: true + example: "2022-02-04T21:20:12.497794809Z" + DockerVersion: + description: | + The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + + > **Deprecated**: This field is only set when using the deprecated + > legacy builder. It is included in API responses for informational + > purposes, but should not be depended on as it will be omitted + > once the legacy builder is removed. + type: "string" + x-nullable: false + example: "27.0.1" + Author: + description: | + Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. + type: "string" + x-nullable: false + example: "" + Config: + $ref: "#/definitions/ImageConfig" + Architecture: + description: | + Hardware CPU architecture that the image runs on. + type: "string" + x-nullable: false + example: "arm" + Variant: + description: | + CPU architecture variant (presently ARM-only). + type: "string" + x-nullable: true + example: "v7" + Os: + description: | + Operating System the image is built to run on. + type: "string" + x-nullable: false + example: "linux" + OsVersion: + description: | + Operating System version the image is built to run on (especially + for Windows). + type: "string" + example: "" + x-nullable: true + Size: + description: | + Total size of the image including all layers it is composed of. + type: "integer" + format: "int64" + x-nullable: false + example: 1239828 + GraphDriver: + $ref: "#/definitions/DriverData" + RootFS: + description: | + Information about the image's RootFS, including the layer IDs. + type: "object" + required: [Type] + properties: + Type: + type: "string" + x-nullable: false + example: "layers" + Layers: + type: "array" + items: + type: "string" + example: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + Metadata: + description: | + Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. + type: "object" + properties: + LastTagTime: + description: | + Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. + type: "string" + format: "dateTime" + example: "2022-02-28T14:40:02.623929178Z" + x-nullable: true + + ImageSummary: + type: "object" + x-go-name: "Summary" + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - Labels + - Containers + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: "string" + x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" + ParentId: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + type: "string" + x-nullable: false + example: "" + RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + type: "array" + x-nullable: false + items: + type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" + RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + type: "array" + x-nullable: false + items: + type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" + Created: + description: | + Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + type: "integer" + x-nullable: false + example: "1644009612" + Size: + description: | + Total size of the image including all layers it is composed of. + type: "integer" + format: "int64" + x-nullable: false + example: 172064416 + SharedSize: + description: | + Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + type: "integer" + format: "int64" + x-nullable: false + example: 1239828 + Labels: + description: "User-defined key/value metadata." + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Containers: + description: | + Number of containers using this image. Includes both stopped and running + containers. + + `-1` indicates that the value has not been set / calculated. + x-nullable: false + type: "integer" + example: 2 + Manifests: + description: | + Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + type: "array" + x-nullable: false + x-omitempty: true + items: + $ref: "#/definitions/ImageManifestSummary" + Descriptor: + description: | + Descriptor is an OCI descriptor of the image target. + In case of a multi-platform image, this descriptor points to the OCI index + or a manifest list. + + This field is only present if the daemon provides a multi-platform image store. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + x-nullable: true + $ref: "#/definitions/OCIDescriptor" + + AuthConfig: + type: "object" + properties: + username: + type: "string" + password: + type: "string" + email: + description: | + Email is an optional value associated with the username. + + > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. + type: "string" + serveraddress: + type: "string" + example: + username: "hannibal" + password: "xxxx" + serveraddress: "https://index.docker.io/v1/" + + ProcessConfig: + type: "object" + properties: + privileged: + type: "boolean" + user: + type: "string" + tty: + type: "boolean" + entrypoint: + type: "string" + arguments: + type: "array" + items: + type: "string" + + Volume: + type: "object" + required: [Name, Driver, Mountpoint, Labels, Scope, Options] + properties: + Name: + type: "string" + description: "Name of the volume." + x-nullable: false + example: "tardis" + Driver: + type: "string" + description: "Name of the volume driver used by the volume." + x-nullable: false + example: "custom" + Mountpoint: + type: "string" + description: "Mount path of the volume on the host." + x-nullable: false + example: "/var/lib/docker/volumes/tardis" + CreatedAt: + type: "string" + format: "dateTime" + description: "Date/Time the volume was created." + example: "2016-06-07T20:31:11.853781916Z" + Status: + type: "object" + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: "object" + example: + hello: "world" + Labels: + type: "object" + description: "User-defined key/value metadata." + x-nullable: false + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: + type: "string" + description: | + The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + default: "local" + x-nullable: false + enum: ["local", "global"] + example: "local" + ClusterVolume: + $ref: "#/definitions/ClusterVolume" + Options: + type: "object" + description: | + The driver specific options used when creating the volume. + additionalProperties: + type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + UsageData: + type: "object" + x-nullable: true + x-go-name: "UsageData" + required: [Size, RefCount] + description: | + Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + properties: + Size: + type: "integer" + format: "int64" + default: -1 + description: | + Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + x-nullable: false + RefCount: + type: "integer" + format: "int64" + default: -1 + description: | + The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + x-nullable: false + + VolumeCreateOptions: + description: "Volume configuration" + type: "object" + title: "VolumeConfig" + x-go-name: "CreateOptions" + properties: + Name: + description: | + The new volume's name. If not specified, Docker generates a name. + type: "string" + x-nullable: false + example: "tardis" + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + example: "custom" + DriverOpts: + description: | + A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + type: "object" + additionalProperties: + type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + ClusterVolumeSpec: + $ref: "#/definitions/ClusterVolumeSpec" + + VolumeListResponse: + type: "object" + title: "VolumeListResponse" + x-go-name: "ListResponse" + description: "Volume list response" + properties: + Volumes: + type: "array" + description: "List of volumes" + items: + $ref: "#/definitions/Volume" + Warnings: + type: "array" + description: | + Warnings that occurred when fetching the list of volumes. + items: + type: "string" + example: [] + + Network: + type: "object" + properties: + Name: + description: | + Name of the network. + type: "string" + example: "my_network" + Id: + description: | + ID that uniquely identifies a network on a single machine. + type: "string" + example: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" + Created: + description: | + Date and time at which the network was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-10-19T04:33:30.360899459Z" + Scope: + description: | + The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + type: "string" + example: "local" + Driver: + description: | + The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + type: "string" + example: "overlay" + EnableIPv4: + description: | + Whether the network was created with IPv4 enabled. + type: "boolean" + example: true + EnableIPv6: + description: | + Whether the network was created with IPv6 enabled. + type: "boolean" + example: false + IPAM: + $ref: "#/definitions/IPAM" + Internal: + description: | + Whether the network is created to only allow internal networking + connectivity. + type: "boolean" + default: false + example: false + Attachable: + description: | + Whether a global / swarm scope network is manually attachable by regular + containers from workers in swarm mode. + type: "boolean" + default: false + example: false + Ingress: + description: | + Whether the network is providing the routing-mesh for the swarm cluster. + type: "boolean" + default: false + example: false + ConfigFrom: + $ref: "#/definitions/ConfigReference" + ConfigOnly: + description: | + Whether the network is a config-only network. Config-only networks are + placeholder networks for network configurations to be used by other + networks. Config-only networks cannot be used directly to run containers + or services. + type: "boolean" + default: false + Containers: + description: | + Contains endpoints attached to the network. + type: "object" + additionalProperties: + $ref: "#/definitions/NetworkContainer" + example: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: "test" + EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: "02:42:ac:13:00:02" + IPv4Address: "172.19.0.2/16" + IPv6Address: "" + Options: + description: | + Network-specific options uses when creating the network. + type: "object" + additionalProperties: + type: "string" + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Peers: + description: | + List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + type: "array" + items: + $ref: "#/definitions/PeerInfo" + x-nullable: true + # TODO: Add Services (only present when "verbose" is set). + + ConfigReference: + description: | + The config-only network source to provide the configuration for + this network. + type: "object" + properties: + Network: + description: | + The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + type: "string" + example: "config_only_network_01" + + IPAM: + type: "object" + properties: + Driver: + description: "Name of the IPAM driver to use." + type: "string" + default: "default" + example: "default" + Config: + description: | + List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + type: "array" + items: + $ref: "#/definitions/IPAMConfig" + Options: + description: "Driver-specific options, specified as a map." + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + + IPAMConfig: + type: "object" + properties: + Subnet: + type: "string" + example: "172.20.0.0/16" + IPRange: + type: "string" + example: "172.20.10.0/24" + Gateway: + type: "string" + example: "172.20.10.11" + AuxiliaryAddresses: + type: "object" + additionalProperties: + type: "string" + + NetworkContainer: + type: "object" + properties: + Name: + type: "string" + example: "container_1" + EndpointID: + type: "string" + example: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: + type: "string" + example: "02:42:ac:13:00:02" + IPv4Address: + type: "string" + example: "172.19.0.2/16" + IPv6Address: + type: "string" + example: "" + + PeerInfo: + description: | + PeerInfo represents one peer of an overlay network. + type: "object" + properties: + Name: + description: + ID of the peer-node in the Swarm cluster. + type: "string" + example: "6869d7c1732b" + IP: + description: + IP-address of the peer-node in the Swarm cluster. + type: "string" + example: "10.133.77.91" + + NetworkCreateResponse: + description: "OK response to NetworkCreate operation" + type: "object" + title: "NetworkCreateResponse" + x-go-name: "CreateResponse" + required: [Id, Warning] + properties: + Id: + description: "The ID of the created network." + type: "string" + x-nullable: false + example: "b5c4fc71e8022147cd25de22b22173de4e3b170134117172eb595cb91b4e7e5d" + Warning: + description: "Warnings encountered when creating the container" + type: "string" + x-nullable: false + example: "" + + BuildInfo: + type: "object" + properties: + id: + type: "string" + stream: + type: "string" + error: + type: "string" + x-nullable: true + description: |- + errors encountered during the operation. + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + x-nullable: true + description: |- + Progress is a pre-formatted presentation of progressDetail. + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + progressDetail: + $ref: "#/definitions/ProgressDetail" + aux: + $ref: "#/definitions/ImageID" + + BuildCache: + type: "object" + description: | + BuildCache contains information about a build cache record. + properties: + ID: + type: "string" + description: | + Unique ID of the build cache record. + example: "ndlpt0hhvkqcdfkputsk4cq9c" + Parent: + description: | + ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + type: "string" + x-nullable: true + example: "" + Parents: + description: | + List of parent build cache record IDs. + type: "array" + items: + type: "string" + x-nullable: true + example: ["hw53o5aio51xtltp5xjp8v7fx"] + Type: + type: "string" + description: | + Cache record type. + example: "regular" + # see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84 + enum: + - "internal" + - "frontend" + - "source.local" + - "source.git.checkout" + - "exec.cachemount" + - "regular" + Description: + type: "string" + description: | + Description of the build-step that produced the build cache. + example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" + InUse: + type: "boolean" + description: | + Indicates if the build cache is in use. + example: false + Shared: + type: "boolean" + description: | + Indicates if the build cache is shared. + example: true + Size: + description: | + Amount of disk space used by the build cache (in bytes). + type: "integer" + example: 51 + CreatedAt: + description: | + Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + LastUsedAt: + description: | + Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + x-nullable: true + example: "2017-08-09T07:09:37.632105588Z" + UsageCount: + type: "integer" + example: 26 + + ImageID: + type: "object" + description: "Image ID or Digest" + properties: + ID: + type: "string" + example: + ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + + CreateImageInfo: + type: "object" + properties: + id: + type: "string" + error: + type: "string" + x-nullable: true + description: |- + errors encountered during the operation. + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + x-nullable: true + description: |- + Progress is a pre-formatted presentation of progressDetail. + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + progressDetail: + $ref: "#/definitions/ProgressDetail" + + PushImageInfo: + type: "object" + properties: + error: + type: "string" + x-nullable: true + description: |- + errors encountered during the operation. + + + > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + x-nullable: true + description: |- + Progress is a pre-formatted presentation of progressDetail. + + + > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. + progressDetail: + $ref: "#/definitions/ProgressDetail" + + DeviceInfo: + type: "object" + description: | + DeviceInfo represents a device that can be used by a container. + properties: + Source: + type: "string" + example: "cdi" + description: | + The origin device driver. + ID: + type: "string" + example: "vendor.com/gpu=0" + description: | + The unique identifier for the device within its source driver. + For CDI devices, this would be an FQDN like "vendor.com/gpu=0". + + ErrorDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "string" + + ProgressDetail: + type: "object" + properties: + current: + type: "integer" + total: + type: "integer" + + ErrorResponse: + description: "Represents an error." + type: "object" + required: ["message"] + properties: + message: + description: "The error message." + type: "string" + x-nullable: false + example: + message: "Something went wrong." + + IDResponse: + description: "Response to an API call that returns just an Id" + type: "object" + x-go-name: "IDResponse" + required: ["Id"] + properties: + Id: + description: "The id of the newly created object." + type: "string" + x-nullable: false + + EndpointSettings: + description: "Configuration for a network endpoint." + type: "object" + properties: + # Configurations + IPAMConfig: + $ref: "#/definitions/EndpointIPAMConfig" + Links: + type: "array" + items: + type: "string" + example: + - "container_1" + - "container_2" + MacAddress: + description: | + MAC address for the endpoint on this network. The network driver might ignore this parameter. + type: "string" + example: "02:42:ac:11:00:04" + Aliases: + type: "array" + items: + type: "string" + example: + - "server_x" + - "server_y" + DriverOpts: + description: | + DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + GwPriority: + description: | + This property determines which endpoint will provide the default + gateway for a container. The endpoint with the highest priority will + be used. If multiple endpoints have the same priority, endpoints are + lexicographically sorted based on their network name, and the one + that sorts first is picked. + type: "integer" + format: "int64" + example: + - 10 + + # Operational data + NetworkID: + description: | + Unique ID of the network. + type: "string" + example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" + EndpointID: + description: | + Unique ID for the service endpoint in a Sandbox. + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for this network. + type: "string" + example: "172.17.0.1" + IPAddress: + description: | + IPv4 address. + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address. + type: "string" + example: "2001:db8:2::100" + GlobalIPv6Address: + description: | + Global IPv6 address. + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + type: "integer" + format: "int64" + example: 64 + DNSNames: + description: | + List of all DNS names an endpoint has on a specific network. This + list is based on the container name, network aliases, container short + ID, and hostname. + + These DNS names are non-fully qualified but can contain several dots. + You can get fully qualified DNS names by appending `.`. + For instance, if container name is `my.ctr` and the network is named + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + `my.ctr.testnet`. + type: array + items: + type: string + example: ["foobar", "server_x", "server_y", "my.ctr"] + + EndpointIPAMConfig: + description: | + EndpointIPAMConfig represents an endpoint's IPAM configuration. + type: "object" + x-nullable: true + properties: + IPv4Address: + type: "string" + example: "172.20.30.33" + IPv6Address: + type: "string" + example: "2001:db8:abcd::3033" + LinkLocalIPs: + type: "array" + items: + type: "string" + example: + - "169.254.34.68" + - "fe80::3468" + + PluginMount: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Source, Destination, Type, Options] + properties: + Name: + type: "string" + x-nullable: false + example: "some-mount" + Description: + type: "string" + x-nullable: false + example: "This is a mount that's used by the plugin." + Settable: + type: "array" + items: + type: "string" + Source: + type: "string" + example: "/var/lib/docker/plugins/" + Destination: + type: "string" + x-nullable: false + example: "/mnt/state" + Type: + type: "string" + x-nullable: false + example: "bind" + Options: + type: "array" + items: + type: "string" + example: + - "rbind" + - "rw" + + PluginDevice: + type: "object" + required: [Name, Description, Settable, Path] + x-nullable: false + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Path: + type: "string" + example: "/dev/fuse" + + PluginEnv: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "string" + + PluginInterfaceType: + type: "object" + x-nullable: false + required: [Prefix, Capability, Version] + properties: + Prefix: + type: "string" + x-nullable: false + Capability: + type: "string" + x-nullable: false + Version: + type: "string" + x-nullable: false + + PluginPrivilege: + description: | + Describes a permission the user has to accept upon installing + the plugin. + type: "object" + x-go-name: "PluginPrivilege" + properties: + Name: + type: "string" + example: "network" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - "host" + + Plugin: + description: "A plugin for the Engine API" + type: "object" + required: [Settings, Enabled, Config, Name] + properties: + Id: + type: "string" + example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: + type: "string" + x-nullable: false + example: "tiborvass/sample-volume-plugin" + Enabled: + description: + True if the plugin is running. False if the plugin is not running, + only installed. + type: "boolean" + x-nullable: false + example: true + Settings: + description: "Settings that can be modified by users." + type: "object" + x-nullable: false + required: [Args, Devices, Env, Mounts] + properties: + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + type: "string" + example: + - "DEBUG=0" + Args: + type: "array" + items: + type: "string" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PluginReference: + description: "plugin remote reference used to push/pull the plugin" + type: "string" + x-nullable: false + example: "localhost:5000/tiborvass/sample-volume-plugin:latest" + Config: + description: "The config of a plugin." + type: "object" + x-nullable: false + required: + - Description + - Documentation + - Interface + - Entrypoint + - WorkDir + - Network + - Linux + - PidHost + - PropagatedMount + - IpcHost + - Mounts + - Env + - Args + properties: + DockerVersion: + description: |- + Docker Version used to create the plugin. + + Depending on how the plugin was created, this field may be empty or omitted. + + Deprecated: this field is no longer set, and will be removed in the next API version. + type: "string" + x-nullable: false + x-omitempty: true + Description: + type: "string" + x-nullable: false + example: "A sample volume plugin for Docker" + Documentation: + type: "string" + x-nullable: false + example: "https://docs.docker.com/engine/extend/plugins/" + Interface: + description: "The interface between Docker and the plugin" + x-nullable: false + type: "object" + required: [Types, Socket] + properties: + Types: + type: "array" + items: + $ref: "#/definitions/PluginInterfaceType" + example: + - "docker.volumedriver/1.0" + Socket: + type: "string" + x-nullable: false + example: "plugins.sock" + ProtocolScheme: + type: "string" + example: "some.protocol/v1.0" + description: "Protocol to use for clients connecting to the plugin." + enum: + - "" + - "moby.plugins.http/v1" + Entrypoint: + type: "array" + items: + type: "string" + example: + - "/usr/bin/sample-volume-plugin" + - "/data" + WorkDir: + type: "string" + x-nullable: false + example: "/bin/" + User: + type: "object" + x-nullable: false + properties: + UID: + type: "integer" + format: "uint32" + example: 1000 + GID: + type: "integer" + format: "uint32" + example: 1000 + Network: + type: "object" + x-nullable: false + required: [Type] + properties: + Type: + x-nullable: false + type: "string" + example: "host" + Linux: + type: "object" + x-nullable: false + required: [Capabilities, AllowAllDevices, Devices] + properties: + Capabilities: + type: "array" + items: + type: "string" + example: + - "CAP_SYS_ADMIN" + - "CAP_SYSLOG" + AllowAllDevices: + type: "boolean" + x-nullable: false + example: false + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PropagatedMount: + type: "string" + x-nullable: false + example: "/mnt/volumes" + IpcHost: + type: "boolean" + x-nullable: false + example: false + PidHost: + type: "boolean" + x-nullable: false + example: false + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + $ref: "#/definitions/PluginEnv" + example: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" + Args: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + example: "args" + Description: + x-nullable: false + type: "string" + example: "command line arguments" + Settable: + type: "array" + items: + type: "string" + Value: + type: "array" + items: + type: "string" + rootfs: + type: "object" + properties: + type: + type: "string" + example: "layers" + diff_ids: + type: "array" + items: + type: "string" + example: + - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" + - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" + + ObjectVersion: + description: | + The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + type: "object" + properties: + Index: + type: "integer" + format: "uint64" + example: 373531 + + NodeSpec: + type: "object" + properties: + Name: + description: "Name for the node." + type: "string" + example: "my-node" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Role: + description: "Role of the node." + type: "string" + enum: + - "worker" + - "manager" + example: "manager" + Availability: + description: "Availability of the node." + type: "string" + enum: + - "active" + - "pause" + - "drain" + example: "active" + example: + Availability: "active" + Name: "node-name" + Role: "manager" + Labels: + foo: "bar" + + Node: + type: "object" + properties: + ID: + type: "string" + example: "24ifsmvkjbyhk" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/NodeSpec" + Description: + $ref: "#/definitions/NodeDescription" + Status: + $ref: "#/definitions/NodeStatus" + ManagerStatus: + $ref: "#/definitions/ManagerStatus" + + NodeDescription: + description: | + NodeDescription encapsulates the properties of the Node as reported by the + agent. + type: "object" + properties: + Hostname: + type: "string" + example: "bf3067039e47" + Platform: + $ref: "#/definitions/Platform" + Resources: + $ref: "#/definitions/ResourceObject" + Engine: + $ref: "#/definitions/EngineDescription" + TLSInfo: + $ref: "#/definitions/TLSInfo" + + Platform: + description: | + Platform represents the platform (Arch/OS). + type: "object" + properties: + Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). + type: "string" + example: "x86_64" + OS: + description: | + OS represents the Operating System (for example, `linux` or `windows`). + type: "string" + example: "linux" + + EngineDescription: + description: "EngineDescription provides information about an engine." + type: "object" + properties: + EngineVersion: + type: "string" + example: "17.06.0" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + - Type: "Log" + Name: "awslogs" + - Type: "Log" + Name: "fluentd" + - Type: "Log" + Name: "gcplogs" + - Type: "Log" + Name: "gelf" + - Type: "Log" + Name: "journald" + - Type: "Log" + Name: "json-file" + - Type: "Log" + Name: "splunk" + - Type: "Log" + Name: "syslog" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "host" + - Type: "Network" + Name: "ipvlan" + - Type: "Network" + Name: "macvlan" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + - Type: "Volume" + Name: "local" + - Type: "Volume" + Name: "localhost:5000/vieux/sshfs:latest" + - Type: "Volume" + Name: "vieux/sshfs:latest" + + TLSInfo: + description: | + Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + type: "object" + properties: + TrustRoot: + description: | + The root CA certificate(s) that are used to validate leaf TLS + certificates. + type: "string" + CertIssuerSubject: + description: + The base64-url-safe-encoded raw subject bytes of the issuer. + type: "string" + CertIssuerPublicKey: + description: | + The base64-url-safe-encoded raw public key bytes of the issuer. + type: "string" + example: + TrustRoot: | + -----BEGIN CERTIFICATE----- + MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw + EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 + MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf + 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB + Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO + PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz + pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H + -----END CERTIFICATE----- + CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" + CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + + NodeStatus: + description: | + NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + type: "object" + properties: + State: + $ref: "#/definitions/NodeState" + Message: + type: "string" + example: "" + Addr: + description: "IP address of the node." + type: "string" + example: "172.17.0.2" + + NodeState: + description: "NodeState represents the state of a node." + type: "string" + enum: + - "unknown" + - "down" + - "ready" + - "disconnected" + example: "ready" + + ManagerStatus: + description: | + ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + x-nullable: true + type: "object" + properties: + Leader: + type: "boolean" + default: false + example: true + Reachability: + $ref: "#/definitions/Reachability" + Addr: + description: | + The IP address and port at which the manager is reachable. + type: "string" + example: "10.0.0.46:2377" + + Reachability: + description: "Reachability represents the reachability of a node." + type: "string" + enum: + - "unknown" + - "unreachable" + - "reachable" + example: "reachable" + + SwarmSpec: + description: "User modifiable swarm configuration." + type: "object" + properties: + Name: + description: "Name of the swarm." + type: "string" + example: "default" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.corp.type: "production" + com.example.corp.department: "engineering" + Orchestration: + description: "Orchestration configuration." + type: "object" + x-nullable: true + properties: + TaskHistoryRetentionLimit: + description: | + The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + type: "integer" + format: "int64" + example: 10 + Raft: + description: "Raft configuration." + type: "object" + properties: + SnapshotInterval: + description: "The number of log entries between snapshots." + type: "integer" + format: "uint64" + example: 10000 + KeepOldSnapshots: + description: | + The number of snapshots to keep beyond the current snapshot. + type: "integer" + format: "uint64" + LogEntriesForSlowFollowers: + description: | + The number of log entries to keep around to sync up slow followers + after a snapshot is created. + type: "integer" + format: "uint64" + example: 500 + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 3 + HeartbeatTick: + description: | + The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 1 + Dispatcher: + description: "Dispatcher configuration." + type: "object" + x-nullable: true + properties: + HeartbeatPeriod: + description: | + The delay for an agent to send a heartbeat to the dispatcher. + type: "integer" + format: "int64" + example: 5000000000 + CAConfig: + description: "CA configuration." + type: "object" + x-nullable: true + properties: + NodeCertExpiry: + description: "The duration node certificates are issued for." + type: "integer" + format: "int64" + example: 7776000000000000 + ExternalCAs: + description: | + Configuration for forwarding signing requests to an external + certificate authority. + type: "array" + items: + type: "object" + properties: + Protocol: + description: | + Protocol for communication with the external CA (currently + only `cfssl` is supported). + type: "string" + enum: + - "cfssl" + default: "cfssl" + URL: + description: | + URL where certificate signing requests should be sent. + type: "string" + Options: + description: | + An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + type: "object" + additionalProperties: + type: "string" + CACert: + description: | + The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + type: "string" + SigningCACert: + description: | + The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + type: "string" + SigningCAKey: + description: | + The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + type: "string" + ForceRotate: + description: | + An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + format: "uint64" + type: "integer" + EncryptionConfig: + description: "Parameters related to encryption-at-rest." + type: "object" + properties: + AutoLockManagers: + description: | + If set, generate a key and use it to lock data stored on the + managers. + type: "boolean" + example: false + TaskDefaults: + description: "Defaults for creating tasks in this cluster." + type: "object" + properties: + LogDriver: + description: | + The log driver to use for tasks created in the orchestrator if + unspecified by a service. + + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. + type: "object" + properties: + Name: + description: | + The log driver to use as a default for new tasks. + type: "string" + example: "json-file" + Options: + description: | + Driver-specific options for the selected log driver, specified + as key/value pairs. + type: "object" + additionalProperties: + type: "string" + example: + "max-file": "10" + "max-size": "100m" + + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but + # without `JoinTokens`. + ClusterInfo: + description: | + ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + x-nullable: true + type: "object" + properties: + ID: + description: "The ID of the swarm." + type: "string" + example: "abajmipo7b4xz5ip2nrla6b11" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/SwarmSpec" + TLSInfo: + $ref: "#/definitions/TLSInfo" + RootRotationInProgress: + description: | + Whether there is currently a root CA rotation in progress for the swarm + type: "boolean" + example: false + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + type: "integer" + format: "uint32" + default: 4789 + example: 4789 + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global scope + networks. + type: "array" + items: + type: "string" + format: "CIDR" + example: ["10.10.0.0/16", "20.20.0.0/16"] + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + type: "integer" + format: "uint32" + maximum: 29 + default: 24 + example: 24 + + JoinTokens: + description: | + JoinTokens contains the tokens workers and managers need to join the swarm. + type: "object" + properties: + Worker: + description: | + The token workers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: + description: | + The token managers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + + Swarm: + type: "object" + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + $ref: "#/definitions/JoinTokens" + + TaskSpec: + description: "User modifiable task configuration." + type: "object" + properties: + PluginSpec: + type: "object" + description: | + Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Name: + description: "The name or 'alias' to use for the plugin." + type: "string" + Remote: + description: "The plugin image reference to use." + type: "string" + Disabled: + description: "Disable the plugin once scheduled." + type: "boolean" + PluginPrivilege: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + ContainerSpec: + type: "object" + description: | + Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Image: + description: "The image name to use for the container" + type: "string" + Labels: + description: "User-defined key/value data." + type: "object" + additionalProperties: + type: "string" + Command: + description: "The command to be run in the image." + type: "array" + items: + type: "string" + Args: + description: "Arguments to the command." + type: "array" + items: + type: "string" + Hostname: + description: | + The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + type: "string" + Env: + description: | + A list of environment variables in the form `VAR=value`. + type: "array" + items: + type: "string" + Dir: + description: "The working directory for commands to run in." + type: "string" + User: + description: "The user inside the container." + type: "string" + Groups: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + Privileges: + type: "object" + description: "Security options for the container" + properties: + CredentialSpec: + type: "object" + description: "CredentialSpec for managed service account (Windows only)" + properties: + Config: + type: "string" + example: "0bt9dmxjvjiqermk6xrop3ekq" + description: | + Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + File: + type: "string" + example: "spec.json" + description: | + Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + Registry: + type: "string" + description: | + Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + SELinuxContext: + type: "object" + description: "SELinux labels of the container" + properties: + Disable: + type: "boolean" + description: "Disable SELinux" + User: + type: "string" + description: "SELinux user label" + Role: + type: "string" + description: "SELinux role label" + Type: + type: "string" + description: "SELinux type label" + Level: + type: "string" + description: "SELinux level label" + Seccomp: + type: "object" + description: "Options for configuring seccomp on the container" + properties: + Mode: + type: "string" + enum: + - "default" + - "unconfined" + - "custom" + Profile: + description: "The custom seccomp profile as a json object" + type: "string" + AppArmor: + type: "object" + description: "Options for configuring AppArmor on the container" + properties: + Mode: + type: "string" + enum: + - "default" + - "disabled" + NoNewPrivileges: + type: "boolean" + description: "Configuration of the no_new_privs bit in the container" + + TTY: + description: "Whether a pseudo-TTY should be allocated." + type: "boolean" + OpenStdin: + description: "Open `stdin`" + type: "boolean" + ReadOnly: + description: "Mount the container's root filesystem as read only." + type: "boolean" + Mounts: + description: | + Specification for mounts to be added to containers created as part + of the service. + type: "array" + items: + $ref: "#/definitions/Mount" + StopSignal: + description: "Signal to stop the container." + type: "string" + StopGracePeriod: + description: | + Amount of time to wait for the container to terminate before + forcefully killing it. + type: "integer" + format: "int64" + HealthCheck: + $ref: "#/definitions/HealthConfig" + Hosts: + type: "array" + description: | + A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + items: + type: "string" + DNSConfig: + description: | + Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + type: "object" + properties: + Nameservers: + description: "The IP addresses of the name servers." + type: "array" + items: + type: "string" + Search: + description: "A search list for host-name lookup." + type: "array" + items: + type: "string" + Options: + description: | + A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + type: "array" + items: + type: "string" + Secrets: + description: | + Secrets contains references to zero or more secrets that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + SecretID: + description: | + SecretID represents the ID of the specific secret that we're + referencing. + type: "string" + SecretName: + description: | + SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + type: "string" + OomScoreAdj: + type: "integer" + format: "int64" + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 0 + Configs: + description: | + Configs contains references to zero or more configs that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + Runtime: + description: | + Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + type: "object" + ConfigID: + description: | + ConfigID represents the ID of the specific config that we're + referencing. + type: "string" + ConfigName: + description: | + ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + type: "string" + Isolation: + type: "string" + description: | + Isolation technology of the containers running the service. + (Windows only) + enum: + - "default" + - "process" + - "hyperv" + - "" + Init: + 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. + type: "boolean" + x-nullable: true + Sysctls: + description: | + Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + type: "object" + additionalProperties: + type: "string" + # This option is not used by Windows containers + CapabilityAdd: + type: "array" + description: | + A list of kernel capabilities to add to the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + - "CAP_SYS_ADMIN" + - "CAP_SYS_CHROOT" + - "CAP_SYSLOG" + CapabilityDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + Ulimits: + description: | + A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + NetworkAttachmentSpec: + description: | + Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + type: "object" + properties: + ContainerID: + description: "ID of the container represented by this task" + type: "string" + Resources: + description: | + Resource requirements which apply to each individual container created + as part of the service. + type: "object" + properties: + Limits: + description: "Define resources limits." + $ref: "#/definitions/Limit" + Reservations: + description: "Define resources reservation." + $ref: "#/definitions/ResourceObject" + RestartPolicy: + description: | + Specification for the restart policy which applies to containers + created as part of this service. + type: "object" + properties: + Condition: + description: "Condition for restart." + type: "string" + enum: + - "none" + - "on-failure" + - "any" + Delay: + description: "Delay between restart attempts." + type: "integer" + format: "int64" + MaxAttempts: + description: | + Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + type: "integer" + format: "int64" + default: 0 + Window: + description: | + Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + type: "integer" + format: "int64" + default: 0 + Placement: + type: "object" + properties: + Constraints: + description: | + An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + type: "array" + items: + type: "string" + example: + - "node.hostname!=node3.corp.example.com" + - "node.role!=manager" + - "node.labels.type==production" + - "node.platform.os==linux" + - "node.platform.arch==x86_64" + Preferences: + description: | + Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + type: "array" + items: + type: "object" + properties: + Spread: + type: "object" + properties: + SpreadDescriptor: + description: | + label descriptor, such as `engine.labels.az`. + type: "string" + example: + - Spread: + SpreadDescriptor: "node.labels.datacenter" + - Spread: + SpreadDescriptor: "node.labels.rack" + MaxReplicas: + description: | + Maximum number of replicas for per node (default value is 0, which + is unlimited) + type: "integer" + format: "int64" + default: 0 + Platforms: + description: | + Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + type: "array" + items: + $ref: "#/definitions/Platform" + ForceUpdate: + description: | + A counter that triggers an update even if no relevant parameters have + been changed. + type: "integer" + format: "uint64" + Runtime: + description: | + Runtime is the type of runtime specified for the task executor. + type: "string" + Networks: + description: "Specifies which networks the service should attach to." + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + LogDriver: + description: | + Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + + TaskState: + type: "string" + enum: + - "new" + - "allocated" + - "pending" + - "assigned" + - "accepted" + - "preparing" + - "ready" + - "starting" + - "running" + - "complete" + - "shutdown" + - "failed" + - "rejected" + - "remove" + - "orphaned" + + ContainerStatus: + type: "object" + description: "represents the status of a container." + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + + PortStatus: + type: "object" + description: "represents the port status of a task's host ports whose service has published host ports" + properties: + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + TaskStatus: + type: "object" + description: "represents the status of a task." + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + $ref: "#/definitions/ContainerStatus" + PortStatus: + $ref: "#/definitions/PortStatus" + + Task: + type: "object" + properties: + ID: + description: "The ID of the task." + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Name: + description: "Name of the task." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Spec: + $ref: "#/definitions/TaskSpec" + ServiceID: + description: "The ID of the service this task is part of." + type: "string" + Slot: + type: "integer" + NodeID: + description: "The ID of the node that this task is on." + type: "string" + AssignedGenericResources: + $ref: "#/definitions/GenericResources" + Status: + $ref: "#/definitions/TaskStatus" + DesiredState: + $ref: "#/definitions/TaskState" + JobIteration: + description: | + If the Service this Task belongs to is a job-mode service, contains + the JobIteration of the Service this Task was created for. Absent if + the Task was created for a Replicated or Global Service. + $ref: "#/definitions/ObjectVersion" + example: + ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + AssignedGenericResources: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + ServiceSpec: + description: "User modifiable configuration for a service." + type: object + properties: + Name: + description: "Name of the service." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + TaskTemplate: + $ref: "#/definitions/TaskSpec" + Mode: + description: "Scheduling mode for the service." + type: "object" + properties: + Replicated: + type: "object" + properties: + Replicas: + type: "integer" + format: "int64" + Global: + type: "object" + ReplicatedJob: + description: | + The mode used for services with a finite number of tasks that run + to a completed state. + type: "object" + properties: + MaxConcurrent: + description: | + The maximum number of replicas to run simultaneously. + type: "integer" + format: "int64" + default: 1 + TotalCompletions: + description: | + The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + type: "integer" + format: "int64" + GlobalJob: + description: | + The mode used for services which run a task to the completed state + on each valid node. + type: "object" + UpdateConfig: + description: "Specification for the update strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: "Amount of time between updates, in nanoseconds." + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an updated task fails to run, or stops running + during the update. + type: "string" + enum: + - "continue" + - "pause" + - "rollback" + Monitor: + description: | + Amount of time to monitor each updated task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + RollbackConfig: + description: "Specification for the rollback strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: | + Amount of time between rollback iterations, in nanoseconds. + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an rolled back task fails to run, or stops + running during the rollback. + type: "string" + enum: + - "continue" + - "pause" + Monitor: + description: | + Amount of time to monitor each rolled back task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + Networks: + description: | + Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + + EndpointSpec: + $ref: "#/definitions/EndpointSpec" + + EndpointPortConfig: + type: "object" + properties: + Name: + type: "string" + Protocol: + type: "string" + enum: + - "tcp" + - "udp" + - "sctp" + TargetPort: + description: "The port inside the container." + type: "integer" + PublishedPort: + description: "The port on the swarm hosts." + type: "integer" + PublishMode: + description: | + The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + type: "string" + enum: + - "ingress" + - "host" + default: "ingress" + example: "ingress" + + EndpointSpec: + description: "Properties that can be configured to access and load balance a service." + type: "object" + properties: + Mode: + description: | + The mode of resolution to use for internal load balancing between tasks. + type: "string" + enum: + - "vip" + - "dnsrr" + default: "vip" + Ports: + description: | + List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + Service: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" + Endpoint: + type: "object" + properties: + Spec: + $ref: "#/definitions/EndpointSpec" + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + VirtualIPs: + type: "array" + items: + type: "object" + properties: + NetworkID: + type: "string" + Addr: + type: "string" + UpdateStatus: + description: "The status of a service update." + type: "object" + properties: + State: + type: "string" + enum: + - "updating" + - "paused" + - "completed" + StartedAt: + type: "string" + format: "dateTime" + CompletedAt: + type: "string" + format: "dateTime" + Message: + type: "string" + ServiceStatus: + description: | + The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + type: "object" + properties: + RunningTasks: + description: | + The number of tasks for the service currently in the Running state. + type: "integer" + format: "uint64" + example: 7 + DesiredTasks: + description: | + The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + type: "integer" + format: "uint64" + example: 10 + CompletedTasks: + description: | + The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + type: "integer" + format: "uint64" + JobStatus: + description: | + The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + type: "object" + properties: + JobIteration: + description: | + JobIteration is a value increased each time a Job is executed, + successfully or otherwise. "Executed", in this case, means the + job as a whole has been started, not that an individual Task has + been launched. A job is "Executed" when its ServiceSpec is + updated. JobIteration can be used to disambiguate Tasks belonging + to different executions of a job. Though JobIteration will + increase with each subsequent execution, it may not necessarily + increase by 1, and so JobIteration should not be used to + $ref: "#/definitions/ObjectVersion" + LastExecution: + description: | + The last time, as observed by the server, that this job was + started. + type: "string" + format: "dateTime" + example: + ID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Version: + Index: 19 + CreatedAt: "2016-06-07T21:05:51.880065305Z" + UpdatedAt: "2016-06-07T21:07:29.962229872Z" + Spec: + Name: "hopeful_cori" + TaskTemplate: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.2/16" + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.3/16" + + ImageDeleteResponseItem: + type: "object" + x-go-name: "DeleteResponse" + properties: + Untagged: + description: "The image ID of an image that was untagged" + type: "string" + Deleted: + description: "The image ID of an image that was deleted" + type: "string" + + ServiceCreateResponse: + type: "object" + description: | + contains the information returned to a client on the + creation of a new service. + properties: + ID: + description: "The ID of the created service." + type: "string" + x-nullable: false + example: "ak7w3gjqoa3kuz8xcpnyy0pvl" + Warnings: + description: | + Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + type: "array" + x-nullable: true + items: + type: "string" + example: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + + ServiceUpdateResponse: + type: "object" + properties: + Warnings: + description: "Optional warning messages" + type: "array" + items: + type: "string" + example: + Warnings: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + + ContainerInspectResponse: + type: "object" + title: "ContainerInspectResponse" + x-go-name: "InspectResponse" + properties: + Id: + description: |- + The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). + type: "string" + x-go-name: "ID" + minLength: 64 + maxLength: 64 + pattern: "^[0-9a-fA-F]{64}$" + example: "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf" + Created: + description: |- + Date and time at which the container was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + x-nullable: true + example: "2025-02-17T17:43:39.64001363Z" + Path: + description: |- + The path to the command being run + type: "string" + example: "/bin/sh" + Args: + description: "The arguments to the command being run" + type: "array" + items: + type: "string" + example: + - "-c" + - "exit 9" + State: + $ref: "#/definitions/ContainerState" + Image: + description: |- + The ID (digest) of the image that this container was created from. + type: "string" + example: "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782" + ResolvConfPath: + description: |- + Location of the `/etc/resolv.conf` generated for the container on the + host. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: "string" + example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/resolv.conf" + HostnamePath: + description: |- + Location of the `/etc/hostname` generated for the container on the + host. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: "string" + example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hostname" + HostsPath: + description: |- + Location of the `/etc/hosts` generated for the container on the + host. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: "string" + example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hosts" + LogPath: + description: |- + Location of the file used to buffer the container's logs. Depending on + the logging-driver used for the container, this field may be omitted. + + This file is managed through the docker daemon, and should not be + accessed or modified by other tools. + type: "string" + x-nullable: true + example: "/var/lib/docker/containers/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59-json.log" + Name: + description: |- + The name associated with this container. + + For historic reasons, the name may be prefixed with a forward-slash (`/`). + type: "string" + example: "/funny_chatelet" + RestartCount: + description: |- + Number of times the container was restarted since it was created, + or since daemon was started. + type: "integer" + example: 0 + Driver: + description: |- + The storage-driver used for the container's filesystem (graph-driver + or snapshotter). + type: "string" + example: "overlayfs" + Platform: + description: |- + The platform (operating system) for which the container was created. + + This field was introduced for the experimental "LCOW" (Linux Containers + On Windows) features, which has been removed. In most cases, this field + is equal to the host's operating system (`linux` or `windows`). + type: "string" + example: "linux" + ImageManifestDescriptor: + $ref: "#/definitions/OCIDescriptor" + description: |- + OCI descriptor of the platform-specific manifest of the image + the container was created from. + + Note: Only available if the daemon provides a multi-platform + image store. + MountLabel: + description: |- + SELinux mount label set for the container. + type: "string" + example: "" + ProcessLabel: + description: |- + SELinux process label set for the container. + type: "string" + example: "" + AppArmorProfile: + description: |- + The AppArmor profile set for the container. + type: "string" + example: "" + ExecIDs: + description: |- + IDs of exec instances that are running in the container. + type: "array" + items: + type: "string" + x-nullable: true + example: + - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" + - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" + HostConfig: + $ref: "#/definitions/HostConfig" + GraphDriver: + $ref: "#/definitions/DriverData" + SizeRw: + description: |- + The size of files that have been created or changed by this container. + + This field is omitted by default, and only set when size is requested + in the API request. + type: "integer" + format: "int64" + x-nullable: true + example: "122880" + SizeRootFs: + description: |- + The total size of all files in the read-only layers from the image + that the container uses. These layers can be shared between containers. + + This field is omitted by default, and only set when size is requested + in the API request. + type: "integer" + format: "int64" + x-nullable: true + example: "1653948416" + Mounts: + description: |- + List of mounts used by the container. + type: "array" + items: + $ref: "#/definitions/MountPoint" + Config: + $ref: "#/definitions/ContainerConfig" + NetworkSettings: + $ref: "#/definitions/NetworkSettings" + + ContainerSummary: + type: "object" + properties: + Id: + description: |- + The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). + type: "string" + x-go-name: "ID" + minLength: 64 + maxLength: 64 + pattern: "^[0-9a-fA-F]{64}$" + example: "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf" + Names: + description: |- + The names associated with this container. Most containers have a single + name, but when using legacy "links", the container can have multiple + names. + + For historic reasons, names are prefixed with a forward-slash (`/`). + type: "array" + items: + type: "string" + example: + - "/funny_chatelet" + Image: + description: |- + The name or ID of the image used to create the container. + + This field shows the image reference as was specified when creating the container, + which can be in its canonical form (e.g., `docker.io/library/ubuntu:latest` + or `docker.io/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`), + short form (e.g., `ubuntu:latest`)), or the ID(-prefix) of the image (e.g., `72297848456d`). + + The content of this field can be updated at runtime if the image used to + create the container is untagged, in which case the field is updated to + contain the the image ID (digest) it was resolved to in its canonical, + non-truncated form (e.g., `sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`). + type: "string" + example: "docker.io/library/ubuntu:latest" + ImageID: + description: |- + The ID (digest) of the image that this container was created from. + type: "string" + example: "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782" + ImageManifestDescriptor: + $ref: "#/definitions/OCIDescriptor" + x-nullable: true + description: | + OCI descriptor of the platform-specific manifest of the image + the container was created from. + + Note: Only available if the daemon provides a multi-platform + image store. + + This field is not populated in the `GET /system/df` endpoint. + Command: + description: "Command to run when starting the container" + type: "string" + example: "/bin/bash" + Created: + description: |- + Date and time at which the container was created as a Unix timestamp + (number of seconds since EPOCH). + type: "integer" + format: "int64" + example: "1739811096" + Ports: + description: |- + Port-mappings for the container. + type: "array" + items: + $ref: "#/definitions/Port" + SizeRw: + description: |- + The size of files that have been created or changed by this container. + + This field is omitted by default, and only set when size is requested + in the API request. + type: "integer" + format: "int64" + x-nullable: true + example: "122880" + SizeRootFs: + description: |- + The total size of all files in the read-only layers from the image + that the container uses. These layers can be shared between containers. + + This field is omitted by default, and only set when size is requested + in the API request. + type: "integer" + format: "int64" + x-nullable: true + example: "1653948416" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + State: + description: | + The state of this container. + type: "string" + enum: + - "created" + - "running" + - "paused" + - "restarting" + - "exited" + - "removing" + - "dead" + example: "running" + Status: + description: |- + Additional human-readable status of this container (e.g. `Exit 0`) + type: "string" + example: "Up 4 days" + HostConfig: + type: "object" + description: |- + Summary of host-specific runtime information of the container. This + is a reduced set of information in the container's "HostConfig" as + available in the container "inspect" response. + properties: + NetworkMode: + description: |- + Networking mode (`host`, `none`, `container:`) or name of the + primary network the container is using. + + This field is primarily for backward compatibility. The container + can be connected to multiple networks for which information can be + found in the `NetworkSettings.Networks` field, which enumerates + settings per network. + type: "string" + example: "mynetwork" + Annotations: + description: |- + Arbitrary key-value metadata attached to the container. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + io.kubernetes.docker.type: "container" + io.kubernetes.sandbox.id: "3befe639bed0fd6afdd65fd1fa84506756f59360ec4adc270b0fdac9be22b4d3" + NetworkSettings: + description: |- + Summary of the container's network settings + type: "object" + properties: + Networks: + type: "object" + description: |- + Summary of network-settings for each network the container is + attached to. + additionalProperties: + $ref: "#/definitions/EndpointSettings" + Mounts: + type: "array" + description: |- + List of mounts used by the container. + items: + $ref: "#/definitions/MountPoint" + + Driver: + description: "Driver represents a driver (network, logging, secrets)." + type: "object" + required: [Name] + properties: + Name: + description: "Name of the driver." + type: "string" + x-nullable: false + example: "some-driver" + Options: + description: "Key/value map of driver-specific options." + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: + OptionA: "value for driver-specific option A" + OptionB: "value for driver-specific option B" + + SecretSpec: + type: "object" + properties: + Name: + description: "User-defined name of the secret." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Data: + description: | + Data is the data to store as a secret, formatted as a Base64-url-safe-encoded + ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + It must be empty if the Driver field is set, in which case the data is + loaded from an external secret store. The maximum allowed size is 500KB, + as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + type: "string" + example: "" + Driver: + description: | + Name of the secrets driver used to fetch the secret's value from an + external secret store. + $ref: "#/definitions/Driver" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Secret: + type: "object" + properties: + ID: + type: "string" + example: "blt1owaxmitz71s9v5zh81zun" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + Spec: + $ref: "#/definitions/SecretSpec" + + ConfigSpec: + type: "object" + properties: + Name: + description: "User-defined name of the config." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Data: + description: | + Data is the data to store as a config, formatted as a Base64-url-safe-encoded + ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. + The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). + type: "string" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Config: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ConfigSpec" + + ContainerState: + description: | + ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + type: "object" + x-nullable: true + properties: + Status: + description: | + String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + type: "string" + enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] + example: "running" + Running: + description: | + Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + type: "boolean" + example: true + Paused: + description: "Whether this container is paused." + type: "boolean" + example: false + Restarting: + description: "Whether this container is restarting." + type: "boolean" + example: false + OOMKilled: + description: | + Whether a process within this container has been killed because it ran + out of memory since the container was last started. + type: "boolean" + example: false + Dead: + type: "boolean" + example: false + Pid: + description: "The process ID of this container" + type: "integer" + example: 1234 + ExitCode: + description: "The last exit code of this container" + type: "integer" + example: 0 + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + example: "2020-01-06T09:06:59.461876391Z" + FinishedAt: + description: "The time when this container last exited." + type: "string" + example: "2020-01-06T09:07:59.461876391Z" + Health: + $ref: "#/definitions/Health" + + ContainerCreateResponse: + description: "OK response to ContainerCreate operation" + type: "object" + title: "ContainerCreateResponse" + x-go-name: "CreateResponse" + required: [Id, Warnings] + properties: + Id: + description: "The ID of the created container" + type: "string" + x-nullable: false + example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Warnings: + description: "Warnings encountered when creating the container" + type: "array" + x-nullable: false + items: + type: "string" + example: [] + + ContainerUpdateResponse: + type: "object" + title: "ContainerUpdateResponse" + x-go-name: "UpdateResponse" + description: |- + Response for a successful container-update. + properties: + Warnings: + type: "array" + description: |- + Warnings encountered when updating the container. + items: + type: "string" + example: ["Published ports are discarded when using host network mode"] + + ContainerStatsResponse: + description: | + Statistics sample for a container. + type: "object" + x-go-name: "StatsResponse" + title: "ContainerStatsResponse" + properties: + name: + description: "Name of the container" + type: "string" + x-nullable: true + example: "boring_wozniak" + id: + description: "ID of the container" + type: "string" + x-nullable: true + example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + read: + description: | + Date and time at which this sample was collected. + The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + with nano-seconds. + type: "string" + format: "date-time" + example: "2025-01-16T13:55:22.165243637Z" + preread: + description: | + Date and time at which this first sample was collected. This field + is not propagated if the "one-shot" option is set. If the "one-shot" + option is set, this field may be omitted, empty, or set to a default + date (`0001-01-01T00:00:00Z`). + + The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + with nano-seconds. + type: "string" + format: "date-time" + example: "2025-01-16T13:55:21.160452595Z" + pids_stats: + $ref: "#/definitions/ContainerPidsStats" + blkio_stats: + $ref: "#/definitions/ContainerBlkioStats" + num_procs: + description: | + The number of processors on the system. + + This field is Windows-specific and always zero for Linux containers. + type: "integer" + format: "uint32" + example: 16 + storage_stats: + $ref: "#/definitions/ContainerStorageStats" + cpu_stats: + $ref: "#/definitions/ContainerCPUStats" + precpu_stats: + $ref: "#/definitions/ContainerCPUStats" + memory_stats: + $ref: "#/definitions/ContainerMemoryStats" + networks: + description: | + Network statistics for the container per interface. + + This field is omitted if the container has no networking enabled. + x-nullable: true + additionalProperties: + $ref: "#/definitions/ContainerNetworkStats" + example: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + + ContainerBlkioStats: + description: | + BlkioStats stores all IO service stats for data read and write. + + This type is Linux-specific and holds many fields that are specific to cgroups v1. + On a cgroup v2 host, all fields other than `io_service_bytes_recursive` + are omitted or `null`. + + This type is only populated on Linux and omitted for Windows containers. + type: "object" + x-go-name: "BlkioStats" + x-nullable: true + properties: + io_service_bytes_recursive: + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_serviced_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_queue_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_service_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_wait_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_merged_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + io_time_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + sectors_recursive: + description: | + This field is only available when using Linux containers with + cgroups v1. It is omitted or `null` when using cgroups v2. + x-nullable: true + type: "array" + items: + $ref: "#/definitions/ContainerBlkioStatEntry" + example: + io_service_bytes_recursive: [ + {"major": 254, "minor": 0, "op": "read", "value": 7593984}, + {"major": 254, "minor": 0, "op": "write", "value": 100} + ] + io_serviced_recursive: null + io_queue_recursive: null + io_service_time_recursive: null + io_wait_time_recursive: null + io_merged_recursive: null + io_time_recursive: null + sectors_recursive: null + + ContainerBlkioStatEntry: + description: | + Blkio stats entry. + + This type is Linux-specific and omitted for Windows containers. + type: "object" + x-go-name: "BlkioStatEntry" + x-nullable: true + properties: + major: + type: "integer" + format: "uint64" + example: 254 + minor: + type: "integer" + format: "uint64" + example: 0 + op: + type: "string" + example: "read" + value: + type: "integer" + format: "uint64" + example: 7593984 + + ContainerCPUStats: + description: | + CPU related info of the container + type: "object" + x-go-name: "CPUStats" + x-nullable: true + properties: + cpu_usage: + $ref: "#/definitions/ContainerCPUUsage" + system_cpu_usage: + description: | + System Usage. + + This field is Linux-specific and omitted for Windows containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 5 + online_cpus: + description: | + Number of online CPUs. + + This field is Linux-specific and omitted for Windows containers. + type: "integer" + format: "uint32" + x-nullable: true + example: 5 + throttling_data: + $ref: "#/definitions/ContainerThrottlingData" + + ContainerCPUUsage: + description: | + All CPU stats aggregated since container inception. + type: "object" + x-go-name: "CPUUsage" + x-nullable: true + properties: + total_usage: + description: | + Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows). + type: "integer" + format: "uint64" + example: 29912000 + percpu_usage: + description: | + Total CPU time (in nanoseconds) consumed per core (Linux). + + This field is Linux-specific when using cgroups v1. It is omitted + when using cgroups v2 and Windows containers. + type: "array" + x-nullable: true + items: + type: "integer" + format: "uint64" + example: 29912000 + + usage_in_kernelmode: + description: | + Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux), + or time spent (in 100's of nanoseconds) by all container processes in + kernel mode (Windows). + + Not populated for Windows containers using Hyper-V isolation. + type: "integer" + format: "uint64" + example: 21994000 + usage_in_usermode: + description: | + Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux), + or time spent (in 100's of nanoseconds) by all container processes in + kernel mode (Windows). + + Not populated for Windows containers using Hyper-V isolation. + type: "integer" + format: "uint64" + example: 7918000 + + ContainerPidsStats: + description: | + PidsStats contains Linux-specific stats of a container's process-IDs (PIDs). + + This type is Linux-specific and omitted for Windows containers. + type: "object" + x-go-name: "PidsStats" + x-nullable: true + properties: + current: + description: | + Current is the number of PIDs in the cgroup. + type: "integer" + format: "uint64" + x-nullable: true + example: 5 + limit: + description: | + Limit is the hard limit on the number of pids in the cgroup. + A "Limit" of 0 means that there is no limit. + type: "integer" + format: "uint64" + x-nullable: true + example: "18446744073709551615" + + ContainerThrottlingData: + description: | + CPU throttling stats of the container. + + This type is Linux-specific and omitted for Windows containers. + type: "object" + x-go-name: "ThrottlingData" + x-nullable: true + properties: + periods: + description: | + Number of periods with throttling active. + type: "integer" + format: "uint64" + example: 0 + throttled_periods: + description: | + Number of periods when the container hit its throttling limit. + type: "integer" + format: "uint64" + example: 0 + throttled_time: + description: | + Aggregated time (in nanoseconds) the container was throttled for. + type: "integer" + format: "uint64" + example: 0 + + ContainerMemoryStats: + description: | + Aggregates all memory stats since container inception on Linux. + Windows returns stats for commit and private working set only. + type: "object" + x-go-name: "MemoryStats" + properties: + usage: + description: | + Current `res_counter` usage for memory. + + This field is Linux-specific and omitted for Windows containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + max_usage: + description: | + Maximum usage ever recorded. + + This field is Linux-specific and only supported on cgroups v1. + It is omitted when using cgroups v2 and for Windows containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + stats: + description: | + All the stats exported via memory.stat. when using cgroups v2. + + This field is Linux-specific and omitted for Windows containers. + type: "object" + additionalProperties: + type: "integer" + format: "uint64" + x-nullable: true + example: + { + "active_anon": 1572864, + "active_file": 5115904, + "anon": 1572864, + "anon_thp": 0, + "file": 7626752, + "file_dirty": 0, + "file_mapped": 2723840, + "file_writeback": 0, + "inactive_anon": 0, + "inactive_file": 2510848, + "kernel_stack": 16384, + "pgactivate": 0, + "pgdeactivate": 0, + "pgfault": 2042, + "pglazyfree": 0, + "pglazyfreed": 0, + "pgmajfault": 45, + "pgrefill": 0, + "pgscan": 0, + "pgsteal": 0, + "shmem": 0, + "slab": 1180928, + "slab_reclaimable": 725576, + "slab_unreclaimable": 455352, + "sock": 0, + "thp_collapse_alloc": 0, + "thp_fault_alloc": 1, + "unevictable": 0, + "workingset_activate": 0, + "workingset_nodereclaim": 0, + "workingset_refault": 0 + } + failcnt: + description: | + Number of times memory usage hits limits. + + This field is Linux-specific and only supported on cgroups v1. + It is omitted when using cgroups v2 and for Windows containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + limit: + description: | + This field is Linux-specific and omitted for Windows containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 8217579520 + commitbytes: + description: | + Committed bytes. + + This field is Windows-specific and omitted for Linux containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + commitpeakbytes: + description: | + Peak committed bytes. + + This field is Windows-specific and omitted for Linux containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + privateworkingset: + description: | + Private working set. + + This field is Windows-specific and omitted for Linux containers. + type: "integer" + format: "uint64" + x-nullable: true + example: 0 + + ContainerNetworkStats: + description: | + Aggregates the network stats of one container + type: "object" + x-go-name: "NetworkStats" + x-nullable: true + properties: + rx_bytes: + description: | + Bytes received. Windows and Linux. + type: "integer" + format: "uint64" + example: 5338 + rx_packets: + description: | + Packets received. Windows and Linux. + type: "integer" + format: "uint64" + example: 36 + rx_errors: + description: | + Received errors. Not used on Windows. + + This field is Linux-specific and always zero for Windows containers. + type: "integer" + format: "uint64" + example: 0 + rx_dropped: + description: | + Incoming packets dropped. Windows and Linux. + type: "integer" + format: "uint64" + example: 0 + tx_bytes: + description: | + Bytes sent. Windows and Linux. + type: "integer" + format: "uint64" + example: 1200 + tx_packets: + description: | + Packets sent. Windows and Linux. + type: "integer" + format: "uint64" + example: 12 + tx_errors: + description: | + Sent errors. Not used on Windows. + + This field is Linux-specific and always zero for Windows containers. + type: "integer" + format: "uint64" + example: 0 + tx_dropped: + description: | + Outgoing packets dropped. Windows and Linux. + type: "integer" + format: "uint64" + example: 0 + endpoint_id: + description: | + Endpoint ID. Not used on Linux. + + This field is Windows-specific and omitted for Linux containers. + type: "string" + x-nullable: true + instance_id: + description: | + Instance ID. Not used on Linux. + + This field is Windows-specific and omitted for Linux containers. + type: "string" + x-nullable: true + + ContainerStorageStats: + description: | + StorageStats is the disk I/O stats for read/write on Windows. + + This type is Windows-specific and omitted for Linux containers. + type: "object" + x-go-name: "StorageStats" + x-nullable: true + properties: + read_count_normalized: + type: "integer" + format: "uint64" + x-nullable: true + example: 7593984 + read_size_bytes: + type: "integer" + format: "uint64" + x-nullable: true + example: 7593984 + write_count_normalized: + type: "integer" + format: "uint64" + x-nullable: true + example: 7593984 + write_size_bytes: + type: "integer" + format: "uint64" + x-nullable: true + example: 7593984 + + ContainerTopResponse: + type: "object" + x-go-name: "TopResponse" + title: "ContainerTopResponse" + description: |- + Container "top" response. + properties: + Titles: + description: "The ps column titles" + type: "array" + items: + type: "string" + example: + Titles: + - "UID" + - "PID" + - "PPID" + - "C" + - "STIME" + - "TTY" + - "TIME" + - "CMD" + Processes: + description: |- + Each process running in the container, where each process + is an array of values corresponding to the titles. + type: "array" + items: + type: "array" + items: + type: "string" + example: + Processes: + - + - "root" + - "13642" + - "882" + - "0" + - "17:03" + - "pts/0" + - "00:00:00" + - "/bin/bash" + - + - "root" + - "13735" + - "13642" + - "0" + - "17:06" + - "pts/0" + - "00:00:00" + - "sleep 10" + + ContainerWaitResponse: + description: "OK response to ContainerWait operation" + type: "object" + x-go-name: "WaitResponse" + title: "ContainerWaitResponse" + required: [StatusCode] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + format: "int64" + x-nullable: false + Error: + $ref: "#/definitions/ContainerWaitExitError" + + ContainerWaitExitError: + description: "container waiting error, if any" + type: "object" + x-go-name: "WaitExitError" + properties: + Message: + description: "Details of an error" + type: "string" + + SystemVersion: + type: "object" + description: | + Response of Engine API: GET "/version" + properties: + Platform: + type: "object" + required: [Name] + properties: + Name: + type: "string" + Components: + type: "array" + description: | + Information about system components + items: + type: "object" + x-go-name: ComponentVersion + required: [Name, Version] + properties: + Name: + description: | + Name of the component + type: "string" + example: "Engine" + Version: + description: | + Version of the component + type: "string" + x-nullable: false + example: "27.0.1" + Details: + description: | + Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + type: "object" + x-nullable: true + Version: + description: "The version of the daemon" + type: "string" + example: "27.0.1" + ApiVersion: + description: | + The default (and highest) API version that is supported by the daemon + type: "string" + example: "1.47" + MinAPIVersion: + description: | + The minimum API version that is supported by the daemon + type: "string" + example: "1.24" + GitCommit: + description: | + The Git commit of the source code that was used to build the daemon + type: "string" + example: "48a66213fe" + GoVersion: + description: | + The version Go used to compile the daemon, and the version of the Go + runtime in use. + type: "string" + example: "go1.22.7" + Os: + description: | + The operating system that the daemon is running on ("linux" or "windows") + type: "string" + example: "linux" + Arch: + description: | + The architecture that the daemon is running on + type: "string" + example: "amd64" + KernelVersion: + description: | + The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + type: "string" + example: "6.8.0-31-generic" + Experimental: + description: | + Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + type: "boolean" + example: true + BuildTime: + description: | + The date and time that the daemon was compiled. + type: "string" + example: "2020-06-22T15:49:27.000000000+00:00" + + SystemInfo: + type: "object" + properties: + ID: + description: | + Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + type: "string" + example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + Containers: + description: "Total number of containers on the host." + type: "integer" + example: 14 + ContainersRunning: + description: | + Number of containers with status `"running"`. + type: "integer" + example: 3 + ContainersPaused: + description: | + Number of containers with status `"paused"`. + type: "integer" + example: 1 + ContainersStopped: + description: | + Number of containers with status `"stopped"`. + type: "integer" + example: 10 + Images: + description: | + Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + type: "integer" + example: 508 + Driver: + description: "Name of the storage driver in use." + type: "string" + example: "overlay2" + DriverStatus: + description: | + Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["Backing Filesystem", "extfs"] + - ["Supports d_type", "true"] + - ["Native Overlay Diff", "true"] + DockerRootDir: + description: | + Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + type: "string" + example: "/var/lib/docker" + Plugins: + $ref: "#/definitions/PluginsInfo" + MemoryLimit: + description: "Indicates if the host has memory limit support enabled." + type: "boolean" + example: true + SwapLimit: + description: "Indicates if the host has memory swap limit support enabled." + type: "boolean" + example: true + KernelMemoryTCP: + description: | + Indicates if the host has kernel memory TCP limit support enabled. This + field is omitted if not supported. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + + **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. + type: "boolean" + example: true + CpuCfsPeriod: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + type: "boolean" + example: true + CpuCfsQuota: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + type: "boolean" + example: true + CPUShares: + description: | + Indicates if CPU Shares limiting is supported by the host. + type: "boolean" + example: true + CPUSet: + description: | + Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + type: "boolean" + example: true + PidsLimit: + description: "Indicates if the host kernel has PID limit support enabled." + type: "boolean" + example: true + OomKillDisable: + description: "Indicates if OOM killer disable is supported on the host." + type: "boolean" + IPv4Forwarding: + description: "Indicates IPv4 forwarding is enabled." + type: "boolean" + example: true + Debug: + description: | + Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + type: "boolean" + example: true + NFd: + description: | + The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 64 + NGoroutines: + description: | + The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 174 + SystemTime: + description: | + Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + type: "string" + example: "2017-08-08T20:28:29.06202363Z" + LoggingDriver: + description: | + The logging driver to use as a default for new containers. + type: "string" + CgroupDriver: + description: | + The driver to use for managing cgroups. + type: "string" + enum: ["cgroupfs", "systemd", "none"] + default: "cgroupfs" + example: "cgroupfs" + CgroupVersion: + description: | + The version of the cgroup. + type: "string" + enum: ["1", "2"] + default: "1" + example: "1" + NEventsListener: + description: "Number of event listeners subscribed." + type: "integer" + example: 30 + KernelVersion: + description: | + Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + type: "string" + example: "6.8.0-31-generic" + OperatingSystem: + description: | + Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + type: "string" + example: "Ubuntu 24.04 LTS" + OSVersion: + description: | + Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + type: "string" + example: "24.04" + OSType: + description: | + Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: "string" + example: "linux" + Architecture: + description: | + Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: "string" + example: "x86_64" + NCPU: + description: | + The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + type: "integer" + example: 4 + MemTotal: + description: | + Total amount of physical memory available on the host, in bytes. + type: "integer" + format: "int64" + example: 2095882240 + + IndexServerAddress: + description: | + Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + default: "https://index.docker.io/v1/" + type: "string" + example: "https://index.docker.io/v1/" + RegistryConfig: + $ref: "#/definitions/RegistryServiceConfig" + GenericResources: + $ref: "#/definitions/GenericResources" + HttpProxy: + description: | + HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" + HttpsProxy: + description: | + HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" + NoProxy: + description: | + Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "*.local, 169.254/16" + Name: + description: "Hostname of the host." + type: "string" + example: "node5.corp.example.com" + Labels: + description: | + User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + type: "array" + items: + type: "string" + example: ["storage=ssd", "production"] + ExperimentalBuild: + description: | + Indicates if experimental features are enabled on the daemon. + type: "boolean" + example: true + ServerVersion: + description: | + Version string of the daemon. + type: "string" + example: "27.0.1" + Runtimes: + description: | + List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + type: "object" + additionalProperties: + $ref: "#/definitions/Runtime" + default: + runc: + path: "runc" + example: + runc: + path: "runc" + runc-master: + path: "/go/bin/runc" + custom: + path: "/usr/local/bin/my-oci-runtime" + runtimeArgs: ["--debug", "--systemd-cgroup=false"] + DefaultRuntime: + description: | + Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + type: "string" + default: "runc" + example: "runc" + Swarm: + $ref: "#/definitions/SwarmInfo" + LiveRestoreEnabled: + description: | + Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + type: "boolean" + default: false + example: false + Isolation: + description: | + Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + default: "default" + type: "string" + enum: + - "default" + - "hyperv" + - "process" + - "" + InitBinary: + description: | + Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "docker-init" + ContainerdCommit: + $ref: "#/definitions/Commit" + RuncCommit: + $ref: "#/definitions/Commit" + InitCommit: + $ref: "#/definitions/Commit" + SecurityOptions: + description: | + List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + type: "array" + items: + type: "string" + example: + - "name=apparmor" + - "name=seccomp,profile=default" + - "name=selinux" + - "name=userns" + - "name=rootless" + ProductLicense: + description: | + Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + type: "string" + example: "Community Engine" + DefaultAddressPools: + description: | + List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + type: "array" + items: + type: "object" + properties: + Base: + description: "The network address in CIDR format" + type: "string" + example: "10.10.0.0/16" + Size: + description: "The network pool size" + type: "integer" + example: "24" + FirewallBackend: + $ref: "#/definitions/FirewallInfo" + DiscoveredDevices: + description: | + List of devices discovered by device drivers. + + Each device includes information about its source driver, kind, name, + and additional driver-specific attributes. + type: "array" + items: + $ref: "#/definitions/DeviceInfo" + Warnings: + description: | + List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + type: "array" + items: + type: "string" + example: + - "WARNING: No memory limit support" + CDISpecDirs: + description: | + List of directories where (Container Device Interface) CDI + specifications are located. + + These specifications define vendor-specific modifications to an OCI + runtime specification for a container being created. + + An empty list indicates that CDI device injection is disabled. + + Note that since using CDI device injection requires the daemon to have + experimental enabled. For non-experimental daemons an empty list will + always be returned. + type: "array" + items: + type: "string" + example: + - "/etc/cdi" + - "/var/run/cdi" + Containerd: + $ref: "#/definitions/ContainerdInfo" + + ContainerdInfo: + description: | + Information for connecting to the containerd instance that is used by the daemon. + This is included for debugging purposes only. + type: "object" + x-nullable: true + properties: + Address: + description: "The address of the containerd socket." + type: "string" + example: "/run/containerd/containerd.sock" + Namespaces: + description: | + The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + type: "object" + properties: + Containers: + description: | + The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: "string" + default: "moby" + example: "moby" + Plugins: + description: | + The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: "string" + default: "plugins.moby" + example: "plugins.moby" + + FirewallInfo: + description: | + Information about the daemon's firewalling configuration. + + This field is currently only used on Linux, and omitted on other platforms. + type: "object" + x-nullable: true + properties: + Driver: + description: | + The name of the firewall backend driver. + type: "string" + example: "nftables" + Info: + description: | + Information about the firewall backend, provided as + "label" / "value" pairs. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["ReloadedAt", "2025-01-01T00:00:00Z"] + + # PluginsInfo is a temp struct holding Plugins name + # registered with docker daemon. It is used by Info struct + PluginsInfo: + description: | + Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + type: "object" + properties: + Volume: + description: "Names of available volume-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["local"] + Network: + description: "Names of available network-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] + Authorization: + description: "Names of available authorization plugins." + type: "array" + items: + type: "string" + example: ["img-authz-plugin", "hbm"] + Log: + description: "Names of available logging-drivers, and logging-driver plugins." + type: "array" + items: + type: "string" + example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "splunk", "syslog"] + + + RegistryServiceConfig: + description: | + RegistryServiceConfig stores daemon registry services configuration. + type: "object" + x-nullable: true + properties: + InsecureRegistryCIDRs: + description: | + List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`::1/128` and `127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + IndexConfigs: + type: "object" + additionalProperties: + $ref: "#/definitions/IndexInfo" + example: + "127.0.0.1:5000": + "Name": "127.0.0.1:5000" + "Mirrors": [] + "Secure": false + "Official": false + "[2001:db8:a0b:12f0::1]:80": + "Name": "[2001:db8:a0b:12f0::1]:80" + "Mirrors": [] + "Secure": false + "Official": false + "docker.io": + Name: "docker.io" + Mirrors: ["https://hub-mirror.corp.example.com:5000/"] + Secure: true + Official: true + "registry.internal.corp.example.com:3000": + Name: "registry.internal.corp.example.com:3000" + Mirrors: [] + Secure: false + Official: false + Mirrors: + description: | + List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://[2001:db8:a0b:12f0::1]/" + + IndexInfo: + description: + IndexInfo contains information about a registry. + type: "object" + x-nullable: true + properties: + Name: + description: | + Name of the registry, such as "docker.io". + type: "string" + example: "docker.io" + Mirrors: + description: | + List of mirrors, expressed as URIs. + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://registry-2.docker.io/" + - "https://registry-3.docker.io/" + Secure: + description: | + Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + type: "boolean" + example: true + Official: + description: | + Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + type: "boolean" + example: true + + Runtime: + description: | + Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtime. + + The runtime is invoked by the daemon via the `containerd` daemon. OCI + runtimes act as an interface to the Linux kernel namespaces, cgroups, + and SELinux. + type: "object" + properties: + path: + description: | + Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "/usr/local/bin/my-oci-runtime" + runtimeArgs: + description: | + List of command-line arguments to pass to the runtime when invoked. + type: "array" + x-nullable: true + items: + type: "string" + example: ["--debug", "--systemd-cgroup=false"] + status: + description: | + Information specific to the runtime. + + While this API specification does not define data provided by runtimes, + the following well-known properties may be provided by runtimes: + + `org.opencontainers.runtime-spec.features`: features structure as defined + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + in a JSON string representation. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.1.0\",\"...\":\"...\"}" + + Commit: + description: | + Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + type: "object" + properties: + ID: + description: "Actual commit ID of external tool." + type: "string" + example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" + + SwarmInfo: + description: | + Represents generic information about swarm. + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + default: "" + example: "k67qz4598weg5unwwffg6z1m1" + NodeAddr: + description: | + IP address at which this node can be reached by other nodes in the + swarm. + type: "string" + default: "" + example: "10.0.0.46" + LocalNodeState: + $ref: "#/definitions/LocalNodeState" + ControlAvailable: + type: "boolean" + default: false + example: true + Error: + type: "string" + default: "" + RemoteManagers: + description: | + List of ID's and addresses of other managers in the swarm. + type: "array" + default: null + x-nullable: true + items: + $ref: "#/definitions/PeerNode" + example: + - NodeID: "71izy0goik036k48jg985xnds" + Addr: "10.0.0.158:2377" + - NodeID: "79y6h1o4gv8n120drcprv5nmc" + Addr: "10.0.0.159:2377" + - NodeID: "k67qz4598weg5unwwffg6z1m1" + Addr: "10.0.0.46:2377" + Nodes: + description: "Total number of nodes in the swarm." + type: "integer" + x-nullable: true + example: 4 + Managers: + description: "Total number of managers in the swarm." + type: "integer" + x-nullable: true + example: 3 + Cluster: + $ref: "#/definitions/ClusterInfo" + + LocalNodeState: + description: "Current local status of this node." + type: "string" + default: "" + enum: + - "" + - "inactive" + - "pending" + - "active" + - "error" + - "locked" + example: "active" + + PeerNode: + description: "Represents a peer-node in the swarm" + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + Addr: + description: | + IP address and ports at which this node can be reached. + type: "string" + + NetworkAttachmentConfig: + description: | + Specifies how a service should be attached to a particular network. + type: "object" + properties: + Target: + description: | + The target network for attachment. Must be a network name or ID. + type: "string" + Aliases: + description: | + Discoverable alternate names for the service on this network. + type: "array" + items: + type: "string" + DriverOpts: + description: | + Driver attachment options for the network target. + type: "object" + additionalProperties: + type: "string" + + EventActor: + description: | + Actor describes something that generates events, like a container, network, + or a volume. + type: "object" + properties: + ID: + description: "The ID of the object emitting the event" + type: "string" + example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Attributes: + description: | + Various key/value attributes of the object, depending on its type. + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-label-value" + image: "alpine:latest" + name: "my-container" + + EventMessage: + description: | + EventMessage represents the information an event contains. + type: "object" + title: "SystemEventsResponse" + properties: + Type: + description: "The type of object emitting the event" + type: "string" + enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] + example: "container" + Action: + description: "The type of event" + type: "string" + example: "create" + Actor: + $ref: "#/definitions/EventActor" + scope: + description: | + Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + type: "string" + enum: ["local", "swarm"] + time: + description: "Timestamp of event" + type: "integer" + format: "int64" + example: 1629574695 + timeNano: + description: "Timestamp of event, with nanosecond accuracy" + type: "integer" + format: "int64" + example: 1629574695515050031 + + OCIDescriptor: + type: "object" + x-go-name: Descriptor + description: | + A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + properties: + mediaType: + description: | + The media type of the object this schema refers to. + type: "string" + example: "application/vnd.oci.image.manifest.v1+json" + digest: + description: | + The digest of the targeted content. + type: "string" + example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" + size: + description: | + The size in bytes of the blob. + type: "integer" + format: "int64" + example: 424 + urls: + description: |- + List of URLs from which this object MAY be downloaded. + type: "array" + items: + type: "string" + format: "uri" + x-nullable: true + annotations: + description: |- + Arbitrary metadata relating to the targeted content. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + "com.docker.official-images.bashbrew.arch": "amd64" + "org.opencontainers.image.base.digest": "sha256:0d0ef5c914d3ea700147da1bd050c59edb8bb12ca312f3800b29d7c8087eabd8" + "org.opencontainers.image.base.name": "scratch" + "org.opencontainers.image.created": "2025-01-27T00:00:00Z" + "org.opencontainers.image.revision": "9fabb4bad5138435b01857e2fe9363e2dc5f6a79" + "org.opencontainers.image.source": "https://git.launchpad.net/cloud-images/+oci/ubuntu-base" + "org.opencontainers.image.url": "https://hub.docker.com/_/ubuntu" + "org.opencontainers.image.version": "24.04" + data: + type: string + x-nullable: true + description: |- + Data is an embedding of the targeted content. This is encoded as a base64 + string when marshalled to JSON (automatically, by encoding/json). If + present, Data can be used directly to avoid fetching the targeted content. + example: null + platform: + $ref: "#/definitions/OCIPlatform" + artifactType: + description: |- + ArtifactType is the IANA media type of this artifact. + type: "string" + x-nullable: true + example: null + + OCIPlatform: + type: "object" + x-go-name: Platform + x-nullable: true + description: | + Describes the platform which the image in the manifest runs on, as defined + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + properties: + architecture: + description: | + The CPU architecture, for example `amd64` or `ppc64`. + type: "string" + example: "arm" + os: + description: | + The operating system, for example `linux` or `windows`. + type: "string" + example: "windows" + os.version: + description: | + Optional field specifying the operating system version, for example on + Windows `10.0.19041.1165`. + type: "string" + example: "10.0.19041.1165" + os.features: + description: | + Optional field specifying an array of strings, each listing a required + OS feature (for example on Windows `win32k`). + type: "array" + items: + type: "string" + example: + - "win32k" + variant: + description: | + Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + type: "string" + example: "v7" + + DistributionInspect: + type: "object" + x-go-name: DistributionInspect + title: "DistributionInspectResponse" + required: [Descriptor, Platforms] + description: | + Describes the result obtained from contacting the registry to retrieve + image metadata. + properties: + Descriptor: + $ref: "#/definitions/OCIDescriptor" + Platforms: + type: "array" + description: | + An array containing all platforms supported by the image. + items: + $ref: "#/definitions/OCIPlatform" + + ClusterVolume: + type: "object" + description: | + Options and information specific to, and only present on, Swarm CSI + cluster volumes. + properties: + ID: + type: "string" + description: | + The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ClusterVolumeSpec" + Info: + type: "object" + description: | + Information about the global status of the volume. + properties: + CapacityBytes: + type: "integer" + format: "int64" + description: | + The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + VolumeContext: + type: "object" + description: | + A map of strings to strings returned from the storage plugin when + the volume is created. + additionalProperties: + type: "string" + VolumeID: + type: "string" + description: | + The ID of the volume as returned by the CSI storage plugin. This + is distinct from the volume's ID as provided by Docker. This ID + is never used by the user when communicating with Docker to refer + to this volume. If the ID is blank, then the Volume has not been + successfully created in the plugin yet. + AccessibleTopology: + type: "array" + description: | + The topology this volume is actually accessible from. + items: + $ref: "#/definitions/Topology" + PublishStatus: + type: "array" + description: | + The status of the volume as it pertains to its publishing and use on + specific nodes + items: + type: "object" + properties: + NodeID: + type: "string" + description: | + The ID of the Swarm node the volume is published on. + State: + type: "string" + description: | + The published state of the volume. + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + enum: + - "pending-publish" + - "published" + - "pending-node-unpublish" + - "pending-controller-unpublish" + PublishContext: + type: "object" + description: | + A map of strings to strings returned by the CSI controller + plugin when a volume is published. + additionalProperties: + type: "string" + + ClusterVolumeSpec: + type: "object" + description: | + Cluster-specific options used to create the volume. + properties: + Group: + type: "string" + description: | + Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + AccessMode: + type: "object" + description: | + Defines how the volume is used by tasks. + properties: + Scope: + type: "string" + description: | + The set of nodes this volume can be used on at one time. + - `single` The volume may only be scheduled to one node at a time. + - `multi` the volume may be scheduled to any supported number of nodes at a time. + default: "single" + enum: ["single", "multi"] + x-nullable: false + Sharing: + type: "string" + description: | + The number and way that different tasks can use this volume + at one time. + - `none` The volume may only be used by one task at a time. + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + - `all` The volume may have any number of readers and writers. + default: "none" + enum: ["none", "readonly", "onewriter", "all"] + x-nullable: false + MountVolume: + type: "object" + description: | + Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + Secrets: + type: "array" + description: | + Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + items: + type: "object" + description: | + One cluster volume secret entry. Defines a key-value pair that + is passed to the plugin. + properties: + Key: + type: "string" + description: | + Key is the name of the key of the key-value pair passed to + the plugin. + Secret: + type: "string" + description: | + Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + AccessibilityRequirements: + type: "object" + description: | + Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + properties: + Requisite: + type: "array" + description: | + A list of required topologies, at least one of which the + volume must be accessible from. + items: + $ref: "#/definitions/Topology" + Preferred: + type: "array" + description: | + A list of topologies that the volume should attempt to be + provisioned in. + items: + $ref: "#/definitions/Topology" + CapacityRange: + type: "object" + description: | + The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + properties: + RequiredBytes: + type: "integer" + format: "int64" + description: | + The volume must be at least this big. The value of 0 + indicates an unspecified minimum + LimitBytes: + type: "integer" + format: "int64" + description: | + The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + Availability: + type: "string" + description: | + The availability of the volume for use in tasks. + - `active` The volume is fully available for scheduling on the cluster + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + default: "active" + x-nullable: false + enum: + - "active" + - "pause" + - "drain" + + Topology: + description: | + A map of topological domains to topological segments. For in depth + details, see documentation for the Topology object in the CSI + specification. + type: "object" + additionalProperties: + type: "string" + + ImageManifestSummary: + x-go-name: "ManifestSummary" + description: | + ImageManifestSummary represents a summary of an image manifest. + type: "object" + required: ["ID", "Descriptor", "Available", "Size", "Kind"] + properties: + ID: + description: | + ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + Descriptor: + $ref: "#/definitions/OCIDescriptor" + Available: + description: Indicates whether all the child content (image config, layers) is fully available locally. + type: "boolean" + example: true + Size: + type: "object" + x-nullable: false + required: ["Content", "Total"] + properties: + Total: + type: "integer" + format: "int64" + example: 8213251 + description: | + Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + Content: + description: | + Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + type: "integer" + format: "int64" + example: 3987495 + Kind: + type: "string" + example: "image" + enum: + - "image" + - "attestation" + - "unknown" + description: | + The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + ImageData: + description: | + The image data for the image manifest. + This field is only populated when Kind is "image". + type: "object" + x-nullable: true + x-omitempty: true + required: ["Platform", "Containers", "Size", "UnpackedSize"] + properties: + Platform: + $ref: "#/definitions/OCIPlatform" + description: | + OCI platform of the image. This will be the platform specified in the + manifest descriptor from the index/manifest list. + If it's not available, it will be obtained from the image config. + Containers: + description: | + The IDs of the containers that are using this image. + type: "array" + items: + type: "string" + example: ["ede54ee1fda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c7430", "abadbce344c096744d8d6071a90d474d28af8f1034b5ea9fb03c3f4bfc6d005e"] + Size: + type: "object" + x-nullable: false + required: ["Unpacked"] + properties: + Unpacked: + type: "integer" + format: "int64" + example: 3987495 + description: | + Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + AttestationData: + description: | + The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + type: "object" + x-nullable: true + x-omitempty: true + required: ["For"] + properties: + For: + description: | + The digest of the image manifest that this attestation is for. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + +paths: + /containers/json: + get: + summary: "List containers" + description: | + Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + operationId: "ContainerList" + produces: + - "application/json" + parameters: + - name: "all" + in: "query" + description: | + Return all containers. By default, only running containers are shown. + type: "boolean" + default: false + - name: "limit" + in: "query" + description: | + Return this number of most recently created containers, including + non-running ones. + type: "integer" + - name: "size" + in: "query" + description: | + Return the size of container as fields `SizeRw` and `SizeRootFs`. + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + Filters to process on the container list, encoded as JSON (a + `map[string][]string`). For example, `{"status": ["paused"]}` will + only return paused containers. + + Available filters: + + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) + - `exited=` containers with exit code of `` + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + - `id=` a container's ID + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `is-task=`(`true`|`false`) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) + - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `volume`=(`` or ``) + type: "string" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/create: + post: + summary: "Create a container" + operationId: "ContainerCreate" + consumes: + - "application/json" + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "name" + in: "query" + description: | + Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + type: "string" + pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" + - name: "platform" + in: "query" + description: | + Platform in the format `os[/arch[/variant]]` used for image lookup. + + When specified, the daemon checks if the requested image is present + in the local image cache with the given OS and Architecture, and + otherwise returns a `404` status. + + If the option is not set, the host's native OS and Architecture are + used to look up the image in the image cache. However, if no platform + is passed and the given image does exist in the local image cache, + but its OS or architecture does not match, the container is created + with the available image, and a warning is added to the `Warnings` + field in the response, for example; + + WARNING: The requested image's platform (linux/arm64/v8) does not + match the detected host platform (linux/amd64) and no + specific platform was requested + + type: "string" + default: "" + - name: "body" + in: "body" + description: "Container to create" + schema: + allOf: + - $ref: "#/definitions/ContainerConfig" + - type: "object" + properties: + HostConfig: + $ref: "#/definitions/HostConfig" + NetworkingConfig: + $ref: "#/definitions/NetworkingConfig" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - "FOO=bar" + - "BAZ=quux" + Cmd: + - "date" + Entrypoint: "" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: "12:34:56:78:9a:bc" + ExposedPorts: + 22/tcp: {} + StopSignal: "SIGTERM" + StopTimeout: 10 + HostConfig: + Binds: + - "/tmp:/tmp" + Links: + - "redis3:redis" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0,1" + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + DeviceRequests: + - Driver: "nvidia" + Count: -1 + DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] + Capabilities: [["gpu", "nvidia", "compute"]] + Options: + property1: "string" + property2: "string" + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: 0 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - "8.8.8.8" + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - "parent" + - "other:ro" + CapAdd: + - "NET_ADMIN" + CapDrop: + - "MKNOD" + GroupAdd: + - "newgroup" + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: "bridge" + Devices: [] + Ulimits: + - {} + LogConfig: + Type: "json-file" + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + database_nw: {} + + required: true + responses: + 201: + description: "Container created successfully" + schema: + $ref: "#/definitions/ContainerCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/{id}/json: + get: + summary: "Inspect a container" + description: "Return low-level information about a container." + operationId: "ContainerInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ContainerInspectResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "size" + in: "query" + type: "boolean" + default: false + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" + tags: ["Container"] + /containers/{id}/top: + get: + summary: "List processes running inside a container" + description: | + On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + operationId: "ContainerTop" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ContainerTopResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "ps_args" + in: "query" + description: "The arguments to pass to `ps`. For example, `aux`" + type: "string" + default: "-ef" + tags: ["Container"] + /containers/{id}/logs: + get: + summary: "Get container logs" + description: | + Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + operationId: "ContainerLogs" + responses: + 200: + description: | + logs returned as a stream in response body. + For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + Note that unlike the attach endpoint, the logs endpoint does not + upgrade the connection and does not set Content-Type. + schema: + type: "string" + format: "binary" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "until" + in: "query" + description: "Only return logs before this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Container"] + /containers/{id}/changes: + get: + summary: "Get changes on a container’s filesystem" + description: | + Returns which files in a container's filesystem have been added, deleted, + or modified. The `Kind` of modification can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + operationId: "ContainerChanges" + produces: ["application/json"] + responses: + 200: + description: "The list of changes" + schema: + type: "array" + items: + $ref: "#/definitions/FilesystemChange" + examples: + application/json: + - Path: "/dev" + Kind: 0 + - Path: "/dev/kmsg" + Kind: 1 + - Path: "/test" + Kind: 1 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/export: + get: + summary: "Export a container" + description: "Export the contents of a container as a tarball." + operationId: "ContainerExport" + produces: + - "application/octet-stream" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/stats: + get: + summary: "Get container stats based on resource usage" + description: | + This endpoint returns a live stream of a container’s resource usage + statistics. + + The `precpu_stats` is the CPU statistic of the *previous* read, and is + used to calculate the CPU usage percentage. It is not an exact copy + of the `cpu_stats` field. + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + nil then for compatibility with older daemons the length of the + corresponding `cpu_usage.percpu_usage` array should be used. + + On a cgroup v2 host, the following fields are not set + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + * `cpu_stats`: `cpu_usage.percpu_usage` + * `memory_stats`: `max_usage` and `failcnt` + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + To calculate the values shown by the `stats` command of the docker cli tool + the following formulas can be used: + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + * available_memory = `memory_stats.limit` + * Memory usage % = `(used_memory / available_memory) * 100.0` + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + operationId: "ContainerStats" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ContainerStatsResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "stream" + in: "query" + description: | + Stream the output. If false, the stats will be output once and then + it will disconnect. + type: "boolean" + default: true + - name: "one-shot" + in: "query" + description: | + Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/resize: + post: + summary: "Resize a container TTY" + description: "Resize the TTY for a container." + operationId: "ContainerResize" + consumes: + - "application/octet-stream" + produces: + - "text/plain" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "cannot resize container" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Container"] + /containers/{id}/start: + post: + summary: "Start a container" + operationId: "ContainerStart" + responses: + 204: + description: "no error" + 304: + description: "container already started" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + type: "string" + tags: ["Container"] + /containers/{id}/stop: + post: + summary: "Stop a container" + operationId: "ContainerStop" + responses: + 204: + description: "no error" + 304: + description: "container already stopped" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/restart: + post: + summary: "Restart a container" + operationId: "ContainerRestart" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/kill: + post: + summary: "Kill a container" + description: | + Send a POSIX signal to a container, defaulting to killing to the + container. + operationId: "ContainerKill" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is not running" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + default: "SIGKILL" + tags: ["Container"] + /containers/{id}/update: + post: + summary: "Update a container" + description: | + Change various configuration options of a container without having to + recreate it. + operationId: "ContainerUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "The container has been updated." + schema: + $ref: "#/definitions/ContainerUpdateResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "update" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpusetCpus: "0,1" + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + RestartPolicy: + MaximumRetryCount: 4 + Name: "on-failure" + tags: ["Container"] + /containers/{id}/rename: + post: + summary: "Rename a container" + operationId: "ContainerRename" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "name already in use" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "name" + in: "query" + required: true + description: "New name for the container" + type: "string" + tags: ["Container"] + /containers/{id}/pause: + post: + summary: "Pause a container" + description: | + Use the freezer cgroup to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. + operationId: "ContainerPause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/unpause: + post: + summary: "Unpause a container" + description: "Resume a container which has been paused." + operationId: "ContainerUnpause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/attach: + post: + summary: "Attach to a container" + description: | + Attach to a container to read its output or send it input. You can attach + to the same container multiple times and you can reattach to containers + that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint + to do anything. + + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used + for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client + can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will + similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream + and the stream over the hijacked connected is multiplexed to separate out + `stdout` and `stderr`. The stream consists of a series of frames, each + containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or + `stderr`). It also contains the size of the associated frame encoded in + the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + encoded as big endian. + + Following the header is the payload, which is the specified number of + bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream is not multiplexed. The data exchanged over the hijacked + connection is simply the raw data from the process PTY and client's + `stdin`. + + operationId: "ContainerAttach" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,` or `_`. + type: "string" + - name: "logs" + in: "query" + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you + want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. + type: "boolean" + default: false + - name: "stream" + in: "query" + description: | + Stream attached streams from the time the request was made onwards. + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/attach/ws: + get: + summary: "Attach to a container via a websocket" + operationId: "ContainerAttachWebsocket" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,`, or `_`. + type: "string" + - name: "logs" + in: "query" + description: "Return logs" + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Return stream" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/wait: + post: + summary: "Wait for a container" + description: "Block until a container stops, then returns the exit code." + operationId: "ContainerWait" + produces: ["application/json"] + responses: + 200: + description: "The container has exit." + schema: + $ref: "#/definitions/ContainerWaitResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "condition" + in: "query" + description: | + Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. + type: "string" + enum: + - "not-running" + - "next-exit" + - "removed" + default: "not-running" + tags: ["Container"] + /containers/{id}: + delete: + summary: "Remove a container" + operationId: "ContainerDelete" + responses: + 204: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: | + You cannot remove a running container: c2ada9df5af8. Stop the + container before attempting removal or force remove + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "v" + in: "query" + description: "Remove anonymous volumes associated with the container." + type: "boolean" + default: false + - name: "force" + in: "query" + description: "If the container is running, kill it before removing it." + type: "boolean" + default: false + - name: "link" + in: "query" + description: "Remove the specified link associated with the container." + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/archive: + head: + summary: "Get information about files in a container" + description: | + A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + operationId: "ContainerArchiveInfo" + responses: + 200: + description: "no error" + headers: + X-Docker-Container-Path-Stat: + type: "string" + description: | + A base64 - encoded JSON object with some filesystem header + information about the path + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + get: + summary: "Get an archive of a filesystem resource in a container" + description: "Get a tar archive of a resource in the filesystem of container id." + operationId: "ContainerArchive" + produces: ["application/x-tar"] + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + put: + summary: "Extract an archive of files or folders to a directory in a container" + description: | + Upload a tar archive to be extracted to a path in the filesystem of container id. + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + will be returned with message "not a directory". + operationId: "PutContainerArchive" + consumes: ["application/x-tar", "application/octet-stream"] + responses: + 200: + description: "The content was extracted successfully" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "not a directory" + 403: + description: "Permission denied, the volume or container rootfs is marked as read-only." + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such container or path does not exist inside the container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Path to a directory in the container to extract the archive’s contents into. " + type: "string" + - name: "noOverwriteDirNonDir" + in: "query" + description: | + If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + type: "string" + - name: "copyUIDGID" + in: "query" + description: | + If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + type: "string" + - name: "inputStream" + in: "body" + required: true + description: | + The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + schema: + type: "string" + format: "binary" + tags: ["Container"] + /containers/prune: + post: + summary: "Delete stopped containers" + produces: + - "application/json" + operationId: "ContainerPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ContainerPruneResponse" + properties: + ContainersDeleted: + description: "Container IDs that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /images/json: + get: + summary: "List Images" + description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." + operationId: "ImageList" + produces: + - "application/json" + responses: + 200: + description: "Summary image data for the images matching the query" + schema: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "all" + in: "query" + description: "Show all images. Only images from a final layer (no children) are shown by default." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. + + Available filters: + + - `before`=(`[:]`, `` or ``) + - `dangling=true` + - `label=key` or `label="key=value"` of an image label + - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) + - `until=` + type: "string" + - name: "shared-size" + in: "query" + description: "Compute and show shared size as a `SharedSize` field on each image." + type: "boolean" + default: false + - name: "digests" + in: "query" + description: "Show digest information as a `RepoDigests` field on each image." + type: "boolean" + default: false + - name: "manifests" + in: "query" + description: "Include `Manifests` in the image summary." + type: "boolean" + default: false + tags: ["Image"] + /build: + post: + summary: "Build an image" + description: | + Build an image from a tar archive with a `Dockerfile` in it. + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: "ImageBuild" + consumes: + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "inputStream" + in: "body" + description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + format: "binary" + - name: "dockerfile" + in: "query" + description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." + type: "string" + default: "Dockerfile" + - name: "t" + in: "query" + description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." + type: "string" + - name: "extrahosts" + in: "query" + description: "Extra hosts to add to /etc/hosts" + type: "string" + - name: "remote" + in: "query" + description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." + type: "string" + - name: "q" + in: "query" + description: "Suppress verbose build output." + type: "boolean" + default: false + - name: "nocache" + in: "query" + description: "Do not use the cache when building the image." + type: "boolean" + default: false + - name: "cachefrom" + in: "query" + description: "JSON array of images used for build cache resolution." + type: "string" + - name: "pull" + in: "query" + description: "Attempt to pull the image even if an older image exists locally." + type: "string" + - name: "rm" + in: "query" + description: "Remove intermediate containers after a successful build." + type: "boolean" + default: true + - name: "forcerm" + in: "query" + description: "Always remove intermediate containers, even upon failure." + type: "boolean" + default: false + - name: "memory" + in: "query" + description: "Set memory limit for build." + type: "integer" + - name: "memswap" + in: "query" + description: "Total memory (memory + swap). Set as `-1` to disable swap." + type: "integer" + - name: "cpushares" + in: "query" + description: "CPU shares (relative weight)." + type: "integer" + - name: "cpusetcpus" + in: "query" + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." + type: "string" + - name: "cpuperiod" + in: "query" + description: "The length of a CPU period in microseconds." + type: "integer" + - name: "cpuquota" + in: "query" + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + - name: "buildargs" + in: "query" + 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. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the + query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + type: "string" + - name: "shmsize" + in: "query" + description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." + type: "integer" + - name: "squash" + in: "query" + description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" + type: "boolean" + - name: "labels" + in: "query" + description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." + type: "string" + - name: "networkmode" + in: "query" + description: | + Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. + type: "string" + - name: "Content-type" + in: "header" + type: "string" + enum: + - "application/x-tar" + default: "application/x-tar" + - name: "X-Registry-Config" + in: "header" + description: | + This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + type: "string" + - name: "platform" + in: "query" + description: "Platform in the format os[/arch[/variant]]" + type: "string" + default: "" + - name: "target" + in: "query" + description: "Target build stage" + type: "string" + default: "" + - name: "outputs" + in: "query" + description: "BuildKit output configuration" + type: "string" + default: "" + - name: "version" + in: "query" + type: "string" + default: "1" + enum: ["1", "2"] + description: | + Version of the builder backend to use. + + - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) + - `2` is [BuildKit](https://github.com/moby/buildkit) + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /build/prune: + post: + summary: "Delete builder cache" + produces: + - "application/json" + operationId: "BuildPrune" + parameters: + - name: "keep-storage" + in: "query" + description: | + Amount of disk space in bytes to keep for cache + + > **Deprecated**: This parameter is deprecated and has been renamed to "reserved-space". + > It is kept for backward compatibility and will be removed in API v1.49. + type: "integer" + format: "int64" + - name: "reserved-space" + in: "query" + description: "Amount of disk space in bytes to keep for cache" + type: "integer" + format: "int64" + - name: "max-used-space" + in: "query" + description: "Maximum amount of disk space allowed to keep for cache" + type: "integer" + format: "int64" + - name: "min-free-space" + in: "query" + description: "Target amount of free disk space after pruning" + type: "integer" + format: "int64" + - name: "all" + in: "query" + type: "boolean" + description: "Remove all types of build cache" + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the list of build cache objects. + + Available filters: + + - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. + - `id=` + - `parent=` + - `type=` + - `description=` + - `inuse` + - `shared` + - `private` + responses: + 200: + description: "No error" + schema: + type: "object" + title: "BuildPruneResponse" + properties: + CachesDeleted: + type: "array" + items: + description: "ID of build cache object" + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /images/create: + post: + summary: "Create an image" + description: "Pull or import an image." + operationId: "ImageCreate" + consumes: + - "text/plain" + - "application/octet-stream" + produces: + - "application/json" + responses: + 200: + description: "no error" + 404: + description: "repository does not exist or no read access" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "fromImage" + in: "query" + description: | + Name of the image to pull. If the name includes a tag or digest, specific behavior applies: + + - If only `fromImage` includes a tag, that tag is used. + - If both `fromImage` and `tag` are provided, `tag` takes precedence. + - If `fromImage` includes a digest, the image is pulled by digest, and `tag` is ignored. + - If neither a tag nor digest is specified, all tags are pulled. + type: "string" + - name: "fromSrc" + in: "query" + description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." + type: "string" + - name: "repo" + in: "query" + description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." + type: "string" + - name: "tag" + in: "query" + description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." + type: "string" + - name: "message" + in: "query" + description: "Set commit message for imported image." + type: "string" + - name: "inputImage" + in: "body" + description: "Image content if the value `-` has been specified in fromSrc query parameter" + schema: + type: "string" + required: false + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "changes" + in: "query" + description: | + Apply `Dockerfile` instructions to the image that is created, + for example: `changes=ENV DEBUG=true`. + Note that `ENV DEBUG=true` should be URI component encoded. + + Supported `Dockerfile` instructions: + `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + type: "array" + items: + type: "string" + - name: "platform" + in: "query" + description: | + Platform in the format os[/arch[/variant]]. + + When used in combination with the `fromImage` option, the daemon checks + if the given image is present in the local image cache with the given + OS and Architecture, and otherwise attempts to pull the image. If the + option is not set, the host's native OS and Architecture are used. + If the given image does not exist in the local image cache, the daemon + attempts to pull the image with the host's native OS and Architecture. + If the given image does exists in the local image cache, but its OS or + architecture does not match, a warning is produced. + + When used with the `fromSrc` option to import an image from an archive, + this option sets the platform information for the imported image. If + the option is not set, the host's native OS and Architecture are used + for the imported image. + type: "string" + default: "" + tags: ["Image"] + /images/{name}/json: + get: + summary: "Inspect an image" + description: "Return low-level information about an image." + operationId: "ImageInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/ImageInspect" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + - name: "manifests" + in: "query" + description: "Include Manifests in the image summary." + type: "boolean" + default: false + required: false + tags: ["Image"] + /images/{name}/history: + get: + summary: "Get the history of an image" + description: "Return parent layers of an image." + operationId: "ImageHistory" + produces: ["application/json"] + responses: + 200: + description: "List of image layers" + schema: + type: "array" + items: + type: "object" + x-go-name: HistoryResponseItem + title: "HistoryResponseItem" + description: "individual image layer information in response to ImageHistory operation" + required: [Id, Created, CreatedBy, Tags, Size, Comment] + properties: + Id: + type: "string" + x-nullable: false + Created: + type: "integer" + format: "int64" + x-nullable: false + CreatedBy: + type: "string" + x-nullable: false + Tags: + type: "array" + items: + type: "string" + Size: + type: "integer" + format: "int64" + x-nullable: false + Comment: + type: "string" + x-nullable: false + examples: + application/json: + - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" + Tags: + - "ubuntu:lucid" + - "ubuntu:10.04" + Size: 182964289 + Comment: "" + - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" + Tags: [] + Size: 0 + Comment: "" + - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" + Created: 1371157430 + CreatedBy: "" + Tags: + - "scratch12:latest" + - "scratch:latest" + Size: 0 + Comment: "Imported from -" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "platform" + type: "string" + in: "query" + description: | + JSON-encoded OCI platform to select the platform-variant. + If omitted, it defaults to any locally available platform, + prioritizing the daemon's host platform. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to show the history for. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + tags: ["Image"] + /images/{name}/push: + post: + summary: "Push an image" + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: "ImagePush" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + Name of the image to push. For example, `registry.example.com/myimage`. + The image must be present in the local image store with the same name. + + The name should be provided without tag; if a tag is provided, it + is ignored. For example, `registry.example.com/myimage:latest` is + considered equivalent to `registry.example.com/myimage`. + + Use the `tag` parameter to specify the tag to push. + type: "string" + required: true + - name: "tag" + in: "query" + description: | + Tag of the image to push. For example, `latest`. If no tag is provided, + all tags of the given image that are present in the local image store + are pushed. + type: "string" + - name: "platform" + type: "string" + in: "query" + description: | + JSON-encoded OCI platform to select the platform-variant to push. + If not provided, all available variants will attempt to be pushed. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to push to the registry. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + required: true + tags: ["Image"] + /images/{name}/tag: + post: + summary: "Tag an image" + description: "Tag an image so that it becomes part of a repository." + operationId: "ImageTag" + responses: + 201: + description: "No error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID to tag." + type: "string" + required: true + - name: "repo" + in: "query" + description: "The repository to tag in. For example, `someuser/someimage`." + type: "string" + - name: "tag" + in: "query" + description: "The name of the new tag." + type: "string" + tags: ["Image"] + /images/{name}: + delete: + summary: "Remove an image" + description: | + Remove an image, along with any untagged parent images that were + referenced by that image. + + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. + operationId: "ImageDelete" + produces: ["application/json"] + responses: + 200: + description: "The image was deleted successfully" + schema: + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + examples: + application/json: + - Untagged: "3e2f21a89f" + - Deleted: "3e2f21a89f" + - Deleted: "53b4f83ac9" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "force" + in: "query" + description: "Remove the image even if it is being used by stopped containers or has other tags" + type: "boolean" + default: false + - name: "noprune" + in: "query" + description: "Do not delete untagged parent images" + type: "boolean" + default: false + - name: "platforms" + in: "query" + description: | + Select platform-specific content to delete. + Multiple values are accepted. + Each platform is a OCI platform encoded as a JSON string. + type: "array" + items: + # This should be OCIPlatform + # but $ref is not supported for array in query in Swagger 2.0 + # $ref: "#/definitions/OCIPlatform" + type: "string" + tags: ["Image"] + /images/search: + get: + summary: "Search images" + description: "Search for an image on Docker Hub." + operationId: "ImageSearch" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + title: "ImageSearchResponseItem" + properties: + description: + type: "string" + is_official: + type: "boolean" + is_automated: + description: | + Whether this repository has automated builds enabled. + +


+ + > **Deprecated**: This field is deprecated and will always be "false". + type: "boolean" + example: false + name: + type: "string" + star_count: + type: "integer" + examples: + application/json: + - description: "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!" + is_official: true + is_automated: false + name: "alpine" + star_count: 10093 + - description: "Busybox base image." + is_official: true + is_automated: false + name: "Busybox base image." + star_count: 3037 + - description: "The PostgreSQL object-relational database system provides reliability and data integrity." + is_official: true + is_automated: false + name: "postgres" + star_count: 12408 + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "term" + in: "query" + description: "Term to search" + type: "string" + required: true + - name: "limit" + in: "query" + description: "Maximum number of results to return" + type: "integer" + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. + type: "string" + tags: ["Image"] + /images/prune: + post: + summary: "Delete unused images" + produces: + - "application/json" + operationId: "ImagePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ImagePruneResponse" + properties: + ImagesDeleted: + description: "Images that were deleted" + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /auth: + post: + summary: "Check auth configuration" + description: | + Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + operationId: "SystemAuth" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "An identity token was generated successfully." + schema: + type: "object" + title: "SystemAuthResponse" + required: [Status] + properties: + Status: + description: "The status of the authentication" + type: "string" + x-nullable: false + IdentityToken: + description: "An opaque token used to authenticate a user after a successful login" + type: "string" + x-nullable: false + examples: + application/json: + Status: "Login Succeeded" + IdentityToken: "9cbaf023786cd7..." + 204: + description: "No error" + 401: + description: "Auth error" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "authConfig" + in: "body" + description: "Authentication to check" + schema: + $ref: "#/definitions/AuthConfig" + tags: ["System"] + /info: + get: + summary: "Get system information" + operationId: "SystemInfo" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/SystemInfo" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /version: + get: + summary: "Get version" + description: "Returns the version of Docker that is running and various information about the system that Docker is running on." + operationId: "SystemVersion" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/SystemVersion" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /_ping: + get: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPing" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "OK" + headers: + Api-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: | + Default version of docker image builder + + The default on Linux is version "2" (BuildKit), but the daemon + can be configured to recommend version "1" (classic Builder). + Windows does not yet support BuildKit for native Windows images, + and uses "1" (classic builder) as a default. + + This value is a recommendation as advertised by the daemon, and + it is up to the client to choose which builder to use. + default: "2" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Swarm: + type: "string" + enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + default: "inactive" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + headers: + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + tags: ["System"] + head: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPingHead" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "(empty)" + headers: + Api-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: "Default version of docker image builder" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Swarm: + type: "string" + enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + default: "inactive" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /commit: + post: + summary: "Create a new image from a container" + operationId: "ImageCommit" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IDResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "containerConfig" + in: "body" + description: "The container configuration" + schema: + $ref: "#/definitions/ContainerConfig" + - name: "container" + in: "query" + description: "The ID or name of the container to commit" + type: "string" + - name: "repo" + in: "query" + description: "Repository name for the created image" + type: "string" + - name: "tag" + in: "query" + description: "Tag name for the create image" + type: "string" + - name: "comment" + in: "query" + description: "Commit message" + type: "string" + - name: "author" + in: "query" + description: "Author of the image (e.g., `John Hannibal Smith `)" + type: "string" + - name: "pause" + in: "query" + description: "Whether to pause the container before committing" + type: "boolean" + default: true + - name: "changes" + in: "query" + description: "`Dockerfile` instructions to apply while committing" + type: "string" + tags: ["Image"] + /events: + get: + summary: "Monitor events" + description: | + Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` + + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` + + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` + + The Docker daemon reports these events: `reload` + + Services report these events: `create`, `update`, and `remove` + + Nodes report these events: `create`, `update`, and `remove` + + Secrets report these events: `create`, `update`, and `remove` + + Configs report these events: `create`, `update`, and `remove` + + The Builder reports `prune` events + + operationId: "SystemEvents" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/EventMessage" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "since" + in: "query" + description: "Show events created since this timestamp then stream new events." + type: "string" + - name: "until" + in: "query" + description: "Show events created until this timestamp then stop streaming." + type: "string" + - name: "filters" + in: "query" + description: | + A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `config=` config name or ID + - `container=` container name or ID + - `daemon=` daemon name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `network=` network name or ID + - `node=` node ID + - `plugin`= plugin name or ID + - `scope`= local or swarm + - `secret=` secret name or ID + - `service=` service name or ID + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + - `volume=` volume name + type: "string" + tags: ["System"] + /system/df: + get: + summary: "Get data usage information" + operationId: "SystemDataUsage" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "SystemDataUsageResponse" + properties: + LayersSize: + type: "integer" + format: "int64" + Images: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + Containers: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + Volumes: + type: "array" + items: + $ref: "#/definitions/Volume" + BuildCache: + type: "array" + items: + $ref: "#/definitions/BuildCache" + example: + LayersSize: 1092588 + Images: + - + Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + ParentId: "" + RepoTags: + - "busybox:latest" + RepoDigests: + - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + Labels: {} + Containers: 1 + Containers: + - + Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" + Names: + - "/top" + Image: "busybox" + ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + Command: "top" + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: "exited" + Status: "Exited (0) 56 minutes ago" + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" + EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" + Gateway: "172.18.0.1" + IPAddress: "172.18.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Mounts: [] + Volumes: + - + Name: "my-volume" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/my-volume/_data" + Labels: null + Scope: "local" + Options: null + UsageData: + Size: 10920104 + RefCount: 2 + BuildCache: + - + ID: "hw53o5aio51xtltp5xjp8v7fx" + Parents: [] + Type: "regular" + Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" + InUse: false + Shared: true + Size: 0 + CreatedAt: "2021-06-28T13:31:01.474619385Z" + LastUsedAt: "2021-07-07T22:02:32.738075951Z" + UsageCount: 26 + - + ID: "ndlpt0hhvkqcdfkputsk4cq9c" + Parents: ["ndlpt0hhvkqcdfkputsk4cq9c"] + Type: "regular" + Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" + InUse: false + Shared: true + Size: 51 + CreatedAt: "2021-06-28T13:31:03.002625487Z" + LastUsedAt: "2021-07-07T22:02:32.773909517Z" + UsageCount: 26 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "type" + in: "query" + description: | + Object types, for which to compute and return data. + type: "array" + collectionFormat: multi + items: + type: "string" + enum: ["container", "image", "volume", "build-cache"] + tags: ["System"] + /images/{name}/get: + get: + summary: "Export an image" + description: | + Get a tarball containing all images and metadata for a repository. + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + ### Image tarball format + + An image tarball contains [Content as defined in the OCI Image Layout Specification](https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#content). + + Additionally, includes the manifest.json file associated with a backwards compatible docker save format. + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + operationId: "ImageGet" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "platform" + type: "string" + in: "query" + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be saved if the image is + multi-platform. + If not provided, the full multi-platform image will be saved. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + tags: ["Image"] + /images/get: + get: + summary: "Export several images" + description: | + Get a tarball containing all images and metadata for several image + repositories. + + For each value of the `names` parameter: if it is a specific name and + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + returned; if it is an image ID, similarly only that image (and its parents) + are returned and there would be no names referenced in the 'repositories' + file for this image ID. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageGetAll" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "names" + in: "query" + description: "Image names to filter by" + type: "array" + items: + type: "string" + - name: "platform" + type: "string" + in: "query" + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be saved if the image is + multi-platform. + If not provided, the full multi-platform image will be saved. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + tags: ["Image"] + /images/load: + post: + summary: "Import images" + description: | + Load a set of images and tags into a repository. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageLoad" + consumes: + - "application/x-tar" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "imagesTarball" + in: "body" + description: "Tar archive containing images" + schema: + type: "string" + format: "binary" + - name: "quiet" + in: "query" + description: "Suppress progress details during load." + type: "boolean" + default: false + - name: "platform" + type: "string" + in: "query" + description: | + JSON encoded OCI platform describing a platform which will be used + to select a platform-specific image to be load if the image is + multi-platform. + If not provided, the full multi-platform image will be loaded. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + tags: ["Image"] + /containers/{id}/exec: + post: + summary: "Create an exec instance" + description: "Run a command inside a running container." + operationId: "ContainerExec" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IDResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is paused" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execConfig" + in: "body" + description: "Exec configuration" + schema: + type: "object" + title: "ExecConfig" + properties: + AttachStdin: + type: "boolean" + description: "Attach to `stdin` of the exec command." + AttachStdout: + type: "boolean" + description: "Attach to `stdout` of the exec command." + AttachStderr: + type: "boolean" + description: "Attach to `stderr` of the exec command." + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array." + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + example: [80, 64] + DetachKeys: + type: "string" + description: | + Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + Env: + description: | + A list of environment variables in the form `["VAR=value", ...]`. + type: "array" + items: + type: "string" + Cmd: + type: "array" + description: "Command to run, as a string or array of strings." + items: + type: "string" + Privileged: + type: "boolean" + description: "Runs the exec process with extended privileges." + default: false + User: + type: "string" + description: | + The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + WorkingDir: + type: "string" + description: | + The working directory for the exec process inside the container. + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: "ctrl-p,ctrl-q" + Tty: false + Cmd: + - "date" + Env: + - "FOO=bar" + - "BAZ=quux" + required: true + - name: "id" + in: "path" + description: "ID or name of container" + type: "string" + required: true + tags: ["Exec"] + /exec/{id}/start: + post: + summary: "Start an exec instance" + description: | + Starts a previously set up exec instance. If detach is true, this endpoint + returns immediately after starting the command. Otherwise, it sets up an + interactive session with the command. + operationId: "ExecStart" + consumes: + - "application/json" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 200: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Container is stopped or paused" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execStartConfig" + in: "body" + schema: + type: "object" + title: "ExecStartConfig" + properties: + Detach: + type: "boolean" + description: "Detach from the command." + example: false + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + example: true + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array." + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + example: [80, 64] + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + /exec/{id}/resize: + post: + summary: "Resize an exec instance" + description: | + Resize the TTY session used by an exec instance. This endpoint only works + if `tty` was specified as part of creating and starting the exec instance. + operationId: "ExecResize" + responses: + 200: + description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Exec"] + /exec/{id}/json: + get: + summary: "Inspect an exec instance" + description: "Return low-level information about an exec instance." + operationId: "ExecInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ExecInspectResponse" + properties: + CanRemove: + type: "boolean" + DetachKeys: + type: "string" + ID: + type: "string" + Running: + type: "boolean" + ExitCode: + type: "integer" + ProcessConfig: + $ref: "#/definitions/ProcessConfig" + OpenStdin: + type: "boolean" + OpenStderr: + type: "boolean" + OpenStdout: + type: "boolean" + ContainerID: + type: "string" + Pid: + type: "integer" + description: "The system process ID for the exec process." + examples: + application/json: + CanRemove: false + ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" + DetachKeys: "" + ExitCode: 2 + ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - "-c" + - "exit 2" + entrypoint: "sh" + privileged: false + tty: true + user: "1000" + Running: false + Pid: 42000 + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + + /volumes: + get: + summary: "List volumes" + operationId: "VolumeList" + produces: ["application/json"] + responses: + 200: + description: "Summary volume data that matches the query" + schema: + $ref: "#/definitions/VolumeListResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. + type: "string" + format: "json" + tags: ["Volume"] + + /volumes/create: + post: + summary: "Create a volume" + operationId: "VolumeCreate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 201: + description: "The volume was created successfully" + schema: + $ref: "#/definitions/Volume" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "volumeConfig" + in: "body" + required: true + description: "Volume configuration" + schema: + $ref: "#/definitions/VolumeCreateOptions" + tags: ["Volume"] + + /volumes/{name}: + get: + summary: "Inspect a volume" + operationId: "VolumeInspect" + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Volume" + 404: + description: "No such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + put: + summary: | + "Update a volume. Valid only for Swarm cluster volumes" + operationId: "VolumeUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name or ID of the volume" + type: "string" + required: true + - name: "body" + in: "body" + schema: + # though the schema for is an object that contains only a + # ClusterVolumeSpec, wrapping the ClusterVolumeSpec in this object + # means that if, later on, we support things like changing the + # labels, we can do so without duplicating that information to the + # ClusterVolumeSpec. + type: "object" + description: "Volume configuration" + properties: + Spec: + $ref: "#/definitions/ClusterVolumeSpec" + description: | + The spec of the volume to update. Currently, only Availability may + change. All other fields must remain unchanged. + - name: "version" + in: "query" + description: | + The version number of the volume being updated. This is required to + avoid conflicting writes. Found in the volume's `ClusterVolume` + field. + type: "integer" + format: "int64" + required: true + tags: ["Volume"] + + delete: + summary: "Remove a volume" + description: "Instruct the driver to remove the volume." + operationId: "VolumeDelete" + responses: + 204: + description: "The volume was removed" + 404: + description: "No such volume or volume driver" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Volume is in use and cannot be removed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + - name: "force" + in: "query" + description: "Force the removal of the volume" + type: "boolean" + default: false + tags: ["Volume"] + + /volumes/prune: + post: + summary: "Delete unused volumes" + produces: + - "application/json" + operationId: "VolumePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "VolumePruneResponse" + properties: + VolumesDeleted: + description: "Volumes that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Volume"] + /networks: + get: + summary: "List networks" + description: | + Returns a list of networks. For details on the format, see the + [network inspect endpoint](#operation/NetworkInspect). + + Note that it uses a different, smaller representation of a network than + inspecting a single network. For example, the list of containers attached + to the network is not propagated in API versions 1.28 and up. + operationId: "NetworkList" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Network" + examples: + application/json: + - Name: "bridge" + Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" + Created: "2016-10-19T06:21:00.416543526Z" + Scope: "local" + Driver: "bridge" + EnableIPv4: true + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: + - + Subnet: "172.17.0.0/16" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + - Name: "none" + Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "null" + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + - Name: "host" + Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "host" + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to process + on the networks list. + + Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + type: "string" + tags: ["Network"] + + /networks/{id}: + get: + summary: "Inspect a network" + operationId: "NetworkInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Network" + 404: + description: "Network not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "verbose" + in: "query" + description: "Detailed inspect output for troubleshooting" + type: "boolean" + default: false + - name: "scope" + in: "query" + description: "Filter the network by scope (swarm, global, or local)" + type: "string" + tags: ["Network"] + + delete: + summary: "Remove a network" + operationId: "NetworkDelete" + responses: + 204: + description: "No error" + 403: + description: "operation not supported for pre-defined networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such network" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + /networks/create: + post: + summary: "Create a network" + operationId: "NetworkCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "Network created successfully" + schema: + $ref: "#/definitions/NetworkCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: | + Forbidden operation. This happens when trying to create a network named after a pre-defined network, + or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "plugin not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "networkConfig" + in: "body" + description: "Network configuration" + required: true + schema: + type: "object" + title: "NetworkCreateRequest" + required: ["Name"] + properties: + Name: + description: "The network's name." + type: "string" + example: "my_network" + Driver: + description: "Name of the network driver plugin to use." + type: "string" + default: "bridge" + example: "bridge" + Scope: + description: | + The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level). + type: "string" + Internal: + description: "Restrict external access to the network." + type: "boolean" + Attachable: + description: | + Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + type: "boolean" + example: true + Ingress: + description: | + Ingress network is the network which provides the routing-mesh + in swarm mode. + type: "boolean" + example: false + ConfigOnly: + description: | + Creates a config-only network. Config-only networks are placeholder + networks for network configurations to be used by other networks. + Config-only networks cannot be used directly to run containers + or services. + type: "boolean" + default: false + example: false + ConfigFrom: + description: | + Specifies the source which will provide the configuration for + this network. The specified network must be an existing + config-only network; see ConfigOnly. + $ref: "#/definitions/ConfigReference" + IPAM: + description: "Optional custom IP scheme for the network." + $ref: "#/definitions/IPAM" + EnableIPv4: + description: "Enable IPv4 on the network." + type: "boolean" + example: true + EnableIPv6: + description: "Enable IPv6 on the network." + type: "boolean" + example: true + Options: + description: "Network specific options to be used by the drivers." + type: "object" + additionalProperties: + type: "string" + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + tags: ["Network"] + + /networks/{id}/connect: + post: + summary: "Connect a container to a network" + description: "The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container" + operationId: "NetworkConnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "Operation forbidden" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + title: "NetworkConnectRequest" + properties: + Container: + type: "string" + description: "The ID or name of the container to connect to the network." + EndpointConfig: + $ref: "#/definitions/EndpointSettings" + example: + Container: "3613f73ba0e4" + EndpointConfig: + IPAMConfig: + IPv4Address: "172.24.56.89" + IPv6Address: "2001:db8::5689" + MacAddress: "02:42:ac:12:05:02" + Priority: 100 + tags: ["Network"] + + /networks/{id}/disconnect: + post: + summary: "Disconnect a container from a network" + operationId: "NetworkDisconnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + title: "NetworkDisconnectRequest" + properties: + Container: + type: "string" + description: | + The ID or name of the container to disconnect from the network. + Force: + type: "boolean" + description: | + Force the container to disconnect from the network. + tags: ["Network"] + /networks/prune: + post: + summary: "Delete unused networks" + produces: + - "application/json" + operationId: "NetworkPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "NetworkPruneResponse" + properties: + NetworksDeleted: + description: "Networks that were deleted" + type: "array" + items: + type: "string" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Network"] + /plugins: + get: + summary: "List plugins" + operationId: "PluginList" + description: "Returns information about installed plugins." + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Plugin" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + tags: ["Plugin"] + + /plugins/privileges: + get: + summary: "Get plugin privileges" + operationId: "GetPluginPrivileges" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: + - "Plugin" + + /plugins/pull: + post: + summary: "Install a plugin" + operationId: "PluginPull" + description: | + Pulls and installs a plugin. After the plugin is installed, it can be + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + produces: + - "application/json" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + Remote reference for plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "name" + in: "query" + description: | + Local name for the pulled plugin. + + The `:latest` tag is optional, and is used as the default if omitted. + required: false + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/{name}/json: + get: + summary: "Inspect a plugin" + operationId: "PluginInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: ["Plugin"] + /plugins/{name}: + delete: + summary: "Remove a plugin" + operationId: "PluginDelete" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "force" + in: "query" + description: | + Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + type: "boolean" + default: false + tags: ["Plugin"] + /plugins/{name}/enable: + post: + summary: "Enable a plugin" + operationId: "PluginEnable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "timeout" + in: "query" + description: "Set the HTTP client timeout (in seconds)" + type: "integer" + default: 0 + tags: ["Plugin"] + /plugins/{name}/disable: + post: + summary: "Disable a plugin" + operationId: "PluginDisable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "force" + in: "query" + description: | + Force disable a plugin even if still in use. + required: false + type: "boolean" + tags: ["Plugin"] + /plugins/{name}/upgrade: + post: + summary: "Upgrade a plugin" + operationId: "PluginUpgrade" + responses: + 204: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "remote" + in: "query" + description: | + Remote reference to upgrade to. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/create: + post: + summary: "Create a plugin" + operationId: "PluginCreate" + consumes: + - "application/x-tar" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "tarContext" + in: "body" + description: "Path to tar containing plugin rootfs and manifest" + schema: + type: "string" + format: "binary" + tags: ["Plugin"] + /plugins/{name}/push: + post: + summary: "Push a plugin" + operationId: "PluginPush" + description: | + Push a plugin to the registry. + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + responses: + 200: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /plugins/{name}/set: + post: + summary: "Configure a plugin" + operationId: "PluginSet" + consumes: + - "application/json" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + type: "string" + example: ["DEBUG=1"] + responses: + 204: + description: "No error" + 404: + description: "Plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /nodes: + get: + summary: "List nodes" + operationId: "NodeList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Node" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `node.label=` + - `role=`(`manager`|`worker`)` + type: "string" + tags: ["Node"] + /nodes/{id}: + get: + summary: "Inspect a node" + operationId: "NodeInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Node" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + tags: ["Node"] + delete: + summary: "Delete a node" + operationId: "NodeDelete" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + - name: "force" + in: "query" + description: "Force remove a node from the swarm" + default: false + type: "boolean" + tags: ["Node"] + /nodes/{id}/update: + post: + summary: "Update a node" + operationId: "NodeUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/NodeSpec" + - name: "version" + in: "query" + description: | + The version number of the node object being updated. This is required + to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Node"] + /swarm: + get: + summary: "Inspect swarm" + operationId: "SwarmInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Swarm" + 404: + description: "no such swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/init: + post: + summary: "Initialize a new swarm" + operationId: "SwarmInit" + produces: + - "application/json" + - "text/plain" + responses: + 200: + description: "no error" + schema: + description: "The node ID" + type: "string" + example: "7v2t30z9blmxuhnyo6s4cpenp" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmInitRequest" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + type: "string" + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + type: "integer" + format: "uint32" + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global + scope networks. + type: "array" + items: + type: "string" + example: ["10.10.0.0/16", "20.20.0.0/16"] + ForceNewCluster: + description: "Force creation of a new swarm." + type: "boolean" + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + type: "integer" + format: "uint32" + Spec: + $ref: "#/definitions/SwarmSpec" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + DataPathPort: 4789 + DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] + SubnetSize: 24 + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + tags: ["Swarm"] + /swarm/join: + post: + summary: "Join an existing swarm" + operationId: "SwarmJoin" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmJoinRequest" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + type: "string" + RemoteAddrs: + description: | + Addresses of manager nodes already participating in the swarm. + type: "array" + items: + type: "string" + JoinToken: + description: "Secret token for joining this swarm." + type: "string" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + DataPathAddr: "192.168.1.1" + RemoteAddrs: + - "node1:2377" + JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + tags: ["Swarm"] + /swarm/leave: + post: + summary: "Leave a swarm" + operationId: "SwarmLeave" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "force" + description: | + Force leave swarm, even if this is the last manager or that it will + break the cluster. + in: "query" + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/update: + post: + summary: "Update a swarm" + operationId: "SwarmUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + $ref: "#/definitions/SwarmSpec" + - name: "version" + in: "query" + description: | + The version number of the swarm object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + - name: "rotateWorkerToken" + in: "query" + description: "Rotate the worker join token." + type: "boolean" + default: false + - name: "rotateManagerToken" + in: "query" + description: "Rotate the manager join token." + type: "boolean" + default: false + - name: "rotateManagerUnlockKey" + in: "query" + description: "Rotate the manager unlock key." + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/unlockkey: + get: + summary: "Get the unlock key" + operationId: "SwarmUnlockkey" + consumes: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "UnlockKeyResponse" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/unlock: + post: + summary: "Unlock a locked manager" + operationId: "SwarmUnlock" + consumes: + - "application/json" + produces: + - "application/json" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmUnlockRequest" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /services: + get: + summary: "List services" + operationId: "ServiceList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Service" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: + + - `id=` + - `label=` + - `mode=["replicated"|"global"]` + - `name=` + - name: "status" + in: "query" + type: "boolean" + description: | + Include service status, with count of running and desired tasks. + tags: ["Service"] + /services/create: + post: + summary: "Create a service" + operationId: "ServiceCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/ServiceCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "network is not eligible for services" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "web" + TaskTemplate: + ContainerSpec: + Image: "nginx:alpine" + Mounts: + - + ReadOnly: true + Source: "web-data" + Target: "/usr/share/nginx/html" + Type: "volume" + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: "something-value" + Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] + User: "33" + DNSConfig: + Nameservers: ["8.8.8.8"] + Search: ["example.org"] + Options: ["timeout:3"] + Secrets: + - + File: + Name: "www.example.org.key" + UID: "33" + GID: "33" + Mode: 384 + SecretID: "fpjqlhnwb19zds35k8wn80lq9" + SecretName: "example_org_domain_key" + OomScoreAdj: 0 + LogDriver: + Name: "json-file" + Options: + max-file: "3" + max-size: "10M" + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: "on-failure" + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Ports: + - + Protocol: "tcp" + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: "bar" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + tags: ["Service"] + /services/{id}: + get: + summary: "Inspect a service" + operationId: "ServiceInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Service" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "insertDefaults" + in: "query" + description: "Fill empty fields with default values." + type: "boolean" + default: false + tags: ["Service"] + delete: + summary: "Delete a service" + operationId: "ServiceDelete" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: ["Service"] + /services/{id}/update: + post: + summary: "Update a service" + operationId: "ServiceUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ServiceUpdateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "top" + TaskTemplate: + ContainerSpec: + Image: "busybox" + Args: + - "top" + OomScoreAdj: 0 + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + + - name: "version" + in: "query" + description: | + The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + required: true + type: "integer" + - name: "registryAuthFrom" + in: "query" + description: | + If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + type: "string" + enum: ["spec", "previous-spec"] + default: "spec" + - name: "rollback" + in: "query" + description: | + Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + + tags: ["Service"] + /services/{id}/logs: + get: + summary: "Get service logs" + description: | + Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + operationId: "ServiceLogs" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such service: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the service" + type: "string" + - name: "details" + in: "query" + description: "Show service context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Service"] + /tasks: + get: + summary: "List tasks" + operationId: "TaskList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Task" + example: + - ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + - ID: "1yljwbmlr8er2waf8orvqpwms" + Version: + Index: 30 + CreatedAt: "2016-06-07T21:07:30.019104782Z" + UpdatedAt: "2016-06-07T21:07:30.231958098Z" + Name: "hopeful_cori" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:30.202183143Z" + State: "shutdown" + Message: "shutdown" + ContainerStatus: + ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" + DesiredState: "shutdown" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.5/16" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + + Available filters: + + - `desired-state=(running | shutdown | accepted)` + - `id=` + - `label=key` or `label="key=value"` + - `name=` + - `node=` + - `service=` + tags: ["Task"] + /tasks/{id}: + get: + summary: "Inspect a task" + operationId: "TaskInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Task" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID of the task" + required: true + type: "string" + tags: ["Task"] + /tasks/{id}/logs: + get: + summary: "Get task logs" + description: | + Get `stdout` and `stderr` logs from a task. + See also [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: "TaskLogs" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such task: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID of the task" + type: "string" + - name: "details" + in: "query" + description: "Show task context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Task"] + /secrets: + get: + summary: "List secrets" + operationId: "SecretList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Secret" + example: + - ID: "blt1owaxmitz71s9v5zh81zun" + Version: + Index: 85 + CreatedAt: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: "2017-07-20T13:55:28.678958722Z" + Spec: + Name: "mysql-passwd" + Labels: + some.label: "some.value" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Secret"] + /secrets/create: + post: + summary: "Create a secret" + operationId: "SecretCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IDResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/SecretSpec" + - type: "object" + example: + Name: "app-key.crt" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + tags: ["Secret"] + /secrets/{id}: + get: + summary: "Inspect a secret" + operationId: "SecretInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Secret" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + delete: + summary: "Delete a secret" + operationId: "SecretDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + /secrets/{id}/update: + post: + summary: "Update a Secret" + operationId: "SecretUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such secret" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the secret" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/SecretSpec" + description: | + The spec of the secret to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [SecretInspect endpoint](#operation/SecretInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the secret object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Secret"] + /configs: + get: + summary: "List configs" + operationId: "ConfigList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Config" + example: + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "server.conf" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the configs list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Config"] + /configs/create: + post: + summary: "Create a config" + operationId: "ConfigCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IDResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/ConfigSpec" + - type: "object" + example: + Name: "server.conf" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + tags: ["Config"] + /configs/{id}: + get: + summary: "Inspect a config" + operationId: "ConfigInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Config" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + delete: + summary: "Delete a config" + operationId: "ConfigDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + /configs/{id}/update: + post: + summary: "Update a Config" + operationId: "ConfigUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such config" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the config" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/ConfigSpec" + description: | + The spec of the config to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [ConfigInspect endpoint](#operation/ConfigInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the config object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Config"] + /distribution/{name}/json: + get: + summary: "Get image information from the registry" + description: | + Return image digest and platform information by contacting the registry. + operationId: "DistributionInspect" + produces: + - "application/json" + responses: + 200: + description: "descriptor and platform information" + schema: + $ref: "#/definitions/DistributionInspect" + 401: + description: "Failed authentication or no image found" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Distribution"] + /session: + post: + summary: "Initialize interactive session" + description: | + Start a new interactive session with a server. Session allows server to + call back to the client for advanced capabilities. + + ### Hijacking + + This endpoint hijacks the HTTP connection to HTTP2 transport that allows + the client to expose gPRC services on that connection. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /session HTTP/1.1 + Upgrade: h2c + Connection: Upgrade + ``` + + The Docker daemon responds with a `101 UPGRADED` response follow with + the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Connection: Upgrade + Upgrade: h2c + ``` + operationId: "Session" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hijacking successful" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Session"] diff --git a/src/Client/DockerApiClientWrapper.php b/src/Client/DockerApiClientWrapper.php index 67df855..7dd3e9c 100644 --- a/src/Client/DockerApiClientWrapper.php +++ b/src/Client/DockerApiClientWrapper.php @@ -4,12 +4,14 @@ namespace WebProject\DockerApiClient\Client; +use JsonException; use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\HttpClient\Psr18Client; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Serializer; use Symfony\Contracts\HttpClient\ChunkInterface; +use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use WebProject\DockerApi\Library\Generated\Client; use WebProject\DockerApiClient\Event\ContainerEvent; use function json_decode; @@ -25,6 +27,9 @@ public function __construct( /** * @phpstan-param callable(ContainerEvent $event):void $eventCallback + * + * @throws TransportExceptionInterface + * @throws JsonException */ public function listenForEvents(callable $eventCallback): true { diff --git a/src/Command/EventsListenCommand.php b/src/Command/EventsListenCommand.php new file mode 100644 index 0000000..3b45b14 --- /dev/null +++ b/src/Command/EventsListenCommand.php @@ -0,0 +1,83 @@ + */ + private array $containers = []; + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + + $service = new DockerService( + ClientFactory::create(), + ); + + $actions = [ + 'start', + 'die', + 'stop', + ]; + + $service->listenForEvents(function (ContainerEvent $event) use ($service, $actions, $io) { + $container = $this->containers[$event->Actor->ID] ?? null; + $prefix = '[event]'; + if ($container) { + $prefix .= ' [' . $container->getName() . ']'; + } + + $message = $prefix . ' [Actor: ' . $event->Actor->ID . '][Type: ' . $event->Type . ']'; + + if (!in_array($event->Action, $actions, true)) { + if ($io->isVeryVerbose()) { + $io->writeln($message . ' - SKIP type: ' . $event->Type . ' ' . substr($event->Action, 0, 12)); + } elseif ($io->isVerbose()) { + $io->writeln($message . ' - skipped'); + } + + return; + } + + try { + $container ??= $service->findContainer($event->Actor->ID); + + if (!$container instanceof DockerContainerDto) { + // set false to skip on next check + $this->containers[$event->Actor->ID] = false; + $io->writeln($message . ' Actor: ' . $event->Actor->ID . ' does not exist.'); + + return; + } + $message .= ' [container: ' . $container->getName() . ' - image: ' . $container->image . ']'; + $io->writeln($message); + } catch (Exception $e) { + $io->error($e->getMessage()); + + return; + } + }); + + return self::SUCCESS; + } +} diff --git a/src/Command/ListContainersCommand.php b/src/Command/ListContainersCommand.php index 60ada11..23a4ed7 100644 --- a/src/Command/ListContainersCommand.php +++ b/src/Command/ListContainersCommand.php @@ -44,9 +44,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $envs = []; - foreach ($container->envVariables as $value) { - [$envName, $envValue] = $value; - $var = $envName . ': ' . $envValue; + foreach ($container->envVariables as $envName => $envValue) { + $var = $envName . ":\n" . $envValue; $envs[] = $var; if ($output->isVerbose()) { $io->writeln('[+] env: ' . $var); diff --git a/src/Event/ContainerEvent.php b/src/Event/ContainerEvent.php index 0ffbb01..d48a219 100644 --- a/src/Event/ContainerEvent.php +++ b/src/Event/ContainerEvent.php @@ -5,17 +5,18 @@ namespace WebProject\DockerApiClient\Event; use Symfony\Component\Serializer\Attribute\SerializedName; +use Symfony\Component\Validator\Constraints as Assert; class ContainerEvent { public function __construct( - public string $status, - public string $id, - public string $from, #[SerializedName('Type')] public string $Type, #[SerializedName('Action')] public string $Action, + #[Assert\Valid] + #[SerializedName('Actor')] + public EventActor $Actor, public string $scope, public int $time, public int $timeNano, diff --git a/src/Event/EventActor.php b/src/Event/EventActor.php new file mode 100644 index 0000000..409c359 --- /dev/null +++ b/src/Event/EventActor.php @@ -0,0 +1,22 @@ + $Attributes + */ + public function __construct( + #[SerializedName('ID')] + public string $ID, + /** @var array $Attributes */ + #[SerializedName('Attributes')] + public array $Attributes = [], + ) { + } +} diff --git a/src/Service/DockerService.php b/src/Service/DockerService.php index 510e77b..031d86b 100644 --- a/src/Service/DockerService.php +++ b/src/Service/DockerService.php @@ -4,16 +4,20 @@ namespace WebProject\DockerApiClient\Service; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; use WebProject\DockerApi\Library\Generated\Model\ContainerInspectResponse; use WebProject\DockerApiClient\Client\DockerApiClientWrapper; use WebProject\DockerApiClient\Dto\DockerContainerDto; use WebProject\DockerApiClient\Event\ContainerEvent; use WebProject\DockerApiClient\Util\ContainerResponseToContainerDtoUtil; -final readonly class DockerService +final class DockerService implements LoggerAwareInterface { + use LoggerAwareTrait; + public function __construct( - private DockerApiClientWrapper $dockerApiClient, + private readonly DockerApiClientWrapper $dockerApiClient, ) { } @@ -23,16 +27,25 @@ public function __construct( public function findAllContainer(): iterable { $util = new ContainerResponseToContainerDtoUtil(); + try { + foreach ($this->dockerApiClient->getDockerClient()->containerList() as $container) { + $id = $container->getId(); + $containerInspect = $this->dockerApiClient->getDockerClient()->containerInspect($id); - foreach ($this->dockerApiClient->getDockerClient()->containerList() as $container) { - $id = $container->getId(); - $containerInspect = $this->dockerApiClient->getDockerClient()->containerInspect($id); + if (!$containerInspect instanceof ContainerInspectResponse) { + continue; + } - if (!$containerInspect instanceof ContainerInspectResponse) { - continue; + yield $id => $util($containerInspect); + } + } catch (\WebProject\DockerApi\Library\Generated\Runtime\Normalizer\ValidationException $e) { + $errors = $e->getMessage(); + foreach ($e->getViolationList() as $item) { + $errors .= ' || ' . $item; } + $this->logger?->error($errors); - yield $id => $util($containerInspect); + throw $e; } } diff --git a/tests/Unit/Util/ContainerResponseToContainerDtoUtilTest.php b/tests/Unit/Util/ContainerResponseToContainerDtoUtilTest.php index 0721599..e0e11ed 100644 --- a/tests/Unit/Util/ContainerResponseToContainerDtoUtilTest.php +++ b/tests/Unit/Util/ContainerResponseToContainerDtoUtilTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace WebProject\DockerApiClient\Tests; +namespace WebProject\DockerApiClient\Tests\Unit\Util; use PHPUnit\Framework\Attributes\CoversClass; use WebProject\DockerApi\Library\Generated\Model\EndpointSettings; @@ -21,9 +21,11 @@ public function testInvokeMinValues(): void $networkSettings = new \WebProject\DockerApi\Library\Generated\Model\NetworkSettings(); $networkSettings->setNetworks(networks: []); + $networkSettings->setPorts(ports: []); $containerInspectResponse->setNetworkSettings(networkSettings: $networkSettings); $containerConfig = new \WebProject\DockerApi\Library\Generated\Model\ContainerConfig(); + $containerConfig->setEnv(env: []); $containerInspectResponse->setConfig(config: $containerConfig); // Act @@ -57,6 +59,7 @@ public function testInvokeMaxValues(): void $networkSettings = new \WebProject\DockerApi\Library\Generated\Model\NetworkSettings(); $networkSettings->setNetworks(networks: [$endpoint, $endpoint2]); + $networkSettings->setPorts([]); $containerInspectResponse->setNetworkSettings(networkSettings: $networkSettings);