github.com/rish1988/moby@v25.0.2+incompatible/api/swagger.yaml (about) 1 # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. 2 # 3 # This is used for generating API documentation and the types used by the 4 # client/server. See api/README.md for more information. 5 # 6 # Some style notes: 7 # - This file is used by ReDoc, which allows GitHub Flavored Markdown in 8 # descriptions. 9 # - There is no maximum line length, for ease of editing and pretty diffs. 10 # - operationIds are in the format "NounVerb", with a singular noun. 11 12 swagger: "2.0" 13 schemes: 14 - "http" 15 - "https" 16 produces: 17 - "application/json" 18 - "text/plain" 19 consumes: 20 - "application/json" 21 - "text/plain" 22 basePath: "/v1.45" 23 info: 24 title: "Docker Engine API" 25 version: "1.45" 26 x-logo: 27 url: "https://docs.docker.com/assets/images/logo-docker-main.png" 28 description: | 29 The Engine API is an HTTP API served by Docker Engine. It is the API the 30 Docker client uses to communicate with the Engine, so everything the Docker 31 client can do can be done with the API. 32 33 Most of the client's commands map directly to API endpoints (e.g. `docker ps` 34 is `GET /containers/json`). The notable exception is running containers, 35 which consists of several API calls. 36 37 # Errors 38 39 The API uses standard HTTP status codes to indicate the success or failure 40 of the API call. The body of the response will be JSON in the following 41 format: 42 43 ``` 44 { 45 "message": "page not found" 46 } 47 ``` 48 49 # Versioning 50 51 The API is usually changed in each release, so API calls are versioned to 52 ensure that clients don't break. To lock to a specific version of the API, 53 you prefix the URL with its version, for example, call `/v1.30/info` to use 54 the v1.30 version of the `/info` endpoint. If the API version specified in 55 the URL is not supported by the daemon, a HTTP `400 Bad Request` error message 56 is returned. 57 58 If you omit the version-prefix, the current version of the API (v1.45) is used. 59 For example, calling `/info` is the same as calling `/v1.45/info`. Using the 60 API without a version-prefix is deprecated and will be removed in a future release. 61 62 Engine releases in the near future should support this version of the API, 63 so your client will continue to work even if it is talking to a newer Engine. 64 65 The API uses an open schema model, which means server may add extra properties 66 to responses. Likewise, the server will ignore any extra query parameters and 67 request body properties. When you write clients, you need to ignore additional 68 properties in responses to ensure they do not break when talking to newer 69 daemons. 70 71 72 # Authentication 73 74 Authentication for registries is handled client side. The client has to send 75 authentication details to various endpoints that need to communicate with 76 registries, such as `POST /images/(name)/push`. These are sent as 77 `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) 78 (JSON) string with the following structure: 79 80 ``` 81 { 82 "username": "string", 83 "password": "string", 84 "email": "string", 85 "serveraddress": "string" 86 } 87 ``` 88 89 The `serveraddress` is a domain/IP without a protocol. Throughout this 90 structure, double quotes are required. 91 92 If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), 93 you can just pass this instead of credentials: 94 95 ``` 96 { 97 "identitytoken": "9cbaf023786cd7..." 98 } 99 ``` 100 101 # The tags on paths define the menu sections in the ReDoc documentation, so 102 # the usage of tags must make sense for that: 103 # - They should be singular, not plural. 104 # - There should not be too many tags, or the menu becomes unwieldy. For 105 # example, it is preferable to add a path to the "System" tag instead of 106 # creating a tag with a single path in it. 107 # - The order of tags in this list defines the order in the menu. 108 tags: 109 # Primary objects 110 - name: "Container" 111 x-displayName: "Containers" 112 description: | 113 Create and manage containers. 114 - name: "Image" 115 x-displayName: "Images" 116 - name: "Network" 117 x-displayName: "Networks" 118 description: | 119 Networks are user-defined networks that containers can be attached to. 120 See the [networking documentation](https://docs.docker.com/network/) 121 for more information. 122 - name: "Volume" 123 x-displayName: "Volumes" 124 description: | 125 Create and manage persistent storage that can be attached to containers. 126 - name: "Exec" 127 x-displayName: "Exec" 128 description: | 129 Run new commands inside running containers. Refer to the 130 [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) 131 for more information. 132 133 To exec a command in a container, you first need to create an exec instance, 134 then start it. These two API endpoints are wrapped up in a single command-line 135 command, `docker exec`. 136 137 # Swarm things 138 - name: "Swarm" 139 x-displayName: "Swarm" 140 description: | 141 Engines can be clustered together in a swarm. Refer to the 142 [swarm mode documentation](https://docs.docker.com/engine/swarm/) 143 for more information. 144 - name: "Node" 145 x-displayName: "Nodes" 146 description: | 147 Nodes are instances of the Engine participating in a swarm. Swarm mode 148 must be enabled for these endpoints to work. 149 - name: "Service" 150 x-displayName: "Services" 151 description: | 152 Services are the definitions of tasks to run on a swarm. Swarm mode must 153 be enabled for these endpoints to work. 154 - name: "Task" 155 x-displayName: "Tasks" 156 description: | 157 A task is a container running on a swarm. It is the atomic scheduling unit 158 of swarm. Swarm mode must be enabled for these endpoints to work. 159 - name: "Secret" 160 x-displayName: "Secrets" 161 description: | 162 Secrets are sensitive data that can be used by services. Swarm mode must 163 be enabled for these endpoints to work. 164 - name: "Config" 165 x-displayName: "Configs" 166 description: | 167 Configs are application configurations that can be used by services. Swarm 168 mode must be enabled for these endpoints to work. 169 # System things 170 - name: "Plugin" 171 x-displayName: "Plugins" 172 - name: "System" 173 x-displayName: "System" 174 175 definitions: 176 Port: 177 type: "object" 178 description: "An open port on a container" 179 required: [PrivatePort, Type] 180 properties: 181 IP: 182 type: "string" 183 format: "ip-address" 184 description: "Host IP address that the container's port is mapped to" 185 PrivatePort: 186 type: "integer" 187 format: "uint16" 188 x-nullable: false 189 description: "Port on the container" 190 PublicPort: 191 type: "integer" 192 format: "uint16" 193 description: "Port exposed on the host" 194 Type: 195 type: "string" 196 x-nullable: false 197 enum: ["tcp", "udp", "sctp"] 198 example: 199 PrivatePort: 8080 200 PublicPort: 80 201 Type: "tcp" 202 203 MountPoint: 204 type: "object" 205 description: | 206 MountPoint represents a mount point configuration inside the container. 207 This is used for reporting the mountpoints in use by a container. 208 properties: 209 Type: 210 description: | 211 The mount type: 212 213 - `bind` a mount of a file or directory from the host into the container. 214 - `volume` a docker volume with the given `Name`. 215 - `tmpfs` a `tmpfs`. 216 - `npipe` a named pipe from the host into the container. 217 - `cluster` a Swarm cluster volume 218 type: "string" 219 enum: 220 - "bind" 221 - "volume" 222 - "tmpfs" 223 - "npipe" 224 - "cluster" 225 example: "volume" 226 Name: 227 description: | 228 Name is the name reference to the underlying data defined by `Source` 229 e.g., the volume name. 230 type: "string" 231 example: "myvolume" 232 Source: 233 description: | 234 Source location of the mount. 235 236 For volumes, this contains the storage location of the volume (within 237 `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains 238 the source (host) part of the bind-mount. For `tmpfs` mount points, this 239 field is empty. 240 type: "string" 241 example: "/var/lib/docker/volumes/myvolume/_data" 242 Destination: 243 description: | 244 Destination is the path relative to the container root (`/`) where 245 the `Source` is mounted inside the container. 246 type: "string" 247 example: "/usr/share/nginx/html/" 248 Driver: 249 description: | 250 Driver is the volume driver used to create the volume (if it is a volume). 251 type: "string" 252 example: "local" 253 Mode: 254 description: | 255 Mode is a comma separated list of options supplied by the user when 256 creating the bind/volume mount. 257 258 The default is platform-specific (`"z"` on Linux, empty on Windows). 259 type: "string" 260 example: "z" 261 RW: 262 description: | 263 Whether the mount is mounted writable (read-write). 264 type: "boolean" 265 example: true 266 Propagation: 267 description: | 268 Propagation describes how mounts are propagated from the host into the 269 mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) 270 for details. This field is not used on Windows. 271 type: "string" 272 example: "" 273 274 DeviceMapping: 275 type: "object" 276 description: "A device mapping between the host and container" 277 properties: 278 PathOnHost: 279 type: "string" 280 PathInContainer: 281 type: "string" 282 CgroupPermissions: 283 type: "string" 284 example: 285 PathOnHost: "/dev/deviceName" 286 PathInContainer: "/dev/deviceName" 287 CgroupPermissions: "mrw" 288 289 DeviceRequest: 290 type: "object" 291 description: "A request for devices to be sent to device drivers" 292 properties: 293 Driver: 294 type: "string" 295 example: "nvidia" 296 Count: 297 type: "integer" 298 example: -1 299 DeviceIDs: 300 type: "array" 301 items: 302 type: "string" 303 example: 304 - "0" 305 - "1" 306 - "GPU-fef8089b-4820-abfc-e83e-94318197576e" 307 Capabilities: 308 description: | 309 A list of capabilities; an OR list of AND lists of capabilities. 310 type: "array" 311 items: 312 type: "array" 313 items: 314 type: "string" 315 example: 316 # gpu AND nvidia AND compute 317 - ["gpu", "nvidia", "compute"] 318 Options: 319 description: | 320 Driver-specific options, specified as a key/value pairs. These options 321 are passed directly to the driver. 322 type: "object" 323 additionalProperties: 324 type: "string" 325 326 ThrottleDevice: 327 type: "object" 328 properties: 329 Path: 330 description: "Device path" 331 type: "string" 332 Rate: 333 description: "Rate" 334 type: "integer" 335 format: "int64" 336 minimum: 0 337 338 Mount: 339 type: "object" 340 properties: 341 Target: 342 description: "Container path." 343 type: "string" 344 Source: 345 description: "Mount source (e.g. a volume name, a host path)." 346 type: "string" 347 Type: 348 description: | 349 The mount type. Available types: 350 351 - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. 352 - `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. 353 - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. 354 - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. 355 - `cluster` a Swarm cluster volume 356 type: "string" 357 enum: 358 - "bind" 359 - "volume" 360 - "tmpfs" 361 - "npipe" 362 - "cluster" 363 ReadOnly: 364 description: "Whether the mount should be read-only." 365 type: "boolean" 366 Consistency: 367 description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." 368 type: "string" 369 BindOptions: 370 description: "Optional configuration for the `bind` type." 371 type: "object" 372 properties: 373 Propagation: 374 description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." 375 type: "string" 376 enum: 377 - "private" 378 - "rprivate" 379 - "shared" 380 - "rshared" 381 - "slave" 382 - "rslave" 383 NonRecursive: 384 description: "Disable recursive bind mount." 385 type: "boolean" 386 default: false 387 CreateMountpoint: 388 description: "Create mount point on host if missing" 389 type: "boolean" 390 default: false 391 ReadOnlyNonRecursive: 392 description: | 393 Make the mount non-recursively read-only, but still leave the mount recursive 394 (unless NonRecursive is set to true in conjunction). 395 type: "boolean" 396 default: false 397 ReadOnlyForceRecursive: 398 description: "Raise an error if the mount cannot be made recursively read-only." 399 type: "boolean" 400 default: false 401 VolumeOptions: 402 description: "Optional configuration for the `volume` type." 403 type: "object" 404 properties: 405 NoCopy: 406 description: "Populate volume with data from the target." 407 type: "boolean" 408 default: false 409 Labels: 410 description: "User-defined key/value metadata." 411 type: "object" 412 additionalProperties: 413 type: "string" 414 DriverConfig: 415 description: "Map of driver specific options" 416 type: "object" 417 properties: 418 Name: 419 description: "Name of the driver to use to create the volume." 420 type: "string" 421 Options: 422 description: "key/value map of driver specific options." 423 type: "object" 424 additionalProperties: 425 type: "string" 426 Subpath: 427 description: "Source path inside the volume. Must be relative without any back traversals." 428 type: "string" 429 example: "dir-inside-volume/subdirectory" 430 TmpfsOptions: 431 description: "Optional configuration for the `tmpfs` type." 432 type: "object" 433 properties: 434 SizeBytes: 435 description: "The size for the tmpfs mount in bytes." 436 type: "integer" 437 format: "int64" 438 Mode: 439 description: "The permission mode for the tmpfs mount in an integer." 440 type: "integer" 441 442 RestartPolicy: 443 description: | 444 The behavior to apply when the container exits. The default is not to 445 restart. 446 447 An ever increasing delay (double the previous delay, starting at 100ms) is 448 added before each restart to prevent flooding the server. 449 type: "object" 450 properties: 451 Name: 452 type: "string" 453 description: | 454 - Empty string means not to restart 455 - `no` Do not automatically restart 456 - `always` Always restart 457 - `unless-stopped` Restart always except when the user has manually stopped the container 458 - `on-failure` Restart only when the container exit code is non-zero 459 enum: 460 - "" 461 - "no" 462 - "always" 463 - "unless-stopped" 464 - "on-failure" 465 MaximumRetryCount: 466 type: "integer" 467 description: | 468 If `on-failure` is used, the number of times to retry before giving up. 469 470 Resources: 471 description: "A container's resources (cgroups config, ulimits, etc)" 472 type: "object" 473 properties: 474 # Applicable to all platforms 475 CpuShares: 476 description: | 477 An integer value representing this container's relative CPU weight 478 versus other containers. 479 type: "integer" 480 Memory: 481 description: "Memory limit in bytes." 482 type: "integer" 483 format: "int64" 484 default: 0 485 # Applicable to UNIX platforms 486 CgroupParent: 487 description: | 488 Path to `cgroups` under which the container's `cgroup` is created. If 489 the path is not absolute, the path is considered to be relative to the 490 `cgroups` path of the init process. Cgroups are created if they do not 491 already exist. 492 type: "string" 493 BlkioWeight: 494 description: "Block IO weight (relative weight)." 495 type: "integer" 496 minimum: 0 497 maximum: 1000 498 BlkioWeightDevice: 499 description: | 500 Block IO weight (relative device weight) in the form: 501 502 ``` 503 [{"Path": "device_path", "Weight": weight}] 504 ``` 505 type: "array" 506 items: 507 type: "object" 508 properties: 509 Path: 510 type: "string" 511 Weight: 512 type: "integer" 513 minimum: 0 514 BlkioDeviceReadBps: 515 description: | 516 Limit read rate (bytes per second) from a device, in the form: 517 518 ``` 519 [{"Path": "device_path", "Rate": rate}] 520 ``` 521 type: "array" 522 items: 523 $ref: "#/definitions/ThrottleDevice" 524 BlkioDeviceWriteBps: 525 description: | 526 Limit write rate (bytes per second) to a device, in the form: 527 528 ``` 529 [{"Path": "device_path", "Rate": rate}] 530 ``` 531 type: "array" 532 items: 533 $ref: "#/definitions/ThrottleDevice" 534 BlkioDeviceReadIOps: 535 description: | 536 Limit read rate (IO per second) from a device, in the form: 537 538 ``` 539 [{"Path": "device_path", "Rate": rate}] 540 ``` 541 type: "array" 542 items: 543 $ref: "#/definitions/ThrottleDevice" 544 BlkioDeviceWriteIOps: 545 description: | 546 Limit write rate (IO per second) to a device, in the form: 547 548 ``` 549 [{"Path": "device_path", "Rate": rate}] 550 ``` 551 type: "array" 552 items: 553 $ref: "#/definitions/ThrottleDevice" 554 CpuPeriod: 555 description: "The length of a CPU period in microseconds." 556 type: "integer" 557 format: "int64" 558 CpuQuota: 559 description: | 560 Microseconds of CPU time that the container can get in a CPU period. 561 type: "integer" 562 format: "int64" 563 CpuRealtimePeriod: 564 description: | 565 The length of a CPU real-time period in microseconds. Set to 0 to 566 allocate no time allocated to real-time tasks. 567 type: "integer" 568 format: "int64" 569 CpuRealtimeRuntime: 570 description: | 571 The length of a CPU real-time runtime in microseconds. Set to 0 to 572 allocate no time allocated to real-time tasks. 573 type: "integer" 574 format: "int64" 575 CpusetCpus: 576 description: | 577 CPUs in which to allow execution (e.g., `0-3`, `0,1`). 578 type: "string" 579 example: "0-3" 580 CpusetMems: 581 description: | 582 Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only 583 effective on NUMA systems. 584 type: "string" 585 Devices: 586 description: "A list of devices to add to the container." 587 type: "array" 588 items: 589 $ref: "#/definitions/DeviceMapping" 590 DeviceCgroupRules: 591 description: "a list of cgroup rules to apply to the container" 592 type: "array" 593 items: 594 type: "string" 595 example: "c 13:* rwm" 596 DeviceRequests: 597 description: | 598 A list of requests for devices to be sent to device drivers. 599 type: "array" 600 items: 601 $ref: "#/definitions/DeviceRequest" 602 KernelMemoryTCP: 603 description: | 604 Hard limit for kernel TCP buffer memory (in bytes). Depending on the 605 OCI runtime in use, this option may be ignored. It is no longer supported 606 by the default (runc) runtime. 607 608 This field is omitted when empty. 609 type: "integer" 610 format: "int64" 611 MemoryReservation: 612 description: "Memory soft limit in bytes." 613 type: "integer" 614 format: "int64" 615 MemorySwap: 616 description: | 617 Total memory limit (memory + swap). Set as `-1` to enable unlimited 618 swap. 619 type: "integer" 620 format: "int64" 621 MemorySwappiness: 622 description: | 623 Tune a container's memory swappiness behavior. Accepts an integer 624 between 0 and 100. 625 type: "integer" 626 format: "int64" 627 minimum: 0 628 maximum: 100 629 NanoCpus: 630 description: "CPU quota in units of 10<sup>-9</sup> CPUs." 631 type: "integer" 632 format: "int64" 633 OomKillDisable: 634 description: "Disable OOM Killer for the container." 635 type: "boolean" 636 Init: 637 description: | 638 Run an init inside the container that forwards signals and reaps 639 processes. This field is omitted if empty, and the default (as 640 configured on the daemon) is used. 641 type: "boolean" 642 x-nullable: true 643 PidsLimit: 644 description: | 645 Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` 646 to not change. 647 type: "integer" 648 format: "int64" 649 x-nullable: true 650 Ulimits: 651 description: | 652 A list of resource limits to set in the container. For example: 653 654 ``` 655 {"Name": "nofile", "Soft": 1024, "Hard": 2048} 656 ``` 657 type: "array" 658 items: 659 type: "object" 660 properties: 661 Name: 662 description: "Name of ulimit" 663 type: "string" 664 Soft: 665 description: "Soft limit" 666 type: "integer" 667 Hard: 668 description: "Hard limit" 669 type: "integer" 670 # Applicable to Windows 671 CpuCount: 672 description: | 673 The number of usable CPUs (Windows only). 674 675 On Windows Server containers, the processor resource controls are 676 mutually exclusive. The order of precedence is `CPUCount` first, then 677 `CPUShares`, and `CPUPercent` last. 678 type: "integer" 679 format: "int64" 680 CpuPercent: 681 description: | 682 The usable percentage of the available CPUs (Windows only). 683 684 On Windows Server containers, the processor resource controls are 685 mutually exclusive. The order of precedence is `CPUCount` first, then 686 `CPUShares`, and `CPUPercent` last. 687 type: "integer" 688 format: "int64" 689 IOMaximumIOps: 690 description: "Maximum IOps for the container system drive (Windows only)" 691 type: "integer" 692 format: "int64" 693 IOMaximumBandwidth: 694 description: | 695 Maximum IO in bytes per second for the container system drive 696 (Windows only). 697 type: "integer" 698 format: "int64" 699 700 Limit: 701 description: | 702 An object describing a limit on resources which can be requested by a task. 703 type: "object" 704 properties: 705 NanoCPUs: 706 type: "integer" 707 format: "int64" 708 example: 4000000000 709 MemoryBytes: 710 type: "integer" 711 format: "int64" 712 example: 8272408576 713 Pids: 714 description: | 715 Limits the maximum number of PIDs in the container. Set `0` for unlimited. 716 type: "integer" 717 format: "int64" 718 default: 0 719 example: 100 720 721 ResourceObject: 722 description: | 723 An object describing the resources which can be advertised by a node and 724 requested by a task. 725 type: "object" 726 properties: 727 NanoCPUs: 728 type: "integer" 729 format: "int64" 730 example: 4000000000 731 MemoryBytes: 732 type: "integer" 733 format: "int64" 734 example: 8272408576 735 GenericResources: 736 $ref: "#/definitions/GenericResources" 737 738 GenericResources: 739 description: | 740 User-defined resources can be either Integer resources (e.g, `SSD=3`) or 741 String resources (e.g, `GPU=UUID1`). 742 type: "array" 743 items: 744 type: "object" 745 properties: 746 NamedResourceSpec: 747 type: "object" 748 properties: 749 Kind: 750 type: "string" 751 Value: 752 type: "string" 753 DiscreteResourceSpec: 754 type: "object" 755 properties: 756 Kind: 757 type: "string" 758 Value: 759 type: "integer" 760 format: "int64" 761 example: 762 - DiscreteResourceSpec: 763 Kind: "SSD" 764 Value: 3 765 - NamedResourceSpec: 766 Kind: "GPU" 767 Value: "UUID1" 768 - NamedResourceSpec: 769 Kind: "GPU" 770 Value: "UUID2" 771 772 HealthConfig: 773 description: "A test to perform to check that the container is healthy." 774 type: "object" 775 properties: 776 Test: 777 description: | 778 The test to perform. Possible values are: 779 780 - `[]` inherit healthcheck from image or parent image 781 - `["NONE"]` disable healthcheck 782 - `["CMD", args...]` exec arguments directly 783 - `["CMD-SHELL", command]` run command with system's default shell 784 type: "array" 785 items: 786 type: "string" 787 Interval: 788 description: | 789 The time to wait between checks in nanoseconds. It should be 0 or at 790 least 1000000 (1 ms). 0 means inherit. 791 type: "integer" 792 format: "int64" 793 Timeout: 794 description: | 795 The time to wait before considering the check to have hung. It should 796 be 0 or at least 1000000 (1 ms). 0 means inherit. 797 type: "integer" 798 format: "int64" 799 Retries: 800 description: | 801 The number of consecutive failures needed to consider a container as 802 unhealthy. 0 means inherit. 803 type: "integer" 804 StartPeriod: 805 description: | 806 Start period for the container to initialize before starting 807 health-retries countdown in nanoseconds. It should be 0 or at least 808 1000000 (1 ms). 0 means inherit. 809 type: "integer" 810 format: "int64" 811 StartInterval: 812 description: | 813 The time to wait between checks in nanoseconds during the start period. 814 It should be 0 or at least 1000000 (1 ms). 0 means inherit. 815 type: "integer" 816 format: "int64" 817 818 Health: 819 description: | 820 Health stores information about the container's healthcheck results. 821 type: "object" 822 x-nullable: true 823 properties: 824 Status: 825 description: | 826 Status is one of `none`, `starting`, `healthy` or `unhealthy` 827 828 - "none" Indicates there is no healthcheck 829 - "starting" Starting indicates that the container is not yet ready 830 - "healthy" Healthy indicates that the container is running correctly 831 - "unhealthy" Unhealthy indicates that the container has a problem 832 type: "string" 833 enum: 834 - "none" 835 - "starting" 836 - "healthy" 837 - "unhealthy" 838 example: "healthy" 839 FailingStreak: 840 description: "FailingStreak is the number of consecutive failures" 841 type: "integer" 842 example: 0 843 Log: 844 type: "array" 845 description: | 846 Log contains the last few results (oldest first) 847 items: 848 $ref: "#/definitions/HealthcheckResult" 849 850 HealthcheckResult: 851 description: | 852 HealthcheckResult stores information about a single run of a healthcheck probe 853 type: "object" 854 x-nullable: true 855 properties: 856 Start: 857 description: | 858 Date and time at which this check started in 859 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 860 type: "string" 861 format: "date-time" 862 example: "2020-01-04T10:44:24.496525531Z" 863 End: 864 description: | 865 Date and time at which this check ended in 866 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 867 type: "string" 868 format: "dateTime" 869 example: "2020-01-04T10:45:21.364524523Z" 870 ExitCode: 871 description: | 872 ExitCode meanings: 873 874 - `0` healthy 875 - `1` unhealthy 876 - `2` reserved (considered unhealthy) 877 - other values: error running probe 878 type: "integer" 879 example: 0 880 Output: 881 description: "Output from last check" 882 type: "string" 883 884 HostConfig: 885 description: "Container configuration that depends on the host we are running on" 886 allOf: 887 - $ref: "#/definitions/Resources" 888 - type: "object" 889 properties: 890 # Applicable to all platforms 891 Binds: 892 type: "array" 893 description: | 894 A list of volume bindings for this container. Each volume binding 895 is a string in one of these forms: 896 897 - `host-src:container-dest[:options]` to bind-mount a host path 898 into the container. Both `host-src`, and `container-dest` must 899 be an _absolute_ path. 900 - `volume-name:container-dest[:options]` to bind-mount a volume 901 managed by a volume driver into the container. `container-dest` 902 must be an _absolute_ path. 903 904 `options` is an optional, comma-delimited list of: 905 906 - `nocopy` disables automatic copying of data from the container 907 path to the volume. The `nocopy` flag only applies to named volumes. 908 - `[ro|rw]` mounts a volume read-only or read-write, respectively. 909 If omitted or set to `rw`, volumes are mounted read-write. 910 - `[z|Z]` applies SELinux labels to allow or deny multiple containers 911 to read and write to the same volume. 912 - `z`: a _shared_ content label is applied to the content. This 913 label indicates that multiple containers can share the volume 914 content, for both reading and writing. 915 - `Z`: a _private unshared_ label is applied to the content. 916 This label indicates that only the current container can use 917 a private volume. Labeling systems such as SELinux require 918 proper labels to be placed on volume content that is mounted 919 into a container. Without a label, the security system can 920 prevent a container's processes from using the content. By 921 default, the labels set by the host operating system are not 922 modified. 923 - `[[r]shared|[r]slave|[r]private]` specifies mount 924 [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). 925 This only applies to bind-mounted volumes, not internal volumes 926 or named volumes. Mount propagation requires the source mount 927 point (the location where the source directory is mounted in the 928 host operating system) to have the correct propagation properties. 929 For shared volumes, the source mount point must be set to `shared`. 930 For slave volumes, the mount must be set to either `shared` or 931 `slave`. 932 items: 933 type: "string" 934 ContainerIDFile: 935 type: "string" 936 description: "Path to a file where the container ID is written" 937 LogConfig: 938 type: "object" 939 description: "The logging configuration for this container" 940 properties: 941 Type: 942 type: "string" 943 enum: 944 - "json-file" 945 - "syslog" 946 - "journald" 947 - "gelf" 948 - "fluentd" 949 - "awslogs" 950 - "splunk" 951 - "etwlogs" 952 - "none" 953 Config: 954 type: "object" 955 additionalProperties: 956 type: "string" 957 NetworkMode: 958 type: "string" 959 description: | 960 Network mode to use for this container. Supported standard values 961 are: `bridge`, `host`, `none`, and `container:<name|id>`. Any 962 other value is taken as a custom network's name to which this 963 container should connect to. 964 PortBindings: 965 $ref: "#/definitions/PortMap" 966 RestartPolicy: 967 $ref: "#/definitions/RestartPolicy" 968 AutoRemove: 969 type: "boolean" 970 description: | 971 Automatically remove the container when the container's process 972 exits. This has no effect if `RestartPolicy` is set. 973 VolumeDriver: 974 type: "string" 975 description: "Driver that this container uses to mount volumes." 976 VolumesFrom: 977 type: "array" 978 description: | 979 A list of volumes to inherit from another container, specified in 980 the form `<container name>[:<ro|rw>]`. 981 items: 982 type: "string" 983 Mounts: 984 description: | 985 Specification for mounts to be added to the container. 986 type: "array" 987 items: 988 $ref: "#/definitions/Mount" 989 ConsoleSize: 990 type: "array" 991 description: | 992 Initial console size, as an `[height, width]` array. 993 x-nullable: true 994 minItems: 2 995 maxItems: 2 996 items: 997 type: "integer" 998 minimum: 0 999 Annotations: 1000 type: "object" 1001 description: | 1002 Arbitrary non-identifying metadata attached to container and 1003 provided to the runtime when the container is started. 1004 additionalProperties: 1005 type: "string" 1006 1007 # Applicable to UNIX platforms 1008 CapAdd: 1009 type: "array" 1010 description: | 1011 A list of kernel capabilities to add to the container. Conflicts 1012 with option 'Capabilities'. 1013 items: 1014 type: "string" 1015 CapDrop: 1016 type: "array" 1017 description: | 1018 A list of kernel capabilities to drop from the container. Conflicts 1019 with option 'Capabilities'. 1020 items: 1021 type: "string" 1022 CgroupnsMode: 1023 type: "string" 1024 enum: 1025 - "private" 1026 - "host" 1027 description: | 1028 cgroup namespace mode for the container. Possible values are: 1029 1030 - `"private"`: the container runs in its own private cgroup namespace 1031 - `"host"`: use the host system's cgroup namespace 1032 1033 If not specified, the daemon default is used, which can either be `"private"` 1034 or `"host"`, depending on daemon version, kernel support and configuration. 1035 Dns: 1036 type: "array" 1037 description: "A list of DNS servers for the container to use." 1038 items: 1039 type: "string" 1040 DnsOptions: 1041 type: "array" 1042 description: "A list of DNS options." 1043 items: 1044 type: "string" 1045 DnsSearch: 1046 type: "array" 1047 description: "A list of DNS search domains." 1048 items: 1049 type: "string" 1050 ExtraHosts: 1051 type: "array" 1052 description: | 1053 A list of hostnames/IP mappings to add to the container's `/etc/hosts` 1054 file. Specified in the form `["hostname:IP"]`. 1055 items: 1056 type: "string" 1057 GroupAdd: 1058 type: "array" 1059 description: | 1060 A list of additional groups that the container process will run as. 1061 items: 1062 type: "string" 1063 IpcMode: 1064 type: "string" 1065 description: | 1066 IPC sharing mode for the container. Possible values are: 1067 1068 - `"none"`: own private IPC namespace, with /dev/shm not mounted 1069 - `"private"`: own private IPC namespace 1070 - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers 1071 - `"container:<name|id>"`: join another (shareable) container's IPC namespace 1072 - `"host"`: use the host system's IPC namespace 1073 1074 If not specified, daemon default is used, which can either be `"private"` 1075 or `"shareable"`, depending on daemon version and configuration. 1076 Cgroup: 1077 type: "string" 1078 description: "Cgroup to use for the container." 1079 Links: 1080 type: "array" 1081 description: | 1082 A list of links for the container in the form `container_name:alias`. 1083 items: 1084 type: "string" 1085 OomScoreAdj: 1086 type: "integer" 1087 description: | 1088 An integer value containing the score given to the container in 1089 order to tune OOM killer preferences. 1090 example: 500 1091 PidMode: 1092 type: "string" 1093 description: | 1094 Set the PID (Process) Namespace mode for the container. It can be 1095 either: 1096 1097 - `"container:<name|id>"`: joins another container's PID namespace 1098 - `"host"`: use the host's PID namespace inside the container 1099 Privileged: 1100 type: "boolean" 1101 description: "Gives the container full access to the host." 1102 PublishAllPorts: 1103 type: "boolean" 1104 description: | 1105 Allocates an ephemeral host port for all of a container's 1106 exposed ports. 1107 1108 Ports are de-allocated when the container stops and allocated when 1109 the container starts. The allocated port might be changed when 1110 restarting the container. 1111 1112 The port is selected from the ephemeral port range that depends on 1113 the kernel. For example, on Linux the range is defined by 1114 `/proc/sys/net/ipv4/ip_local_port_range`. 1115 ReadonlyRootfs: 1116 type: "boolean" 1117 description: "Mount the container's root filesystem as read only." 1118 SecurityOpt: 1119 type: "array" 1120 description: | 1121 A list of string values to customize labels for MLS systems, such 1122 as SELinux. 1123 items: 1124 type: "string" 1125 StorageOpt: 1126 type: "object" 1127 description: | 1128 Storage driver options for this container, in the form `{"size": "120G"}`. 1129 additionalProperties: 1130 type: "string" 1131 Tmpfs: 1132 type: "object" 1133 description: | 1134 A map of container directories which should be replaced by tmpfs 1135 mounts, and their corresponding mount options. For example: 1136 1137 ``` 1138 { "/run": "rw,noexec,nosuid,size=65536k" } 1139 ``` 1140 additionalProperties: 1141 type: "string" 1142 UTSMode: 1143 type: "string" 1144 description: "UTS namespace to use for the container." 1145 UsernsMode: 1146 type: "string" 1147 description: | 1148 Sets the usernamespace mode for the container when usernamespace 1149 remapping option is enabled. 1150 ShmSize: 1151 type: "integer" 1152 format: "int64" 1153 description: | 1154 Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. 1155 minimum: 0 1156 Sysctls: 1157 type: "object" 1158 description: | 1159 A list of kernel parameters (sysctls) to set in the container. 1160 For example: 1161 1162 ``` 1163 {"net.ipv4.ip_forward": "1"} 1164 ``` 1165 additionalProperties: 1166 type: "string" 1167 Runtime: 1168 type: "string" 1169 description: "Runtime to use with this container." 1170 # Applicable to Windows 1171 Isolation: 1172 type: "string" 1173 description: | 1174 Isolation technology of the container. (Windows only) 1175 enum: 1176 - "default" 1177 - "process" 1178 - "hyperv" 1179 MaskedPaths: 1180 type: "array" 1181 description: | 1182 The list of paths to be masked inside the container (this overrides 1183 the default set of paths). 1184 items: 1185 type: "string" 1186 ReadonlyPaths: 1187 type: "array" 1188 description: | 1189 The list of paths to be set as read-only inside the container 1190 (this overrides the default set of paths). 1191 items: 1192 type: "string" 1193 1194 ContainerConfig: 1195 description: | 1196 Configuration for a container that is portable between hosts. 1197 1198 When used as `ContainerConfig` field in an image, `ContainerConfig` is an 1199 optional field containing the configuration of the container that was last 1200 committed when creating the image. 1201 1202 Previous versions of Docker builder used this field to store build cache, 1203 and it is not in active use anymore. 1204 type: "object" 1205 properties: 1206 Hostname: 1207 description: | 1208 The hostname to use for the container, as a valid RFC 1123 hostname. 1209 type: "string" 1210 example: "439f4e91bd1d" 1211 Domainname: 1212 description: | 1213 The domain name to use for the container. 1214 type: "string" 1215 User: 1216 description: "The user that commands are run as inside the container." 1217 type: "string" 1218 AttachStdin: 1219 description: "Whether to attach to `stdin`." 1220 type: "boolean" 1221 default: false 1222 AttachStdout: 1223 description: "Whether to attach to `stdout`." 1224 type: "boolean" 1225 default: true 1226 AttachStderr: 1227 description: "Whether to attach to `stderr`." 1228 type: "boolean" 1229 default: true 1230 ExposedPorts: 1231 description: | 1232 An object mapping ports to an empty object in the form: 1233 1234 `{"<port>/<tcp|udp|sctp>": {}}` 1235 type: "object" 1236 x-nullable: true 1237 additionalProperties: 1238 type: "object" 1239 enum: 1240 - {} 1241 default: {} 1242 example: { 1243 "80/tcp": {}, 1244 "443/tcp": {} 1245 } 1246 Tty: 1247 description: | 1248 Attach standard streams to a TTY, including `stdin` if it is not closed. 1249 type: "boolean" 1250 default: false 1251 OpenStdin: 1252 description: "Open `stdin`" 1253 type: "boolean" 1254 default: false 1255 StdinOnce: 1256 description: "Close `stdin` after one attached client disconnects" 1257 type: "boolean" 1258 default: false 1259 Env: 1260 description: | 1261 A list of environment variables to set inside the container in the 1262 form `["VAR=value", ...]`. A variable without `=` is removed from the 1263 environment, rather than to have an empty value. 1264 type: "array" 1265 items: 1266 type: "string" 1267 example: 1268 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 1269 Cmd: 1270 description: | 1271 Command to run specified as a string or an array of strings. 1272 type: "array" 1273 items: 1274 type: "string" 1275 example: ["/bin/sh"] 1276 Healthcheck: 1277 $ref: "#/definitions/HealthConfig" 1278 ArgsEscaped: 1279 description: "Command is already escaped (Windows only)" 1280 type: "boolean" 1281 default: false 1282 example: false 1283 x-nullable: true 1284 Image: 1285 description: | 1286 The name (or reference) of the image to use when creating the container, 1287 or which was used when the container was created. 1288 type: "string" 1289 example: "example-image:1.0" 1290 Volumes: 1291 description: | 1292 An object mapping mount point paths inside the container to empty 1293 objects. 1294 type: "object" 1295 additionalProperties: 1296 type: "object" 1297 enum: 1298 - {} 1299 default: {} 1300 WorkingDir: 1301 description: "The working directory for commands to run in." 1302 type: "string" 1303 example: "/public/" 1304 Entrypoint: 1305 description: | 1306 The entry point for the container as a string or an array of strings. 1307 1308 If the array consists of exactly one empty string (`[""]`) then the 1309 entry point is reset to system default (i.e., the entry point used by 1310 docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). 1311 type: "array" 1312 items: 1313 type: "string" 1314 example: [] 1315 NetworkDisabled: 1316 description: "Disable networking for the container." 1317 type: "boolean" 1318 x-nullable: true 1319 MacAddress: 1320 description: | 1321 MAC address of the container. 1322 1323 Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. 1324 type: "string" 1325 x-nullable: true 1326 OnBuild: 1327 description: | 1328 `ONBUILD` metadata that were defined in the image's `Dockerfile`. 1329 type: "array" 1330 x-nullable: true 1331 items: 1332 type: "string" 1333 example: [] 1334 Labels: 1335 description: "User-defined key/value metadata." 1336 type: "object" 1337 additionalProperties: 1338 type: "string" 1339 example: 1340 com.example.some-label: "some-value" 1341 com.example.some-other-label: "some-other-value" 1342 StopSignal: 1343 description: | 1344 Signal to stop a container as a string or unsigned integer. 1345 type: "string" 1346 example: "SIGTERM" 1347 x-nullable: true 1348 StopTimeout: 1349 description: "Timeout to stop a container in seconds." 1350 type: "integer" 1351 default: 10 1352 x-nullable: true 1353 Shell: 1354 description: | 1355 Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. 1356 type: "array" 1357 x-nullable: true 1358 items: 1359 type: "string" 1360 example: ["/bin/sh", "-c"] 1361 1362 NetworkingConfig: 1363 description: | 1364 NetworkingConfig represents the container's networking configuration for 1365 each of its interfaces. 1366 It is used for the networking configs specified in the `docker create` 1367 and `docker network connect` commands. 1368 type: "object" 1369 properties: 1370 EndpointsConfig: 1371 description: | 1372 A mapping of network name to endpoint configuration for that network. 1373 The endpoint configuration can be left empty to connect to that 1374 network with no particular endpoint configuration. 1375 type: "object" 1376 additionalProperties: 1377 $ref: "#/definitions/EndpointSettings" 1378 example: 1379 # putting an example here, instead of using the example values from 1380 # /definitions/EndpointSettings, because EndpointSettings contains 1381 # operational data returned when inspecting a container that we don't 1382 # accept here. 1383 EndpointsConfig: 1384 isolated_nw: 1385 IPAMConfig: 1386 IPv4Address: "172.20.30.33" 1387 IPv6Address: "2001:db8:abcd::3033" 1388 LinkLocalIPs: 1389 - "169.254.34.68" 1390 - "fe80::3468" 1391 MacAddress: "02:42:ac:12:05:02" 1392 Links: 1393 - "container_1" 1394 - "container_2" 1395 Aliases: 1396 - "server_x" 1397 - "server_y" 1398 database_nw: {} 1399 1400 NetworkSettings: 1401 description: "NetworkSettings exposes the network settings in the API" 1402 type: "object" 1403 properties: 1404 Bridge: 1405 description: | 1406 Name of the default bridge interface when dockerd's --bridge flag is set. 1407 type: "string" 1408 example: "docker0" 1409 SandboxID: 1410 description: SandboxID uniquely represents a container's network stack. 1411 type: "string" 1412 example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" 1413 HairpinMode: 1414 description: | 1415 Indicates if hairpin NAT should be enabled on the virtual interface. 1416 1417 Deprecated: This field is never set and will be removed in a future release. 1418 type: "boolean" 1419 example: false 1420 LinkLocalIPv6Address: 1421 description: | 1422 IPv6 unicast address using the link-local prefix. 1423 1424 Deprecated: This field is never set and will be removed in a future release. 1425 type: "string" 1426 example: "" 1427 LinkLocalIPv6PrefixLen: 1428 description: | 1429 Prefix length of the IPv6 unicast address. 1430 1431 Deprecated: This field is never set and will be removed in a future release. 1432 type: "integer" 1433 example: "" 1434 Ports: 1435 $ref: "#/definitions/PortMap" 1436 SandboxKey: 1437 description: SandboxKey is the full path of the netns handle 1438 type: "string" 1439 example: "/var/run/docker/netns/8ab54b426c38" 1440 1441 SecondaryIPAddresses: 1442 description: "Deprecated: This field is never set and will be removed in a future release." 1443 type: "array" 1444 items: 1445 $ref: "#/definitions/Address" 1446 x-nullable: true 1447 1448 SecondaryIPv6Addresses: 1449 description: "Deprecated: This field is never set and will be removed in a future release." 1450 type: "array" 1451 items: 1452 $ref: "#/definitions/Address" 1453 x-nullable: true 1454 1455 # TODO properties below are part of DefaultNetworkSettings, which is 1456 # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 1457 EndpointID: 1458 description: | 1459 EndpointID uniquely represents a service endpoint in a Sandbox. 1460 1461 <p><br /></p> 1462 1463 > **Deprecated**: This field is only propagated when attached to the 1464 > default "bridge" network. Use the information from the "bridge" 1465 > network inside the `Networks` map instead, which contains the same 1466 > information. This field was deprecated in Docker 1.9 and is scheduled 1467 > to be removed in Docker 17.12.0 1468 type: "string" 1469 example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" 1470 Gateway: 1471 description: | 1472 Gateway address for the default "bridge" network. 1473 1474 <p><br /></p> 1475 1476 > **Deprecated**: This field is only propagated when attached to the 1477 > default "bridge" network. Use the information from the "bridge" 1478 > network inside the `Networks` map instead, which contains the same 1479 > information. This field was deprecated in Docker 1.9 and is scheduled 1480 > to be removed in Docker 17.12.0 1481 type: "string" 1482 example: "172.17.0.1" 1483 GlobalIPv6Address: 1484 description: | 1485 Global IPv6 address for the default "bridge" network. 1486 1487 <p><br /></p> 1488 1489 > **Deprecated**: This field is only propagated when attached to the 1490 > default "bridge" network. Use the information from the "bridge" 1491 > network inside the `Networks` map instead, which contains the same 1492 > information. This field was deprecated in Docker 1.9 and is scheduled 1493 > to be removed in Docker 17.12.0 1494 type: "string" 1495 example: "2001:db8::5689" 1496 GlobalIPv6PrefixLen: 1497 description: | 1498 Mask length of the global IPv6 address. 1499 1500 <p><br /></p> 1501 1502 > **Deprecated**: This field is only propagated when attached to the 1503 > default "bridge" network. Use the information from the "bridge" 1504 > network inside the `Networks` map instead, which contains the same 1505 > information. This field was deprecated in Docker 1.9 and is scheduled 1506 > to be removed in Docker 17.12.0 1507 type: "integer" 1508 example: 64 1509 IPAddress: 1510 description: | 1511 IPv4 address for the default "bridge" network. 1512 1513 <p><br /></p> 1514 1515 > **Deprecated**: This field is only propagated when attached to the 1516 > default "bridge" network. Use the information from the "bridge" 1517 > network inside the `Networks` map instead, which contains the same 1518 > information. This field was deprecated in Docker 1.9 and is scheduled 1519 > to be removed in Docker 17.12.0 1520 type: "string" 1521 example: "172.17.0.4" 1522 IPPrefixLen: 1523 description: | 1524 Mask length of the IPv4 address. 1525 1526 <p><br /></p> 1527 1528 > **Deprecated**: This field is only propagated when attached to the 1529 > default "bridge" network. Use the information from the "bridge" 1530 > network inside the `Networks` map instead, which contains the same 1531 > information. This field was deprecated in Docker 1.9 and is scheduled 1532 > to be removed in Docker 17.12.0 1533 type: "integer" 1534 example: 16 1535 IPv6Gateway: 1536 description: | 1537 IPv6 gateway address for this network. 1538 1539 <p><br /></p> 1540 1541 > **Deprecated**: This field is only propagated when attached to the 1542 > default "bridge" network. Use the information from the "bridge" 1543 > network inside the `Networks` map instead, which contains the same 1544 > information. This field was deprecated in Docker 1.9 and is scheduled 1545 > to be removed in Docker 17.12.0 1546 type: "string" 1547 example: "2001:db8:2::100" 1548 MacAddress: 1549 description: | 1550 MAC address for the container on the default "bridge" network. 1551 1552 <p><br /></p> 1553 1554 > **Deprecated**: This field is only propagated when attached to the 1555 > default "bridge" network. Use the information from the "bridge" 1556 > network inside the `Networks` map instead, which contains the same 1557 > information. This field was deprecated in Docker 1.9 and is scheduled 1558 > to be removed in Docker 17.12.0 1559 type: "string" 1560 example: "02:42:ac:11:00:04" 1561 Networks: 1562 description: | 1563 Information about all networks that the container is connected to. 1564 type: "object" 1565 additionalProperties: 1566 $ref: "#/definitions/EndpointSettings" 1567 1568 Address: 1569 description: Address represents an IPv4 or IPv6 IP address. 1570 type: "object" 1571 properties: 1572 Addr: 1573 description: IP address. 1574 type: "string" 1575 PrefixLen: 1576 description: Mask length of the IP address. 1577 type: "integer" 1578 1579 PortMap: 1580 description: | 1581 PortMap describes the mapping of container ports to host ports, using the 1582 container's port-number and protocol as key in the format `<port>/<protocol>`, 1583 for example, `80/udp`. 1584 1585 If a container's port is mapped for multiple protocols, separate entries 1586 are added to the mapping table. 1587 type: "object" 1588 additionalProperties: 1589 type: "array" 1590 x-nullable: true 1591 items: 1592 $ref: "#/definitions/PortBinding" 1593 example: 1594 "443/tcp": 1595 - HostIp: "127.0.0.1" 1596 HostPort: "4443" 1597 "80/tcp": 1598 - HostIp: "0.0.0.0" 1599 HostPort: "80" 1600 - HostIp: "0.0.0.0" 1601 HostPort: "8080" 1602 "80/udp": 1603 - HostIp: "0.0.0.0" 1604 HostPort: "80" 1605 "53/udp": 1606 - HostIp: "0.0.0.0" 1607 HostPort: "53" 1608 "2377/tcp": null 1609 1610 PortBinding: 1611 description: | 1612 PortBinding represents a binding between a host IP address and a host 1613 port. 1614 type: "object" 1615 properties: 1616 HostIp: 1617 description: "Host IP address that the container's port is mapped to." 1618 type: "string" 1619 example: "127.0.0.1" 1620 HostPort: 1621 description: "Host port number that the container's port is mapped to." 1622 type: "string" 1623 example: "4443" 1624 1625 GraphDriverData: 1626 description: | 1627 Information about the storage driver used to store the container's and 1628 image's filesystem. 1629 type: "object" 1630 required: [Name, Data] 1631 properties: 1632 Name: 1633 description: "Name of the storage driver." 1634 type: "string" 1635 x-nullable: false 1636 example: "overlay2" 1637 Data: 1638 description: | 1639 Low-level storage metadata, provided as key/value pairs. 1640 1641 This information is driver-specific, and depends on the storage-driver 1642 in use, and should be used for informational purposes only. 1643 type: "object" 1644 x-nullable: false 1645 additionalProperties: 1646 type: "string" 1647 example: { 1648 "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged", 1649 "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff", 1650 "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work" 1651 } 1652 1653 FilesystemChange: 1654 description: | 1655 Change in the container's filesystem. 1656 type: "object" 1657 required: [Path, Kind] 1658 properties: 1659 Path: 1660 description: | 1661 Path to file or directory that has changed. 1662 type: "string" 1663 x-nullable: false 1664 Kind: 1665 $ref: "#/definitions/ChangeType" 1666 1667 ChangeType: 1668 description: | 1669 Kind of change 1670 1671 Can be one of: 1672 1673 - `0`: Modified ("C") 1674 - `1`: Added ("A") 1675 - `2`: Deleted ("D") 1676 type: "integer" 1677 format: "uint8" 1678 enum: [0, 1, 2] 1679 x-nullable: false 1680 1681 ImageInspect: 1682 description: | 1683 Information about an image in the local image cache. 1684 type: "object" 1685 properties: 1686 Id: 1687 description: | 1688 ID is the content-addressable ID of an image. 1689 1690 This identifier is a content-addressable digest calculated from the 1691 image's configuration (which includes the digests of layers used by 1692 the image). 1693 1694 Note that this digest differs from the `RepoDigests` below, which 1695 holds digests of image manifests that reference the image. 1696 type: "string" 1697 x-nullable: false 1698 example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" 1699 RepoTags: 1700 description: | 1701 List of image names/tags in the local image cache that reference this 1702 image. 1703 1704 Multiple image tags can refer to the same image, and this list may be 1705 empty if no tags reference the image, in which case the image is 1706 "untagged", in which case it can still be referenced by its ID. 1707 type: "array" 1708 items: 1709 type: "string" 1710 example: 1711 - "example:1.0" 1712 - "example:latest" 1713 - "example:stable" 1714 - "internal.registry.example.com:5000/example:1.0" 1715 RepoDigests: 1716 description: | 1717 List of content-addressable digests of locally available image manifests 1718 that the image is referenced from. Multiple manifests can refer to the 1719 same image. 1720 1721 These digests are usually only available if the image was either pulled 1722 from a registry, or if the image was pushed to a registry, which is when 1723 the manifest is generated and its digest calculated. 1724 type: "array" 1725 items: 1726 type: "string" 1727 example: 1728 - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" 1729 - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" 1730 Parent: 1731 description: | 1732 ID of the parent image. 1733 1734 Depending on how the image was created, this field may be empty and 1735 is only set for images that were built/created locally. This field 1736 is empty if the image was pulled from an image registry. 1737 type: "string" 1738 x-nullable: false 1739 example: "" 1740 Comment: 1741 description: | 1742 Optional message that was set when committing or importing the image. 1743 type: "string" 1744 x-nullable: false 1745 example: "" 1746 Created: 1747 description: | 1748 Date and time at which the image was created, formatted in 1749 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 1750 type: "string" 1751 x-nullable: false 1752 example: "2022-02-04T21:20:12.497794809Z" 1753 Container: 1754 description: | 1755 The ID of the container that was used to create the image. 1756 1757 Depending on how the image was created, this field may be empty. 1758 1759 **Deprecated**: this field is kept for backward compatibility, but 1760 will be removed in API v1.45. 1761 type: "string" 1762 example: "65974bc86f1770ae4bff79f651ebdbce166ae9aada632ee3fa9af3a264911735" 1763 ContainerConfig: 1764 description: | 1765 **Deprecated**: this field is kept for backward compatibility, but 1766 will be removed in API v1.45. 1767 $ref: "#/definitions/ContainerConfig" 1768 DockerVersion: 1769 description: | 1770 The version of Docker that was used to build the image. 1771 1772 Depending on how the image was created, this field may be empty. 1773 type: "string" 1774 x-nullable: false 1775 example: "20.10.7" 1776 Author: 1777 description: | 1778 Name of the author that was specified when committing the image, or as 1779 specified through MAINTAINER (deprecated) in the Dockerfile. 1780 type: "string" 1781 x-nullable: false 1782 example: "" 1783 Config: 1784 $ref: "#/definitions/ContainerConfig" 1785 Architecture: 1786 description: | 1787 Hardware CPU architecture that the image runs on. 1788 type: "string" 1789 x-nullable: false 1790 example: "arm" 1791 Variant: 1792 description: | 1793 CPU architecture variant (presently ARM-only). 1794 type: "string" 1795 x-nullable: true 1796 example: "v7" 1797 Os: 1798 description: | 1799 Operating System the image is built to run on. 1800 type: "string" 1801 x-nullable: false 1802 example: "linux" 1803 OsVersion: 1804 description: | 1805 Operating System version the image is built to run on (especially 1806 for Windows). 1807 type: "string" 1808 example: "" 1809 x-nullable: true 1810 Size: 1811 description: | 1812 Total size of the image including all layers it is composed of. 1813 type: "integer" 1814 format: "int64" 1815 x-nullable: false 1816 example: 1239828 1817 VirtualSize: 1818 description: | 1819 Total size of the image including all layers it is composed of. 1820 1821 Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. 1822 type: "integer" 1823 format: "int64" 1824 example: 1239828 1825 GraphDriver: 1826 $ref: "#/definitions/GraphDriverData" 1827 RootFS: 1828 description: | 1829 Information about the image's RootFS, including the layer IDs. 1830 type: "object" 1831 required: [Type] 1832 properties: 1833 Type: 1834 type: "string" 1835 x-nullable: false 1836 example: "layers" 1837 Layers: 1838 type: "array" 1839 items: 1840 type: "string" 1841 example: 1842 - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" 1843 - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" 1844 Metadata: 1845 description: | 1846 Additional metadata of the image in the local cache. This information 1847 is local to the daemon, and not part of the image itself. 1848 type: "object" 1849 properties: 1850 LastTagTime: 1851 description: | 1852 Date and time at which the image was last tagged in 1853 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 1854 1855 This information is only available if the image was tagged locally, 1856 and omitted otherwise. 1857 type: "string" 1858 format: "dateTime" 1859 example: "2022-02-28T14:40:02.623929178Z" 1860 x-nullable: true 1861 ImageSummary: 1862 type: "object" 1863 x-go-name: "Summary" 1864 required: 1865 - Id 1866 - ParentId 1867 - RepoTags 1868 - RepoDigests 1869 - Created 1870 - Size 1871 - SharedSize 1872 - Labels 1873 - Containers 1874 properties: 1875 Id: 1876 description: | 1877 ID is the content-addressable ID of an image. 1878 1879 This identifier is a content-addressable digest calculated from the 1880 image's configuration (which includes the digests of layers used by 1881 the image). 1882 1883 Note that this digest differs from the `RepoDigests` below, which 1884 holds digests of image manifests that reference the image. 1885 type: "string" 1886 x-nullable: false 1887 example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" 1888 ParentId: 1889 description: | 1890 ID of the parent image. 1891 1892 Depending on how the image was created, this field may be empty and 1893 is only set for images that were built/created locally. This field 1894 is empty if the image was pulled from an image registry. 1895 type: "string" 1896 x-nullable: false 1897 example: "" 1898 RepoTags: 1899 description: | 1900 List of image names/tags in the local image cache that reference this 1901 image. 1902 1903 Multiple image tags can refer to the same image, and this list may be 1904 empty if no tags reference the image, in which case the image is 1905 "untagged", in which case it can still be referenced by its ID. 1906 type: "array" 1907 x-nullable: false 1908 items: 1909 type: "string" 1910 example: 1911 - "example:1.0" 1912 - "example:latest" 1913 - "example:stable" 1914 - "internal.registry.example.com:5000/example:1.0" 1915 RepoDigests: 1916 description: | 1917 List of content-addressable digests of locally available image manifests 1918 that the image is referenced from. Multiple manifests can refer to the 1919 same image. 1920 1921 These digests are usually only available if the image was either pulled 1922 from a registry, or if the image was pushed to a registry, which is when 1923 the manifest is generated and its digest calculated. 1924 type: "array" 1925 x-nullable: false 1926 items: 1927 type: "string" 1928 example: 1929 - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" 1930 - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" 1931 Created: 1932 description: | 1933 Date and time at which the image was created as a Unix timestamp 1934 (number of seconds sinds EPOCH). 1935 type: "integer" 1936 x-nullable: false 1937 example: "1644009612" 1938 Size: 1939 description: | 1940 Total size of the image including all layers it is composed of. 1941 type: "integer" 1942 format: "int64" 1943 x-nullable: false 1944 example: 172064416 1945 SharedSize: 1946 description: | 1947 Total size of image layers that are shared between this image and other 1948 images. 1949 1950 This size is not calculated by default. `-1` indicates that the value 1951 has not been set / calculated. 1952 type: "integer" 1953 format: "int64" 1954 x-nullable: false 1955 example: 1239828 1956 VirtualSize: 1957 description: |- 1958 Total size of the image including all layers it is composed of. 1959 1960 Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. 1961 type: "integer" 1962 format: "int64" 1963 example: 172064416 1964 Labels: 1965 description: "User-defined key/value metadata." 1966 type: "object" 1967 x-nullable: false 1968 additionalProperties: 1969 type: "string" 1970 example: 1971 com.example.some-label: "some-value" 1972 com.example.some-other-label: "some-other-value" 1973 Containers: 1974 description: | 1975 Number of containers using this image. Includes both stopped and running 1976 containers. 1977 1978 This size is not calculated by default, and depends on which API endpoint 1979 is used. `-1` indicates that the value has not been set / calculated. 1980 x-nullable: false 1981 type: "integer" 1982 example: 2 1983 1984 AuthConfig: 1985 type: "object" 1986 properties: 1987 username: 1988 type: "string" 1989 password: 1990 type: "string" 1991 email: 1992 type: "string" 1993 serveraddress: 1994 type: "string" 1995 example: 1996 username: "hannibal" 1997 password: "xxxx" 1998 serveraddress: "https://index.docker.io/v1/" 1999 2000 ProcessConfig: 2001 type: "object" 2002 properties: 2003 privileged: 2004 type: "boolean" 2005 user: 2006 type: "string" 2007 tty: 2008 type: "boolean" 2009 entrypoint: 2010 type: "string" 2011 arguments: 2012 type: "array" 2013 items: 2014 type: "string" 2015 2016 Volume: 2017 type: "object" 2018 required: [Name, Driver, Mountpoint, Labels, Scope, Options] 2019 properties: 2020 Name: 2021 type: "string" 2022 description: "Name of the volume." 2023 x-nullable: false 2024 example: "tardis" 2025 Driver: 2026 type: "string" 2027 description: "Name of the volume driver used by the volume." 2028 x-nullable: false 2029 example: "custom" 2030 Mountpoint: 2031 type: "string" 2032 description: "Mount path of the volume on the host." 2033 x-nullable: false 2034 example: "/var/lib/docker/volumes/tardis" 2035 CreatedAt: 2036 type: "string" 2037 format: "dateTime" 2038 description: "Date/Time the volume was created." 2039 example: "2016-06-07T20:31:11.853781916Z" 2040 Status: 2041 type: "object" 2042 description: | 2043 Low-level details about the volume, provided by the volume driver. 2044 Details are returned as a map with key/value pairs: 2045 `{"key":"value","key2":"value2"}`. 2046 2047 The `Status` field is optional, and is omitted if the volume driver 2048 does not support this feature. 2049 additionalProperties: 2050 type: "object" 2051 example: 2052 hello: "world" 2053 Labels: 2054 type: "object" 2055 description: "User-defined key/value metadata." 2056 x-nullable: false 2057 additionalProperties: 2058 type: "string" 2059 example: 2060 com.example.some-label: "some-value" 2061 com.example.some-other-label: "some-other-value" 2062 Scope: 2063 type: "string" 2064 description: | 2065 The level at which the volume exists. Either `global` for cluster-wide, 2066 or `local` for machine level. 2067 default: "local" 2068 x-nullable: false 2069 enum: ["local", "global"] 2070 example: "local" 2071 ClusterVolume: 2072 $ref: "#/definitions/ClusterVolume" 2073 Options: 2074 type: "object" 2075 description: | 2076 The driver specific options used when creating the volume. 2077 additionalProperties: 2078 type: "string" 2079 example: 2080 device: "tmpfs" 2081 o: "size=100m,uid=1000" 2082 type: "tmpfs" 2083 UsageData: 2084 type: "object" 2085 x-nullable: true 2086 x-go-name: "UsageData" 2087 required: [Size, RefCount] 2088 description: | 2089 Usage details about the volume. This information is used by the 2090 `GET /system/df` endpoint, and omitted in other endpoints. 2091 properties: 2092 Size: 2093 type: "integer" 2094 format: "int64" 2095 default: -1 2096 description: | 2097 Amount of disk space used by the volume (in bytes). This information 2098 is only available for volumes created with the `"local"` volume 2099 driver. For volumes created with other volume drivers, this field 2100 is set to `-1` ("not available") 2101 x-nullable: false 2102 RefCount: 2103 type: "integer" 2104 format: "int64" 2105 default: -1 2106 description: | 2107 The number of containers referencing this volume. This field 2108 is set to `-1` if the reference-count is not available. 2109 x-nullable: false 2110 2111 VolumeCreateOptions: 2112 description: "Volume configuration" 2113 type: "object" 2114 title: "VolumeConfig" 2115 x-go-name: "CreateOptions" 2116 properties: 2117 Name: 2118 description: | 2119 The new volume's name. If not specified, Docker generates a name. 2120 type: "string" 2121 x-nullable: false 2122 example: "tardis" 2123 Driver: 2124 description: "Name of the volume driver to use." 2125 type: "string" 2126 default: "local" 2127 x-nullable: false 2128 example: "custom" 2129 DriverOpts: 2130 description: | 2131 A mapping of driver options and values. These options are 2132 passed directly to the driver and are driver specific. 2133 type: "object" 2134 additionalProperties: 2135 type: "string" 2136 example: 2137 device: "tmpfs" 2138 o: "size=100m,uid=1000" 2139 type: "tmpfs" 2140 Labels: 2141 description: "User-defined key/value metadata." 2142 type: "object" 2143 additionalProperties: 2144 type: "string" 2145 example: 2146 com.example.some-label: "some-value" 2147 com.example.some-other-label: "some-other-value" 2148 ClusterVolumeSpec: 2149 $ref: "#/definitions/ClusterVolumeSpec" 2150 2151 VolumeListResponse: 2152 type: "object" 2153 title: "VolumeListResponse" 2154 x-go-name: "ListResponse" 2155 description: "Volume list response" 2156 properties: 2157 Volumes: 2158 type: "array" 2159 description: "List of volumes" 2160 items: 2161 $ref: "#/definitions/Volume" 2162 Warnings: 2163 type: "array" 2164 description: | 2165 Warnings that occurred when fetching the list of volumes. 2166 items: 2167 type: "string" 2168 example: [] 2169 2170 Network: 2171 type: "object" 2172 properties: 2173 Name: 2174 type: "string" 2175 Id: 2176 type: "string" 2177 Created: 2178 type: "string" 2179 format: "dateTime" 2180 Scope: 2181 type: "string" 2182 Driver: 2183 type: "string" 2184 EnableIPv6: 2185 type: "boolean" 2186 IPAM: 2187 $ref: "#/definitions/IPAM" 2188 Internal: 2189 type: "boolean" 2190 Attachable: 2191 type: "boolean" 2192 Ingress: 2193 type: "boolean" 2194 Containers: 2195 type: "object" 2196 additionalProperties: 2197 $ref: "#/definitions/NetworkContainer" 2198 Options: 2199 type: "object" 2200 additionalProperties: 2201 type: "string" 2202 Labels: 2203 type: "object" 2204 additionalProperties: 2205 type: "string" 2206 example: 2207 Name: "net01" 2208 Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" 2209 Created: "2016-10-19T04:33:30.360899459Z" 2210 Scope: "local" 2211 Driver: "bridge" 2212 EnableIPv6: false 2213 IPAM: 2214 Driver: "default" 2215 Config: 2216 - Subnet: "172.19.0.0/16" 2217 Gateway: "172.19.0.1" 2218 Options: 2219 foo: "bar" 2220 Internal: false 2221 Attachable: false 2222 Ingress: false 2223 Containers: 2224 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: 2225 Name: "test" 2226 EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" 2227 MacAddress: "02:42:ac:13:00:02" 2228 IPv4Address: "172.19.0.2/16" 2229 IPv6Address: "" 2230 Options: 2231 com.docker.network.bridge.default_bridge: "true" 2232 com.docker.network.bridge.enable_icc: "true" 2233 com.docker.network.bridge.enable_ip_masquerade: "true" 2234 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 2235 com.docker.network.bridge.name: "docker0" 2236 com.docker.network.driver.mtu: "1500" 2237 Labels: 2238 com.example.some-label: "some-value" 2239 com.example.some-other-label: "some-other-value" 2240 IPAM: 2241 type: "object" 2242 properties: 2243 Driver: 2244 description: "Name of the IPAM driver to use." 2245 type: "string" 2246 default: "default" 2247 Config: 2248 description: | 2249 List of IPAM configuration options, specified as a map: 2250 2251 ``` 2252 {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>} 2253 ``` 2254 type: "array" 2255 items: 2256 $ref: "#/definitions/IPAMConfig" 2257 Options: 2258 description: "Driver-specific options, specified as a map." 2259 type: "object" 2260 additionalProperties: 2261 type: "string" 2262 2263 IPAMConfig: 2264 type: "object" 2265 properties: 2266 Subnet: 2267 type: "string" 2268 IPRange: 2269 type: "string" 2270 Gateway: 2271 type: "string" 2272 AuxiliaryAddresses: 2273 type: "object" 2274 additionalProperties: 2275 type: "string" 2276 2277 NetworkContainer: 2278 type: "object" 2279 properties: 2280 Name: 2281 type: "string" 2282 EndpointID: 2283 type: "string" 2284 MacAddress: 2285 type: "string" 2286 IPv4Address: 2287 type: "string" 2288 IPv6Address: 2289 type: "string" 2290 2291 BuildInfo: 2292 type: "object" 2293 properties: 2294 id: 2295 type: "string" 2296 stream: 2297 type: "string" 2298 error: 2299 type: "string" 2300 errorDetail: 2301 $ref: "#/definitions/ErrorDetail" 2302 status: 2303 type: "string" 2304 progress: 2305 type: "string" 2306 progressDetail: 2307 $ref: "#/definitions/ProgressDetail" 2308 aux: 2309 $ref: "#/definitions/ImageID" 2310 2311 BuildCache: 2312 type: "object" 2313 description: | 2314 BuildCache contains information about a build cache record. 2315 properties: 2316 ID: 2317 type: "string" 2318 description: | 2319 Unique ID of the build cache record. 2320 example: "ndlpt0hhvkqcdfkputsk4cq9c" 2321 Parent: 2322 description: | 2323 ID of the parent build cache record. 2324 2325 > **Deprecated**: This field is deprecated, and omitted if empty. 2326 type: "string" 2327 x-nullable: true 2328 example: "" 2329 Parents: 2330 description: | 2331 List of parent build cache record IDs. 2332 type: "array" 2333 items: 2334 type: "string" 2335 x-nullable: true 2336 example: ["hw53o5aio51xtltp5xjp8v7fx"] 2337 Type: 2338 type: "string" 2339 description: | 2340 Cache record type. 2341 example: "regular" 2342 # see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84 2343 enum: 2344 - "internal" 2345 - "frontend" 2346 - "source.local" 2347 - "source.git.checkout" 2348 - "exec.cachemount" 2349 - "regular" 2350 Description: 2351 type: "string" 2352 description: | 2353 Description of the build-step that produced the build cache. 2354 example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" 2355 InUse: 2356 type: "boolean" 2357 description: | 2358 Indicates if the build cache is in use. 2359 example: false 2360 Shared: 2361 type: "boolean" 2362 description: | 2363 Indicates if the build cache is shared. 2364 example: true 2365 Size: 2366 description: | 2367 Amount of disk space used by the build cache (in bytes). 2368 type: "integer" 2369 example: 51 2370 CreatedAt: 2371 description: | 2372 Date and time at which the build cache was created in 2373 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2374 type: "string" 2375 format: "dateTime" 2376 example: "2016-08-18T10:44:24.496525531Z" 2377 LastUsedAt: 2378 description: | 2379 Date and time at which the build cache was last used in 2380 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2381 type: "string" 2382 format: "dateTime" 2383 x-nullable: true 2384 example: "2017-08-09T07:09:37.632105588Z" 2385 UsageCount: 2386 type: "integer" 2387 example: 26 2388 2389 ImageID: 2390 type: "object" 2391 description: "Image ID or Digest" 2392 properties: 2393 ID: 2394 type: "string" 2395 example: 2396 ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" 2397 2398 CreateImageInfo: 2399 type: "object" 2400 properties: 2401 id: 2402 type: "string" 2403 error: 2404 type: "string" 2405 errorDetail: 2406 $ref: "#/definitions/ErrorDetail" 2407 status: 2408 type: "string" 2409 progress: 2410 type: "string" 2411 progressDetail: 2412 $ref: "#/definitions/ProgressDetail" 2413 2414 PushImageInfo: 2415 type: "object" 2416 properties: 2417 error: 2418 type: "string" 2419 status: 2420 type: "string" 2421 progress: 2422 type: "string" 2423 progressDetail: 2424 $ref: "#/definitions/ProgressDetail" 2425 2426 ErrorDetail: 2427 type: "object" 2428 properties: 2429 code: 2430 type: "integer" 2431 message: 2432 type: "string" 2433 2434 ProgressDetail: 2435 type: "object" 2436 properties: 2437 current: 2438 type: "integer" 2439 total: 2440 type: "integer" 2441 2442 ErrorResponse: 2443 description: "Represents an error." 2444 type: "object" 2445 required: ["message"] 2446 properties: 2447 message: 2448 description: "The error message." 2449 type: "string" 2450 x-nullable: false 2451 example: 2452 message: "Something went wrong." 2453 2454 IdResponse: 2455 description: "Response to an API call that returns just an Id" 2456 type: "object" 2457 required: ["Id"] 2458 properties: 2459 Id: 2460 description: "The id of the newly created object." 2461 type: "string" 2462 x-nullable: false 2463 2464 EndpointSettings: 2465 description: "Configuration for a network endpoint." 2466 type: "object" 2467 properties: 2468 # Configurations 2469 IPAMConfig: 2470 $ref: "#/definitions/EndpointIPAMConfig" 2471 Links: 2472 type: "array" 2473 items: 2474 type: "string" 2475 example: 2476 - "container_1" 2477 - "container_2" 2478 MacAddress: 2479 description: | 2480 MAC address for the endpoint on this network. The network driver might ignore this parameter. 2481 type: "string" 2482 example: "02:42:ac:11:00:04" 2483 Aliases: 2484 type: "array" 2485 items: 2486 type: "string" 2487 example: 2488 - "server_x" 2489 - "server_y" 2490 2491 # Operational data 2492 NetworkID: 2493 description: | 2494 Unique ID of the network. 2495 type: "string" 2496 example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" 2497 EndpointID: 2498 description: | 2499 Unique ID for the service endpoint in a Sandbox. 2500 type: "string" 2501 example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" 2502 Gateway: 2503 description: | 2504 Gateway address for this network. 2505 type: "string" 2506 example: "172.17.0.1" 2507 IPAddress: 2508 description: | 2509 IPv4 address. 2510 type: "string" 2511 example: "172.17.0.4" 2512 IPPrefixLen: 2513 description: | 2514 Mask length of the IPv4 address. 2515 type: "integer" 2516 example: 16 2517 IPv6Gateway: 2518 description: | 2519 IPv6 gateway address. 2520 type: "string" 2521 example: "2001:db8:2::100" 2522 GlobalIPv6Address: 2523 description: | 2524 Global IPv6 address. 2525 type: "string" 2526 example: "2001:db8::5689" 2527 GlobalIPv6PrefixLen: 2528 description: | 2529 Mask length of the global IPv6 address. 2530 type: "integer" 2531 format: "int64" 2532 example: 64 2533 DriverOpts: 2534 description: | 2535 DriverOpts is a mapping of driver options and values. These options 2536 are passed directly to the driver and are driver specific. 2537 type: "object" 2538 x-nullable: true 2539 additionalProperties: 2540 type: "string" 2541 example: 2542 com.example.some-label: "some-value" 2543 com.example.some-other-label: "some-other-value" 2544 DNSNames: 2545 description: | 2546 List of all DNS names an endpoint has on a specific network. This 2547 list is based on the container name, network aliases, container short 2548 ID, and hostname. 2549 2550 These DNS names are non-fully qualified but can contain several dots. 2551 You can get fully qualified DNS names by appending `.<network-name>`. 2552 For instance, if container name is `my.ctr` and the network is named 2553 `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be 2554 `my.ctr.testnet`. 2555 type: array 2556 items: 2557 type: string 2558 example: ["foobar", "server_x", "server_y", "my.ctr"] 2559 2560 EndpointIPAMConfig: 2561 description: | 2562 EndpointIPAMConfig represents an endpoint's IPAM configuration. 2563 type: "object" 2564 x-nullable: true 2565 properties: 2566 IPv4Address: 2567 type: "string" 2568 example: "172.20.30.33" 2569 IPv6Address: 2570 type: "string" 2571 example: "2001:db8:abcd::3033" 2572 LinkLocalIPs: 2573 type: "array" 2574 items: 2575 type: "string" 2576 example: 2577 - "169.254.34.68" 2578 - "fe80::3468" 2579 2580 PluginMount: 2581 type: "object" 2582 x-nullable: false 2583 required: [Name, Description, Settable, Source, Destination, Type, Options] 2584 properties: 2585 Name: 2586 type: "string" 2587 x-nullable: false 2588 example: "some-mount" 2589 Description: 2590 type: "string" 2591 x-nullable: false 2592 example: "This is a mount that's used by the plugin." 2593 Settable: 2594 type: "array" 2595 items: 2596 type: "string" 2597 Source: 2598 type: "string" 2599 example: "/var/lib/docker/plugins/" 2600 Destination: 2601 type: "string" 2602 x-nullable: false 2603 example: "/mnt/state" 2604 Type: 2605 type: "string" 2606 x-nullable: false 2607 example: "bind" 2608 Options: 2609 type: "array" 2610 items: 2611 type: "string" 2612 example: 2613 - "rbind" 2614 - "rw" 2615 2616 PluginDevice: 2617 type: "object" 2618 required: [Name, Description, Settable, Path] 2619 x-nullable: false 2620 properties: 2621 Name: 2622 type: "string" 2623 x-nullable: false 2624 Description: 2625 type: "string" 2626 x-nullable: false 2627 Settable: 2628 type: "array" 2629 items: 2630 type: "string" 2631 Path: 2632 type: "string" 2633 example: "/dev/fuse" 2634 2635 PluginEnv: 2636 type: "object" 2637 x-nullable: false 2638 required: [Name, Description, Settable, Value] 2639 properties: 2640 Name: 2641 x-nullable: false 2642 type: "string" 2643 Description: 2644 x-nullable: false 2645 type: "string" 2646 Settable: 2647 type: "array" 2648 items: 2649 type: "string" 2650 Value: 2651 type: "string" 2652 2653 PluginInterfaceType: 2654 type: "object" 2655 x-nullable: false 2656 required: [Prefix, Capability, Version] 2657 properties: 2658 Prefix: 2659 type: "string" 2660 x-nullable: false 2661 Capability: 2662 type: "string" 2663 x-nullable: false 2664 Version: 2665 type: "string" 2666 x-nullable: false 2667 2668 PluginPrivilege: 2669 description: | 2670 Describes a permission the user has to accept upon installing 2671 the plugin. 2672 type: "object" 2673 x-go-name: "PluginPrivilege" 2674 properties: 2675 Name: 2676 type: "string" 2677 example: "network" 2678 Description: 2679 type: "string" 2680 Value: 2681 type: "array" 2682 items: 2683 type: "string" 2684 example: 2685 - "host" 2686 2687 Plugin: 2688 description: "A plugin for the Engine API" 2689 type: "object" 2690 required: [Settings, Enabled, Config, Name] 2691 properties: 2692 Id: 2693 type: "string" 2694 example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 2695 Name: 2696 type: "string" 2697 x-nullable: false 2698 example: "tiborvass/sample-volume-plugin" 2699 Enabled: 2700 description: 2701 True if the plugin is running. False if the plugin is not running, 2702 only installed. 2703 type: "boolean" 2704 x-nullable: false 2705 example: true 2706 Settings: 2707 description: "Settings that can be modified by users." 2708 type: "object" 2709 x-nullable: false 2710 required: [Args, Devices, Env, Mounts] 2711 properties: 2712 Mounts: 2713 type: "array" 2714 items: 2715 $ref: "#/definitions/PluginMount" 2716 Env: 2717 type: "array" 2718 items: 2719 type: "string" 2720 example: 2721 - "DEBUG=0" 2722 Args: 2723 type: "array" 2724 items: 2725 type: "string" 2726 Devices: 2727 type: "array" 2728 items: 2729 $ref: "#/definitions/PluginDevice" 2730 PluginReference: 2731 description: "plugin remote reference used to push/pull the plugin" 2732 type: "string" 2733 x-nullable: false 2734 example: "localhost:5000/tiborvass/sample-volume-plugin:latest" 2735 Config: 2736 description: "The config of a plugin." 2737 type: "object" 2738 x-nullable: false 2739 required: 2740 - Description 2741 - Documentation 2742 - Interface 2743 - Entrypoint 2744 - WorkDir 2745 - Network 2746 - Linux 2747 - PidHost 2748 - PropagatedMount 2749 - IpcHost 2750 - Mounts 2751 - Env 2752 - Args 2753 properties: 2754 DockerVersion: 2755 description: "Docker Version used to create the plugin" 2756 type: "string" 2757 x-nullable: false 2758 example: "17.06.0-ce" 2759 Description: 2760 type: "string" 2761 x-nullable: false 2762 example: "A sample volume plugin for Docker" 2763 Documentation: 2764 type: "string" 2765 x-nullable: false 2766 example: "https://docs.docker.com/engine/extend/plugins/" 2767 Interface: 2768 description: "The interface between Docker and the plugin" 2769 x-nullable: false 2770 type: "object" 2771 required: [Types, Socket] 2772 properties: 2773 Types: 2774 type: "array" 2775 items: 2776 $ref: "#/definitions/PluginInterfaceType" 2777 example: 2778 - "docker.volumedriver/1.0" 2779 Socket: 2780 type: "string" 2781 x-nullable: false 2782 example: "plugins.sock" 2783 ProtocolScheme: 2784 type: "string" 2785 example: "some.protocol/v1.0" 2786 description: "Protocol to use for clients connecting to the plugin." 2787 enum: 2788 - "" 2789 - "moby.plugins.http/v1" 2790 Entrypoint: 2791 type: "array" 2792 items: 2793 type: "string" 2794 example: 2795 - "/usr/bin/sample-volume-plugin" 2796 - "/data" 2797 WorkDir: 2798 type: "string" 2799 x-nullable: false 2800 example: "/bin/" 2801 User: 2802 type: "object" 2803 x-nullable: false 2804 properties: 2805 UID: 2806 type: "integer" 2807 format: "uint32" 2808 example: 1000 2809 GID: 2810 type: "integer" 2811 format: "uint32" 2812 example: 1000 2813 Network: 2814 type: "object" 2815 x-nullable: false 2816 required: [Type] 2817 properties: 2818 Type: 2819 x-nullable: false 2820 type: "string" 2821 example: "host" 2822 Linux: 2823 type: "object" 2824 x-nullable: false 2825 required: [Capabilities, AllowAllDevices, Devices] 2826 properties: 2827 Capabilities: 2828 type: "array" 2829 items: 2830 type: "string" 2831 example: 2832 - "CAP_SYS_ADMIN" 2833 - "CAP_SYSLOG" 2834 AllowAllDevices: 2835 type: "boolean" 2836 x-nullable: false 2837 example: false 2838 Devices: 2839 type: "array" 2840 items: 2841 $ref: "#/definitions/PluginDevice" 2842 PropagatedMount: 2843 type: "string" 2844 x-nullable: false 2845 example: "/mnt/volumes" 2846 IpcHost: 2847 type: "boolean" 2848 x-nullable: false 2849 example: false 2850 PidHost: 2851 type: "boolean" 2852 x-nullable: false 2853 example: false 2854 Mounts: 2855 type: "array" 2856 items: 2857 $ref: "#/definitions/PluginMount" 2858 Env: 2859 type: "array" 2860 items: 2861 $ref: "#/definitions/PluginEnv" 2862 example: 2863 - Name: "DEBUG" 2864 Description: "If set, prints debug messages" 2865 Settable: null 2866 Value: "0" 2867 Args: 2868 type: "object" 2869 x-nullable: false 2870 required: [Name, Description, Settable, Value] 2871 properties: 2872 Name: 2873 x-nullable: false 2874 type: "string" 2875 example: "args" 2876 Description: 2877 x-nullable: false 2878 type: "string" 2879 example: "command line arguments" 2880 Settable: 2881 type: "array" 2882 items: 2883 type: "string" 2884 Value: 2885 type: "array" 2886 items: 2887 type: "string" 2888 rootfs: 2889 type: "object" 2890 properties: 2891 type: 2892 type: "string" 2893 example: "layers" 2894 diff_ids: 2895 type: "array" 2896 items: 2897 type: "string" 2898 example: 2899 - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" 2900 - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" 2901 2902 ObjectVersion: 2903 description: | 2904 The version number of the object such as node, service, etc. This is needed 2905 to avoid conflicting writes. The client must send the version number along 2906 with the modified specification when updating these objects. 2907 2908 This approach ensures safe concurrency and determinism in that the change 2909 on the object may not be applied if the version number has changed from the 2910 last read. In other words, if two update requests specify the same base 2911 version, only one of the requests can succeed. As a result, two separate 2912 update requests that happen at the same time will not unintentionally 2913 overwrite each other. 2914 type: "object" 2915 properties: 2916 Index: 2917 type: "integer" 2918 format: "uint64" 2919 example: 373531 2920 2921 NodeSpec: 2922 type: "object" 2923 properties: 2924 Name: 2925 description: "Name for the node." 2926 type: "string" 2927 example: "my-node" 2928 Labels: 2929 description: "User-defined key/value metadata." 2930 type: "object" 2931 additionalProperties: 2932 type: "string" 2933 Role: 2934 description: "Role of the node." 2935 type: "string" 2936 enum: 2937 - "worker" 2938 - "manager" 2939 example: "manager" 2940 Availability: 2941 description: "Availability of the node." 2942 type: "string" 2943 enum: 2944 - "active" 2945 - "pause" 2946 - "drain" 2947 example: "active" 2948 example: 2949 Availability: "active" 2950 Name: "node-name" 2951 Role: "manager" 2952 Labels: 2953 foo: "bar" 2954 2955 Node: 2956 type: "object" 2957 properties: 2958 ID: 2959 type: "string" 2960 example: "24ifsmvkjbyhk" 2961 Version: 2962 $ref: "#/definitions/ObjectVersion" 2963 CreatedAt: 2964 description: | 2965 Date and time at which the node was added to the swarm in 2966 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2967 type: "string" 2968 format: "dateTime" 2969 example: "2016-08-18T10:44:24.496525531Z" 2970 UpdatedAt: 2971 description: | 2972 Date and time at which the node was last updated in 2973 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2974 type: "string" 2975 format: "dateTime" 2976 example: "2017-08-09T07:09:37.632105588Z" 2977 Spec: 2978 $ref: "#/definitions/NodeSpec" 2979 Description: 2980 $ref: "#/definitions/NodeDescription" 2981 Status: 2982 $ref: "#/definitions/NodeStatus" 2983 ManagerStatus: 2984 $ref: "#/definitions/ManagerStatus" 2985 2986 NodeDescription: 2987 description: | 2988 NodeDescription encapsulates the properties of the Node as reported by the 2989 agent. 2990 type: "object" 2991 properties: 2992 Hostname: 2993 type: "string" 2994 example: "bf3067039e47" 2995 Platform: 2996 $ref: "#/definitions/Platform" 2997 Resources: 2998 $ref: "#/definitions/ResourceObject" 2999 Engine: 3000 $ref: "#/definitions/EngineDescription" 3001 TLSInfo: 3002 $ref: "#/definitions/TLSInfo" 3003 3004 Platform: 3005 description: | 3006 Platform represents the platform (Arch/OS). 3007 type: "object" 3008 properties: 3009 Architecture: 3010 description: | 3011 Architecture represents the hardware architecture (for example, 3012 `x86_64`). 3013 type: "string" 3014 example: "x86_64" 3015 OS: 3016 description: | 3017 OS represents the Operating System (for example, `linux` or `windows`). 3018 type: "string" 3019 example: "linux" 3020 3021 EngineDescription: 3022 description: "EngineDescription provides information about an engine." 3023 type: "object" 3024 properties: 3025 EngineVersion: 3026 type: "string" 3027 example: "17.06.0" 3028 Labels: 3029 type: "object" 3030 additionalProperties: 3031 type: "string" 3032 example: 3033 foo: "bar" 3034 Plugins: 3035 type: "array" 3036 items: 3037 type: "object" 3038 properties: 3039 Type: 3040 type: "string" 3041 Name: 3042 type: "string" 3043 example: 3044 - Type: "Log" 3045 Name: "awslogs" 3046 - Type: "Log" 3047 Name: "fluentd" 3048 - Type: "Log" 3049 Name: "gcplogs" 3050 - Type: "Log" 3051 Name: "gelf" 3052 - Type: "Log" 3053 Name: "journald" 3054 - Type: "Log" 3055 Name: "json-file" 3056 - Type: "Log" 3057 Name: "splunk" 3058 - Type: "Log" 3059 Name: "syslog" 3060 - Type: "Network" 3061 Name: "bridge" 3062 - Type: "Network" 3063 Name: "host" 3064 - Type: "Network" 3065 Name: "ipvlan" 3066 - Type: "Network" 3067 Name: "macvlan" 3068 - Type: "Network" 3069 Name: "null" 3070 - Type: "Network" 3071 Name: "overlay" 3072 - Type: "Volume" 3073 Name: "local" 3074 - Type: "Volume" 3075 Name: "localhost:5000/vieux/sshfs:latest" 3076 - Type: "Volume" 3077 Name: "vieux/sshfs:latest" 3078 3079 TLSInfo: 3080 description: | 3081 Information about the issuer of leaf TLS certificates and the trusted root 3082 CA certificate. 3083 type: "object" 3084 properties: 3085 TrustRoot: 3086 description: | 3087 The root CA certificate(s) that are used to validate leaf TLS 3088 certificates. 3089 type: "string" 3090 CertIssuerSubject: 3091 description: 3092 The base64-url-safe-encoded raw subject bytes of the issuer. 3093 type: "string" 3094 CertIssuerPublicKey: 3095 description: | 3096 The base64-url-safe-encoded raw public key bytes of the issuer. 3097 type: "string" 3098 example: 3099 TrustRoot: | 3100 -----BEGIN CERTIFICATE----- 3101 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 3102 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 3103 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 3104 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 3105 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 3106 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 3107 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 3108 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 3109 -----END CERTIFICATE----- 3110 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 3111 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 3112 3113 NodeStatus: 3114 description: | 3115 NodeStatus represents the status of a node. 3116 3117 It provides the current status of the node, as seen by the manager. 3118 type: "object" 3119 properties: 3120 State: 3121 $ref: "#/definitions/NodeState" 3122 Message: 3123 type: "string" 3124 example: "" 3125 Addr: 3126 description: "IP address of the node." 3127 type: "string" 3128 example: "172.17.0.2" 3129 3130 NodeState: 3131 description: "NodeState represents the state of a node." 3132 type: "string" 3133 enum: 3134 - "unknown" 3135 - "down" 3136 - "ready" 3137 - "disconnected" 3138 example: "ready" 3139 3140 ManagerStatus: 3141 description: | 3142 ManagerStatus represents the status of a manager. 3143 3144 It provides the current status of a node's manager component, if the node 3145 is a manager. 3146 x-nullable: true 3147 type: "object" 3148 properties: 3149 Leader: 3150 type: "boolean" 3151 default: false 3152 example: true 3153 Reachability: 3154 $ref: "#/definitions/Reachability" 3155 Addr: 3156 description: | 3157 The IP address and port at which the manager is reachable. 3158 type: "string" 3159 example: "10.0.0.46:2377" 3160 3161 Reachability: 3162 description: "Reachability represents the reachability of a node." 3163 type: "string" 3164 enum: 3165 - "unknown" 3166 - "unreachable" 3167 - "reachable" 3168 example: "reachable" 3169 3170 SwarmSpec: 3171 description: "User modifiable swarm configuration." 3172 type: "object" 3173 properties: 3174 Name: 3175 description: "Name of the swarm." 3176 type: "string" 3177 example: "default" 3178 Labels: 3179 description: "User-defined key/value metadata." 3180 type: "object" 3181 additionalProperties: 3182 type: "string" 3183 example: 3184 com.example.corp.type: "production" 3185 com.example.corp.department: "engineering" 3186 Orchestration: 3187 description: "Orchestration configuration." 3188 type: "object" 3189 x-nullable: true 3190 properties: 3191 TaskHistoryRetentionLimit: 3192 description: | 3193 The number of historic tasks to keep per instance or node. If 3194 negative, never remove completed or failed tasks. 3195 type: "integer" 3196 format: "int64" 3197 example: 10 3198 Raft: 3199 description: "Raft configuration." 3200 type: "object" 3201 properties: 3202 SnapshotInterval: 3203 description: "The number of log entries between snapshots." 3204 type: "integer" 3205 format: "uint64" 3206 example: 10000 3207 KeepOldSnapshots: 3208 description: | 3209 The number of snapshots to keep beyond the current snapshot. 3210 type: "integer" 3211 format: "uint64" 3212 LogEntriesForSlowFollowers: 3213 description: | 3214 The number of log entries to keep around to sync up slow followers 3215 after a snapshot is created. 3216 type: "integer" 3217 format: "uint64" 3218 example: 500 3219 ElectionTick: 3220 description: | 3221 The number of ticks that a follower will wait for a message from 3222 the leader before becoming a candidate and starting an election. 3223 `ElectionTick` must be greater than `HeartbeatTick`. 3224 3225 A tick currently defaults to one second, so these translate 3226 directly to seconds currently, but this is NOT guaranteed. 3227 type: "integer" 3228 example: 3 3229 HeartbeatTick: 3230 description: | 3231 The number of ticks between heartbeats. Every HeartbeatTick ticks, 3232 the leader will send a heartbeat to the followers. 3233 3234 A tick currently defaults to one second, so these translate 3235 directly to seconds currently, but this is NOT guaranteed. 3236 type: "integer" 3237 example: 1 3238 Dispatcher: 3239 description: "Dispatcher configuration." 3240 type: "object" 3241 x-nullable: true 3242 properties: 3243 HeartbeatPeriod: 3244 description: | 3245 The delay for an agent to send a heartbeat to the dispatcher. 3246 type: "integer" 3247 format: "int64" 3248 example: 5000000000 3249 CAConfig: 3250 description: "CA configuration." 3251 type: "object" 3252 x-nullable: true 3253 properties: 3254 NodeCertExpiry: 3255 description: "The duration node certificates are issued for." 3256 type: "integer" 3257 format: "int64" 3258 example: 7776000000000000 3259 ExternalCAs: 3260 description: | 3261 Configuration for forwarding signing requests to an external 3262 certificate authority. 3263 type: "array" 3264 items: 3265 type: "object" 3266 properties: 3267 Protocol: 3268 description: | 3269 Protocol for communication with the external CA (currently 3270 only `cfssl` is supported). 3271 type: "string" 3272 enum: 3273 - "cfssl" 3274 default: "cfssl" 3275 URL: 3276 description: | 3277 URL where certificate signing requests should be sent. 3278 type: "string" 3279 Options: 3280 description: | 3281 An object with key/value pairs that are interpreted as 3282 protocol-specific options for the external CA driver. 3283 type: "object" 3284 additionalProperties: 3285 type: "string" 3286 CACert: 3287 description: | 3288 The root CA certificate (in PEM format) this external CA uses 3289 to issue TLS certificates (assumed to be to the current swarm 3290 root CA certificate if not provided). 3291 type: "string" 3292 SigningCACert: 3293 description: | 3294 The desired signing CA certificate for all swarm node TLS leaf 3295 certificates, in PEM format. 3296 type: "string" 3297 SigningCAKey: 3298 description: | 3299 The desired signing CA key for all swarm node TLS leaf certificates, 3300 in PEM format. 3301 type: "string" 3302 ForceRotate: 3303 description: | 3304 An integer whose purpose is to force swarm to generate a new 3305 signing CA certificate and key, if none have been specified in 3306 `SigningCACert` and `SigningCAKey` 3307 format: "uint64" 3308 type: "integer" 3309 EncryptionConfig: 3310 description: "Parameters related to encryption-at-rest." 3311 type: "object" 3312 properties: 3313 AutoLockManagers: 3314 description: | 3315 If set, generate a key and use it to lock data stored on the 3316 managers. 3317 type: "boolean" 3318 example: false 3319 TaskDefaults: 3320 description: "Defaults for creating tasks in this cluster." 3321 type: "object" 3322 properties: 3323 LogDriver: 3324 description: | 3325 The log driver to use for tasks created in the orchestrator if 3326 unspecified by a service. 3327 3328 Updating this value only affects new tasks. Existing tasks continue 3329 to use their previously configured log driver until recreated. 3330 type: "object" 3331 properties: 3332 Name: 3333 description: | 3334 The log driver to use as a default for new tasks. 3335 type: "string" 3336 example: "json-file" 3337 Options: 3338 description: | 3339 Driver-specific options for the selectd log driver, specified 3340 as key/value pairs. 3341 type: "object" 3342 additionalProperties: 3343 type: "string" 3344 example: 3345 "max-file": "10" 3346 "max-size": "100m" 3347 3348 # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but 3349 # without `JoinTokens`. 3350 ClusterInfo: 3351 description: | 3352 ClusterInfo represents information about the swarm as is returned by the 3353 "/info" endpoint. Join-tokens are not included. 3354 x-nullable: true 3355 type: "object" 3356 properties: 3357 ID: 3358 description: "The ID of the swarm." 3359 type: "string" 3360 example: "abajmipo7b4xz5ip2nrla6b11" 3361 Version: 3362 $ref: "#/definitions/ObjectVersion" 3363 CreatedAt: 3364 description: | 3365 Date and time at which the swarm was initialised in 3366 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 3367 type: "string" 3368 format: "dateTime" 3369 example: "2016-08-18T10:44:24.496525531Z" 3370 UpdatedAt: 3371 description: | 3372 Date and time at which the swarm was last updated in 3373 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 3374 type: "string" 3375 format: "dateTime" 3376 example: "2017-08-09T07:09:37.632105588Z" 3377 Spec: 3378 $ref: "#/definitions/SwarmSpec" 3379 TLSInfo: 3380 $ref: "#/definitions/TLSInfo" 3381 RootRotationInProgress: 3382 description: | 3383 Whether there is currently a root CA rotation in progress for the swarm 3384 type: "boolean" 3385 example: false 3386 DataPathPort: 3387 description: | 3388 DataPathPort specifies the data path port number for data traffic. 3389 Acceptable port range is 1024 to 49151. 3390 If no port is set or is set to 0, the default port (4789) is used. 3391 type: "integer" 3392 format: "uint32" 3393 default: 4789 3394 example: 4789 3395 DefaultAddrPool: 3396 description: | 3397 Default Address Pool specifies default subnet pools for global scope 3398 networks. 3399 type: "array" 3400 items: 3401 type: "string" 3402 format: "CIDR" 3403 example: ["10.10.0.0/16", "20.20.0.0/16"] 3404 SubnetSize: 3405 description: | 3406 SubnetSize specifies the subnet size of the networks created from the 3407 default subnet pool. 3408 type: "integer" 3409 format: "uint32" 3410 maximum: 29 3411 default: 24 3412 example: 24 3413 3414 JoinTokens: 3415 description: | 3416 JoinTokens contains the tokens workers and managers need to join the swarm. 3417 type: "object" 3418 properties: 3419 Worker: 3420 description: | 3421 The token workers can use to join the swarm. 3422 type: "string" 3423 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" 3424 Manager: 3425 description: | 3426 The token managers can use to join the swarm. 3427 type: "string" 3428 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 3429 3430 Swarm: 3431 type: "object" 3432 allOf: 3433 - $ref: "#/definitions/ClusterInfo" 3434 - type: "object" 3435 properties: 3436 JoinTokens: 3437 $ref: "#/definitions/JoinTokens" 3438 3439 TaskSpec: 3440 description: "User modifiable task configuration." 3441 type: "object" 3442 properties: 3443 PluginSpec: 3444 type: "object" 3445 description: | 3446 Plugin spec for the service. *(Experimental release only.)* 3447 3448 <p><br /></p> 3449 3450 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3451 > mutually exclusive. PluginSpec is only used when the Runtime field 3452 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3453 > field is set to `attachment`. 3454 properties: 3455 Name: 3456 description: "The name or 'alias' to use for the plugin." 3457 type: "string" 3458 Remote: 3459 description: "The plugin image reference to use." 3460 type: "string" 3461 Disabled: 3462 description: "Disable the plugin once scheduled." 3463 type: "boolean" 3464 PluginPrivilege: 3465 type: "array" 3466 items: 3467 $ref: "#/definitions/PluginPrivilege" 3468 ContainerSpec: 3469 type: "object" 3470 description: | 3471 Container spec for the service. 3472 3473 <p><br /></p> 3474 3475 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3476 > mutually exclusive. PluginSpec is only used when the Runtime field 3477 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3478 > field is set to `attachment`. 3479 properties: 3480 Image: 3481 description: "The image name to use for the container" 3482 type: "string" 3483 Labels: 3484 description: "User-defined key/value data." 3485 type: "object" 3486 additionalProperties: 3487 type: "string" 3488 Command: 3489 description: "The command to be run in the image." 3490 type: "array" 3491 items: 3492 type: "string" 3493 Args: 3494 description: "Arguments to the command." 3495 type: "array" 3496 items: 3497 type: "string" 3498 Hostname: 3499 description: | 3500 The hostname to use for the container, as a valid 3501 [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. 3502 type: "string" 3503 Env: 3504 description: | 3505 A list of environment variables in the form `VAR=value`. 3506 type: "array" 3507 items: 3508 type: "string" 3509 Dir: 3510 description: "The working directory for commands to run in." 3511 type: "string" 3512 User: 3513 description: "The user inside the container." 3514 type: "string" 3515 Groups: 3516 type: "array" 3517 description: | 3518 A list of additional groups that the container process will run as. 3519 items: 3520 type: "string" 3521 Privileges: 3522 type: "object" 3523 description: "Security options for the container" 3524 properties: 3525 CredentialSpec: 3526 type: "object" 3527 description: "CredentialSpec for managed service account (Windows only)" 3528 properties: 3529 Config: 3530 type: "string" 3531 example: "0bt9dmxjvjiqermk6xrop3ekq" 3532 description: | 3533 Load credential spec from a Swarm Config with the given ID. 3534 The specified config must also be present in the Configs 3535 field with the Runtime property set. 3536 3537 <p><br /></p> 3538 3539 3540 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3541 > and `CredentialSpec.Config` are mutually exclusive. 3542 File: 3543 type: "string" 3544 example: "spec.json" 3545 description: | 3546 Load credential spec from this file. The file is read by 3547 the daemon, and must be present in the `CredentialSpecs` 3548 subdirectory in the docker data directory, which defaults 3549 to `C:\ProgramData\Docker\` on Windows. 3550 3551 For example, specifying `spec.json` loads 3552 `C:\ProgramData\Docker\CredentialSpecs\spec.json`. 3553 3554 <p><br /></p> 3555 3556 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3557 > and `CredentialSpec.Config` are mutually exclusive. 3558 Registry: 3559 type: "string" 3560 description: | 3561 Load credential spec from this value in the Windows 3562 registry. The specified registry value must be located in: 3563 3564 `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` 3565 3566 <p><br /></p> 3567 3568 3569 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3570 > and `CredentialSpec.Config` are mutually exclusive. 3571 SELinuxContext: 3572 type: "object" 3573 description: "SELinux labels of the container" 3574 properties: 3575 Disable: 3576 type: "boolean" 3577 description: "Disable SELinux" 3578 User: 3579 type: "string" 3580 description: "SELinux user label" 3581 Role: 3582 type: "string" 3583 description: "SELinux role label" 3584 Type: 3585 type: "string" 3586 description: "SELinux type label" 3587 Level: 3588 type: "string" 3589 description: "SELinux level label" 3590 Seccomp: 3591 type: "object" 3592 description: "Options for configuring seccomp on the container" 3593 properties: 3594 Mode: 3595 type: "string" 3596 enum: 3597 - "default" 3598 - "unconfined" 3599 - "custom" 3600 Profile: 3601 description: "The custom seccomp profile as a json object" 3602 type: "string" 3603 AppArmor: 3604 type: "object" 3605 description: "Options for configuring AppArmor on the container" 3606 properties: 3607 Mode: 3608 type: "string" 3609 enum: 3610 - "default" 3611 - "disabled" 3612 NoNewPrivileges: 3613 type: "boolean" 3614 description: "Configuration of the no_new_privs bit in the container" 3615 3616 TTY: 3617 description: "Whether a pseudo-TTY should be allocated." 3618 type: "boolean" 3619 OpenStdin: 3620 description: "Open `stdin`" 3621 type: "boolean" 3622 ReadOnly: 3623 description: "Mount the container's root filesystem as read only." 3624 type: "boolean" 3625 Mounts: 3626 description: | 3627 Specification for mounts to be added to containers created as part 3628 of the service. 3629 type: "array" 3630 items: 3631 $ref: "#/definitions/Mount" 3632 StopSignal: 3633 description: "Signal to stop the container." 3634 type: "string" 3635 StopGracePeriod: 3636 description: | 3637 Amount of time to wait for the container to terminate before 3638 forcefully killing it. 3639 type: "integer" 3640 format: "int64" 3641 HealthCheck: 3642 $ref: "#/definitions/HealthConfig" 3643 Hosts: 3644 type: "array" 3645 description: | 3646 A list of hostname/IP mappings to add to the container's `hosts` 3647 file. The format of extra hosts is specified in the 3648 [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) 3649 man page: 3650 3651 IP_address canonical_hostname [aliases...] 3652 items: 3653 type: "string" 3654 DNSConfig: 3655 description: | 3656 Specification for DNS related configurations in resolver configuration 3657 file (`resolv.conf`). 3658 type: "object" 3659 properties: 3660 Nameservers: 3661 description: "The IP addresses of the name servers." 3662 type: "array" 3663 items: 3664 type: "string" 3665 Search: 3666 description: "A search list for host-name lookup." 3667 type: "array" 3668 items: 3669 type: "string" 3670 Options: 3671 description: | 3672 A list of internal resolver variables to be modified (e.g., 3673 `debug`, `ndots:3`, etc.). 3674 type: "array" 3675 items: 3676 type: "string" 3677 Secrets: 3678 description: | 3679 Secrets contains references to zero or more secrets that will be 3680 exposed to the service. 3681 type: "array" 3682 items: 3683 type: "object" 3684 properties: 3685 File: 3686 description: | 3687 File represents a specific target that is backed by a file. 3688 type: "object" 3689 properties: 3690 Name: 3691 description: | 3692 Name represents the final filename in the filesystem. 3693 type: "string" 3694 UID: 3695 description: "UID represents the file UID." 3696 type: "string" 3697 GID: 3698 description: "GID represents the file GID." 3699 type: "string" 3700 Mode: 3701 description: "Mode represents the FileMode of the file." 3702 type: "integer" 3703 format: "uint32" 3704 SecretID: 3705 description: | 3706 SecretID represents the ID of the specific secret that we're 3707 referencing. 3708 type: "string" 3709 SecretName: 3710 description: | 3711 SecretName is the name of the secret that this references, 3712 but this is just provided for lookup/display purposes. The 3713 secret in the reference will be identified by its ID. 3714 type: "string" 3715 Configs: 3716 description: | 3717 Configs contains references to zero or more configs that will be 3718 exposed to the service. 3719 type: "array" 3720 items: 3721 type: "object" 3722 properties: 3723 File: 3724 description: | 3725 File represents a specific target that is backed by a file. 3726 3727 <p><br /><p> 3728 3729 > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive 3730 type: "object" 3731 properties: 3732 Name: 3733 description: | 3734 Name represents the final filename in the filesystem. 3735 type: "string" 3736 UID: 3737 description: "UID represents the file UID." 3738 type: "string" 3739 GID: 3740 description: "GID represents the file GID." 3741 type: "string" 3742 Mode: 3743 description: "Mode represents the FileMode of the file." 3744 type: "integer" 3745 format: "uint32" 3746 Runtime: 3747 description: | 3748 Runtime represents a target that is not mounted into the 3749 container but is used by the task 3750 3751 <p><br /><p> 3752 3753 > **Note**: `Configs.File` and `Configs.Runtime` are mutually 3754 > exclusive 3755 type: "object" 3756 ConfigID: 3757 description: | 3758 ConfigID represents the ID of the specific config that we're 3759 referencing. 3760 type: "string" 3761 ConfigName: 3762 description: | 3763 ConfigName is the name of the config that this references, 3764 but this is just provided for lookup/display purposes. The 3765 config in the reference will be identified by its ID. 3766 type: "string" 3767 Isolation: 3768 type: "string" 3769 description: | 3770 Isolation technology of the containers running the service. 3771 (Windows only) 3772 enum: 3773 - "default" 3774 - "process" 3775 - "hyperv" 3776 Init: 3777 description: | 3778 Run an init inside the container that forwards signals and reaps 3779 processes. This field is omitted if empty, and the default (as 3780 configured on the daemon) is used. 3781 type: "boolean" 3782 x-nullable: true 3783 Sysctls: 3784 description: | 3785 Set kernel namedspaced parameters (sysctls) in the container. 3786 The Sysctls option on services accepts the same sysctls as the 3787 are supported on containers. Note that while the same sysctls are 3788 supported, no guarantees or checks are made about their 3789 suitability for a clustered environment, and it's up to the user 3790 to determine whether a given sysctl will work properly in a 3791 Service. 3792 type: "object" 3793 additionalProperties: 3794 type: "string" 3795 # This option is not used by Windows containers 3796 CapabilityAdd: 3797 type: "array" 3798 description: | 3799 A list of kernel capabilities to add to the default set 3800 for the container. 3801 items: 3802 type: "string" 3803 example: 3804 - "CAP_NET_RAW" 3805 - "CAP_SYS_ADMIN" 3806 - "CAP_SYS_CHROOT" 3807 - "CAP_SYSLOG" 3808 CapabilityDrop: 3809 type: "array" 3810 description: | 3811 A list of kernel capabilities to drop from the default set 3812 for the container. 3813 items: 3814 type: "string" 3815 example: 3816 - "CAP_NET_RAW" 3817 Ulimits: 3818 description: | 3819 A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" 3820 type: "array" 3821 items: 3822 type: "object" 3823 properties: 3824 Name: 3825 description: "Name of ulimit" 3826 type: "string" 3827 Soft: 3828 description: "Soft limit" 3829 type: "integer" 3830 Hard: 3831 description: "Hard limit" 3832 type: "integer" 3833 NetworkAttachmentSpec: 3834 description: | 3835 Read-only spec type for non-swarm containers attached to swarm overlay 3836 networks. 3837 3838 <p><br /></p> 3839 3840 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3841 > mutually exclusive. PluginSpec is only used when the Runtime field 3842 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3843 > field is set to `attachment`. 3844 type: "object" 3845 properties: 3846 ContainerID: 3847 description: "ID of the container represented by this task" 3848 type: "string" 3849 Resources: 3850 description: | 3851 Resource requirements which apply to each individual container created 3852 as part of the service. 3853 type: "object" 3854 properties: 3855 Limits: 3856 description: "Define resources limits." 3857 $ref: "#/definitions/Limit" 3858 Reservations: 3859 description: "Define resources reservation." 3860 $ref: "#/definitions/ResourceObject" 3861 RestartPolicy: 3862 description: | 3863 Specification for the restart policy which applies to containers 3864 created as part of this service. 3865 type: "object" 3866 properties: 3867 Condition: 3868 description: "Condition for restart." 3869 type: "string" 3870 enum: 3871 - "none" 3872 - "on-failure" 3873 - "any" 3874 Delay: 3875 description: "Delay between restart attempts." 3876 type: "integer" 3877 format: "int64" 3878 MaxAttempts: 3879 description: | 3880 Maximum attempts to restart a given container before giving up 3881 (default value is 0, which is ignored). 3882 type: "integer" 3883 format: "int64" 3884 default: 0 3885 Window: 3886 description: | 3887 Windows is the time window used to evaluate the restart policy 3888 (default value is 0, which is unbounded). 3889 type: "integer" 3890 format: "int64" 3891 default: 0 3892 Placement: 3893 type: "object" 3894 properties: 3895 Constraints: 3896 description: | 3897 An array of constraint expressions to limit the set of nodes where 3898 a task can be scheduled. Constraint expressions can either use a 3899 _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find 3900 nodes that satisfy every expression (AND match). Constraints can 3901 match node or Docker Engine labels as follows: 3902 3903 node attribute | matches | example 3904 ---------------------|--------------------------------|----------------------------------------------- 3905 `node.id` | Node ID | `node.id==2ivku8v2gvtg4` 3906 `node.hostname` | Node hostname | `node.hostname!=node-2` 3907 `node.role` | Node role (`manager`/`worker`) | `node.role==manager` 3908 `node.platform.os` | Node operating system | `node.platform.os==windows` 3909 `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` 3910 `node.labels` | User-defined node labels | `node.labels.security==high` 3911 `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` 3912 3913 `engine.labels` apply to Docker Engine labels like operating system, 3914 drivers, etc. Swarm administrators add `node.labels` for operational 3915 purposes by using the [`node update endpoint`](#operation/NodeUpdate). 3916 3917 type: "array" 3918 items: 3919 type: "string" 3920 example: 3921 - "node.hostname!=node3.corp.example.com" 3922 - "node.role!=manager" 3923 - "node.labels.type==production" 3924 - "node.platform.os==linux" 3925 - "node.platform.arch==x86_64" 3926 Preferences: 3927 description: | 3928 Preferences provide a way to make the scheduler aware of factors 3929 such as topology. They are provided in order from highest to 3930 lowest precedence. 3931 type: "array" 3932 items: 3933 type: "object" 3934 properties: 3935 Spread: 3936 type: "object" 3937 properties: 3938 SpreadDescriptor: 3939 description: | 3940 label descriptor, such as `engine.labels.az`. 3941 type: "string" 3942 example: 3943 - Spread: 3944 SpreadDescriptor: "node.labels.datacenter" 3945 - Spread: 3946 SpreadDescriptor: "node.labels.rack" 3947 MaxReplicas: 3948 description: | 3949 Maximum number of replicas for per node (default value is 0, which 3950 is unlimited) 3951 type: "integer" 3952 format: "int64" 3953 default: 0 3954 Platforms: 3955 description: | 3956 Platforms stores all the platforms that the service's image can 3957 run on. This field is used in the platform filter for scheduling. 3958 If empty, then the platform filter is off, meaning there are no 3959 scheduling restrictions. 3960 type: "array" 3961 items: 3962 $ref: "#/definitions/Platform" 3963 ForceUpdate: 3964 description: | 3965 A counter that triggers an update even if no relevant parameters have 3966 been changed. 3967 type: "integer" 3968 Runtime: 3969 description: | 3970 Runtime is the type of runtime specified for the task executor. 3971 type: "string" 3972 Networks: 3973 description: "Specifies which networks the service should attach to." 3974 type: "array" 3975 items: 3976 $ref: "#/definitions/NetworkAttachmentConfig" 3977 LogDriver: 3978 description: | 3979 Specifies the log driver to use for tasks created from this spec. If 3980 not present, the default one for the swarm will be used, finally 3981 falling back to the engine default if not specified. 3982 type: "object" 3983 properties: 3984 Name: 3985 type: "string" 3986 Options: 3987 type: "object" 3988 additionalProperties: 3989 type: "string" 3990 3991 TaskState: 3992 type: "string" 3993 enum: 3994 - "new" 3995 - "allocated" 3996 - "pending" 3997 - "assigned" 3998 - "accepted" 3999 - "preparing" 4000 - "ready" 4001 - "starting" 4002 - "running" 4003 - "complete" 4004 - "shutdown" 4005 - "failed" 4006 - "rejected" 4007 - "remove" 4008 - "orphaned" 4009 4010 ContainerStatus: 4011 type: "object" 4012 description: "represents the status of a container." 4013 properties: 4014 ContainerID: 4015 type: "string" 4016 PID: 4017 type: "integer" 4018 ExitCode: 4019 type: "integer" 4020 4021 PortStatus: 4022 type: "object" 4023 description: "represents the port status of a task's host ports whose service has published host ports" 4024 properties: 4025 Ports: 4026 type: "array" 4027 items: 4028 $ref: "#/definitions/EndpointPortConfig" 4029 4030 TaskStatus: 4031 type: "object" 4032 description: "represents the status of a task." 4033 properties: 4034 Timestamp: 4035 type: "string" 4036 format: "dateTime" 4037 State: 4038 $ref: "#/definitions/TaskState" 4039 Message: 4040 type: "string" 4041 Err: 4042 type: "string" 4043 ContainerStatus: 4044 $ref: "#/definitions/ContainerStatus" 4045 PortStatus: 4046 $ref: "#/definitions/PortStatus" 4047 4048 Task: 4049 type: "object" 4050 properties: 4051 ID: 4052 description: "The ID of the task." 4053 type: "string" 4054 Version: 4055 $ref: "#/definitions/ObjectVersion" 4056 CreatedAt: 4057 type: "string" 4058 format: "dateTime" 4059 UpdatedAt: 4060 type: "string" 4061 format: "dateTime" 4062 Name: 4063 description: "Name of the task." 4064 type: "string" 4065 Labels: 4066 description: "User-defined key/value metadata." 4067 type: "object" 4068 additionalProperties: 4069 type: "string" 4070 Spec: 4071 $ref: "#/definitions/TaskSpec" 4072 ServiceID: 4073 description: "The ID of the service this task is part of." 4074 type: "string" 4075 Slot: 4076 type: "integer" 4077 NodeID: 4078 description: "The ID of the node that this task is on." 4079 type: "string" 4080 AssignedGenericResources: 4081 $ref: "#/definitions/GenericResources" 4082 Status: 4083 $ref: "#/definitions/TaskStatus" 4084 DesiredState: 4085 $ref: "#/definitions/TaskState" 4086 JobIteration: 4087 description: | 4088 If the Service this Task belongs to is a job-mode service, contains 4089 the JobIteration of the Service this Task was created for. Absent if 4090 the Task was created for a Replicated or Global Service. 4091 $ref: "#/definitions/ObjectVersion" 4092 example: 4093 ID: "0kzzo1i0y4jz6027t0k7aezc7" 4094 Version: 4095 Index: 71 4096 CreatedAt: "2016-06-07T21:07:31.171892745Z" 4097 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 4098 Spec: 4099 ContainerSpec: 4100 Image: "redis" 4101 Resources: 4102 Limits: {} 4103 Reservations: {} 4104 RestartPolicy: 4105 Condition: "any" 4106 MaxAttempts: 0 4107 Placement: {} 4108 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 4109 Slot: 1 4110 NodeID: "60gvrl6tm78dmak4yl7srz94v" 4111 Status: 4112 Timestamp: "2016-06-07T21:07:31.290032978Z" 4113 State: "running" 4114 Message: "started" 4115 ContainerStatus: 4116 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 4117 PID: 677 4118 DesiredState: "running" 4119 NetworksAttachments: 4120 - Network: 4121 ID: "4qvuz4ko70xaltuqbt8956gd1" 4122 Version: 4123 Index: 18 4124 CreatedAt: "2016-06-07T20:31:11.912919752Z" 4125 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 4126 Spec: 4127 Name: "ingress" 4128 Labels: 4129 com.docker.swarm.internal: "true" 4130 DriverConfiguration: {} 4131 IPAMOptions: 4132 Driver: {} 4133 Configs: 4134 - Subnet: "10.255.0.0/16" 4135 Gateway: "10.255.0.1" 4136 DriverState: 4137 Name: "overlay" 4138 Options: 4139 com.docker.network.driver.overlay.vxlanid_list: "256" 4140 IPAMOptions: 4141 Driver: 4142 Name: "default" 4143 Configs: 4144 - Subnet: "10.255.0.0/16" 4145 Gateway: "10.255.0.1" 4146 Addresses: 4147 - "10.255.0.10/16" 4148 AssignedGenericResources: 4149 - DiscreteResourceSpec: 4150 Kind: "SSD" 4151 Value: 3 4152 - NamedResourceSpec: 4153 Kind: "GPU" 4154 Value: "UUID1" 4155 - NamedResourceSpec: 4156 Kind: "GPU" 4157 Value: "UUID2" 4158 4159 ServiceSpec: 4160 description: "User modifiable configuration for a service." 4161 type: object 4162 properties: 4163 Name: 4164 description: "Name of the service." 4165 type: "string" 4166 Labels: 4167 description: "User-defined key/value metadata." 4168 type: "object" 4169 additionalProperties: 4170 type: "string" 4171 TaskTemplate: 4172 $ref: "#/definitions/TaskSpec" 4173 Mode: 4174 description: "Scheduling mode for the service." 4175 type: "object" 4176 properties: 4177 Replicated: 4178 type: "object" 4179 properties: 4180 Replicas: 4181 type: "integer" 4182 format: "int64" 4183 Global: 4184 type: "object" 4185 ReplicatedJob: 4186 description: | 4187 The mode used for services with a finite number of tasks that run 4188 to a completed state. 4189 type: "object" 4190 properties: 4191 MaxConcurrent: 4192 description: | 4193 The maximum number of replicas to run simultaneously. 4194 type: "integer" 4195 format: "int64" 4196 default: 1 4197 TotalCompletions: 4198 description: | 4199 The total number of replicas desired to reach the Completed 4200 state. If unset, will default to the value of `MaxConcurrent` 4201 type: "integer" 4202 format: "int64" 4203 GlobalJob: 4204 description: | 4205 The mode used for services which run a task to the completed state 4206 on each valid node. 4207 type: "object" 4208 UpdateConfig: 4209 description: "Specification for the update strategy of the service." 4210 type: "object" 4211 properties: 4212 Parallelism: 4213 description: | 4214 Maximum number of tasks to be updated in one iteration (0 means 4215 unlimited parallelism). 4216 type: "integer" 4217 format: "int64" 4218 Delay: 4219 description: "Amount of time between updates, in nanoseconds." 4220 type: "integer" 4221 format: "int64" 4222 FailureAction: 4223 description: | 4224 Action to take if an updated task fails to run, or stops running 4225 during the update. 4226 type: "string" 4227 enum: 4228 - "continue" 4229 - "pause" 4230 - "rollback" 4231 Monitor: 4232 description: | 4233 Amount of time to monitor each updated task for failures, in 4234 nanoseconds. 4235 type: "integer" 4236 format: "int64" 4237 MaxFailureRatio: 4238 description: | 4239 The fraction of tasks that may fail during an update before the 4240 failure action is invoked, specified as a floating point number 4241 between 0 and 1. 4242 type: "number" 4243 default: 0 4244 Order: 4245 description: | 4246 The order of operations when rolling out an updated task. Either 4247 the old task is shut down before the new task is started, or the 4248 new task is started before the old task is shut down. 4249 type: "string" 4250 enum: 4251 - "stop-first" 4252 - "start-first" 4253 RollbackConfig: 4254 description: "Specification for the rollback strategy of the service." 4255 type: "object" 4256 properties: 4257 Parallelism: 4258 description: | 4259 Maximum number of tasks to be rolled back in one iteration (0 means 4260 unlimited parallelism). 4261 type: "integer" 4262 format: "int64" 4263 Delay: 4264 description: | 4265 Amount of time between rollback iterations, in nanoseconds. 4266 type: "integer" 4267 format: "int64" 4268 FailureAction: 4269 description: | 4270 Action to take if an rolled back task fails to run, or stops 4271 running during the rollback. 4272 type: "string" 4273 enum: 4274 - "continue" 4275 - "pause" 4276 Monitor: 4277 description: | 4278 Amount of time to monitor each rolled back task for failures, in 4279 nanoseconds. 4280 type: "integer" 4281 format: "int64" 4282 MaxFailureRatio: 4283 description: | 4284 The fraction of tasks that may fail during a rollback before the 4285 failure action is invoked, specified as a floating point number 4286 between 0 and 1. 4287 type: "number" 4288 default: 0 4289 Order: 4290 description: | 4291 The order of operations when rolling back a task. Either the old 4292 task is shut down before the new task is started, or the new task 4293 is started before the old task is shut down. 4294 type: "string" 4295 enum: 4296 - "stop-first" 4297 - "start-first" 4298 Networks: 4299 description: | 4300 Specifies which networks the service should attach to. 4301 4302 Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. 4303 type: "array" 4304 items: 4305 $ref: "#/definitions/NetworkAttachmentConfig" 4306 4307 EndpointSpec: 4308 $ref: "#/definitions/EndpointSpec" 4309 4310 EndpointPortConfig: 4311 type: "object" 4312 properties: 4313 Name: 4314 type: "string" 4315 Protocol: 4316 type: "string" 4317 enum: 4318 - "tcp" 4319 - "udp" 4320 - "sctp" 4321 TargetPort: 4322 description: "The port inside the container." 4323 type: "integer" 4324 PublishedPort: 4325 description: "The port on the swarm hosts." 4326 type: "integer" 4327 PublishMode: 4328 description: | 4329 The mode in which port is published. 4330 4331 <p><br /></p> 4332 4333 - "ingress" makes the target port accessible on every node, 4334 regardless of whether there is a task for the service running on 4335 that node or not. 4336 - "host" bypasses the routing mesh and publish the port directly on 4337 the swarm node where that service is running. 4338 4339 type: "string" 4340 enum: 4341 - "ingress" 4342 - "host" 4343 default: "ingress" 4344 example: "ingress" 4345 4346 EndpointSpec: 4347 description: "Properties that can be configured to access and load balance a service." 4348 type: "object" 4349 properties: 4350 Mode: 4351 description: | 4352 The mode of resolution to use for internal load balancing between tasks. 4353 type: "string" 4354 enum: 4355 - "vip" 4356 - "dnsrr" 4357 default: "vip" 4358 Ports: 4359 description: | 4360 List of exposed ports that this service is accessible on from the 4361 outside. Ports can only be provided if `vip` resolution mode is used. 4362 type: "array" 4363 items: 4364 $ref: "#/definitions/EndpointPortConfig" 4365 4366 Service: 4367 type: "object" 4368 properties: 4369 ID: 4370 type: "string" 4371 Version: 4372 $ref: "#/definitions/ObjectVersion" 4373 CreatedAt: 4374 type: "string" 4375 format: "dateTime" 4376 UpdatedAt: 4377 type: "string" 4378 format: "dateTime" 4379 Spec: 4380 $ref: "#/definitions/ServiceSpec" 4381 Endpoint: 4382 type: "object" 4383 properties: 4384 Spec: 4385 $ref: "#/definitions/EndpointSpec" 4386 Ports: 4387 type: "array" 4388 items: 4389 $ref: "#/definitions/EndpointPortConfig" 4390 VirtualIPs: 4391 type: "array" 4392 items: 4393 type: "object" 4394 properties: 4395 NetworkID: 4396 type: "string" 4397 Addr: 4398 type: "string" 4399 UpdateStatus: 4400 description: "The status of a service update." 4401 type: "object" 4402 properties: 4403 State: 4404 type: "string" 4405 enum: 4406 - "updating" 4407 - "paused" 4408 - "completed" 4409 StartedAt: 4410 type: "string" 4411 format: "dateTime" 4412 CompletedAt: 4413 type: "string" 4414 format: "dateTime" 4415 Message: 4416 type: "string" 4417 ServiceStatus: 4418 description: | 4419 The status of the service's tasks. Provided only when requested as 4420 part of a ServiceList operation. 4421 type: "object" 4422 properties: 4423 RunningTasks: 4424 description: | 4425 The number of tasks for the service currently in the Running state. 4426 type: "integer" 4427 format: "uint64" 4428 example: 7 4429 DesiredTasks: 4430 description: | 4431 The number of tasks for the service desired to be running. 4432 For replicated services, this is the replica count from the 4433 service spec. For global services, this is computed by taking 4434 count of all tasks for the service with a Desired State other 4435 than Shutdown. 4436 type: "integer" 4437 format: "uint64" 4438 example: 10 4439 CompletedTasks: 4440 description: | 4441 The number of tasks for a job that are in the Completed state. 4442 This field must be cross-referenced with the service type, as the 4443 value of 0 may mean the service is not in a job mode, or it may 4444 mean the job-mode service has no tasks yet Completed. 4445 type: "integer" 4446 format: "uint64" 4447 JobStatus: 4448 description: | 4449 The status of the service when it is in one of ReplicatedJob or 4450 GlobalJob modes. Absent on Replicated and Global mode services. The 4451 JobIteration is an ObjectVersion, but unlike the Service's version, 4452 does not need to be sent with an update request. 4453 type: "object" 4454 properties: 4455 JobIteration: 4456 description: | 4457 JobIteration is a value increased each time a Job is executed, 4458 successfully or otherwise. "Executed", in this case, means the 4459 job as a whole has been started, not that an individual Task has 4460 been launched. A job is "Executed" when its ServiceSpec is 4461 updated. JobIteration can be used to disambiguate Tasks belonging 4462 to different executions of a job. Though JobIteration will 4463 increase with each subsequent execution, it may not necessarily 4464 increase by 1, and so JobIteration should not be used to 4465 $ref: "#/definitions/ObjectVersion" 4466 LastExecution: 4467 description: | 4468 The last time, as observed by the server, that this job was 4469 started. 4470 type: "string" 4471 format: "dateTime" 4472 example: 4473 ID: "9mnpnzenvg8p8tdbtq4wvbkcz" 4474 Version: 4475 Index: 19 4476 CreatedAt: "2016-06-07T21:05:51.880065305Z" 4477 UpdatedAt: "2016-06-07T21:07:29.962229872Z" 4478 Spec: 4479 Name: "hopeful_cori" 4480 TaskTemplate: 4481 ContainerSpec: 4482 Image: "redis" 4483 Resources: 4484 Limits: {} 4485 Reservations: {} 4486 RestartPolicy: 4487 Condition: "any" 4488 MaxAttempts: 0 4489 Placement: {} 4490 ForceUpdate: 0 4491 Mode: 4492 Replicated: 4493 Replicas: 1 4494 UpdateConfig: 4495 Parallelism: 1 4496 Delay: 1000000000 4497 FailureAction: "pause" 4498 Monitor: 15000000000 4499 MaxFailureRatio: 0.15 4500 RollbackConfig: 4501 Parallelism: 1 4502 Delay: 1000000000 4503 FailureAction: "pause" 4504 Monitor: 15000000000 4505 MaxFailureRatio: 0.15 4506 EndpointSpec: 4507 Mode: "vip" 4508 Ports: 4509 - 4510 Protocol: "tcp" 4511 TargetPort: 6379 4512 PublishedPort: 30001 4513 Endpoint: 4514 Spec: 4515 Mode: "vip" 4516 Ports: 4517 - 4518 Protocol: "tcp" 4519 TargetPort: 6379 4520 PublishedPort: 30001 4521 Ports: 4522 - 4523 Protocol: "tcp" 4524 TargetPort: 6379 4525 PublishedPort: 30001 4526 VirtualIPs: 4527 - 4528 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 4529 Addr: "10.255.0.2/16" 4530 - 4531 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 4532 Addr: "10.255.0.3/16" 4533 4534 ImageDeleteResponseItem: 4535 type: "object" 4536 x-go-name: "DeleteResponse" 4537 properties: 4538 Untagged: 4539 description: "The image ID of an image that was untagged" 4540 type: "string" 4541 Deleted: 4542 description: "The image ID of an image that was deleted" 4543 type: "string" 4544 4545 ServiceCreateResponse: 4546 type: "object" 4547 description: | 4548 contains the information returned to a client on the 4549 creation of a new service. 4550 properties: 4551 ID: 4552 description: "The ID of the created service." 4553 type: "string" 4554 x-nullable: false 4555 example: "ak7w3gjqoa3kuz8xcpnyy0pvl" 4556 Warnings: 4557 description: | 4558 Optional warning message. 4559 4560 FIXME(thaJeztah): this should have "omitempty" in the generated type. 4561 type: "array" 4562 x-nullable: true 4563 items: 4564 type: "string" 4565 example: 4566 - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 4567 4568 ServiceUpdateResponse: 4569 type: "object" 4570 properties: 4571 Warnings: 4572 description: "Optional warning messages" 4573 type: "array" 4574 items: 4575 type: "string" 4576 example: 4577 Warnings: 4578 - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 4579 4580 ContainerSummary: 4581 type: "object" 4582 properties: 4583 Id: 4584 description: "The ID of this container" 4585 type: "string" 4586 x-go-name: "ID" 4587 Names: 4588 description: "The names that this container has been given" 4589 type: "array" 4590 items: 4591 type: "string" 4592 Image: 4593 description: "The name of the image used when creating this container" 4594 type: "string" 4595 ImageID: 4596 description: "The ID of the image that this container was created from" 4597 type: "string" 4598 Command: 4599 description: "Command to run when starting the container" 4600 type: "string" 4601 Created: 4602 description: "When the container was created" 4603 type: "integer" 4604 format: "int64" 4605 Ports: 4606 description: "The ports exposed by this container" 4607 type: "array" 4608 items: 4609 $ref: "#/definitions/Port" 4610 SizeRw: 4611 description: "The size of files that have been created or changed by this container" 4612 type: "integer" 4613 format: "int64" 4614 SizeRootFs: 4615 description: "The total size of all the files in this container" 4616 type: "integer" 4617 format: "int64" 4618 Labels: 4619 description: "User-defined key/value metadata." 4620 type: "object" 4621 additionalProperties: 4622 type: "string" 4623 State: 4624 description: "The state of this container (e.g. `Exited`)" 4625 type: "string" 4626 Status: 4627 description: "Additional human-readable status of this container (e.g. `Exit 0`)" 4628 type: "string" 4629 HostConfig: 4630 type: "object" 4631 properties: 4632 NetworkMode: 4633 type: "string" 4634 NetworkSettings: 4635 description: "A summary of the container's network settings" 4636 type: "object" 4637 properties: 4638 Networks: 4639 type: "object" 4640 additionalProperties: 4641 $ref: "#/definitions/EndpointSettings" 4642 Mounts: 4643 type: "array" 4644 items: 4645 $ref: "#/definitions/MountPoint" 4646 4647 Driver: 4648 description: "Driver represents a driver (network, logging, secrets)." 4649 type: "object" 4650 required: [Name] 4651 properties: 4652 Name: 4653 description: "Name of the driver." 4654 type: "string" 4655 x-nullable: false 4656 example: "some-driver" 4657 Options: 4658 description: "Key/value map of driver-specific options." 4659 type: "object" 4660 x-nullable: false 4661 additionalProperties: 4662 type: "string" 4663 example: 4664 OptionA: "value for driver-specific option A" 4665 OptionB: "value for driver-specific option B" 4666 4667 SecretSpec: 4668 type: "object" 4669 properties: 4670 Name: 4671 description: "User-defined name of the secret." 4672 type: "string" 4673 Labels: 4674 description: "User-defined key/value metadata." 4675 type: "object" 4676 additionalProperties: 4677 type: "string" 4678 example: 4679 com.example.some-label: "some-value" 4680 com.example.some-other-label: "some-other-value" 4681 Data: 4682 description: | 4683 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4684 data to store as secret. 4685 4686 This field is only used to _create_ a secret, and is not returned by 4687 other endpoints. 4688 type: "string" 4689 example: "" 4690 Driver: 4691 description: | 4692 Name of the secrets driver used to fetch the secret's value from an 4693 external secret store. 4694 $ref: "#/definitions/Driver" 4695 Templating: 4696 description: | 4697 Templating driver, if applicable 4698 4699 Templating controls whether and how to evaluate the config payload as 4700 a template. If no driver is set, no templating is used. 4701 $ref: "#/definitions/Driver" 4702 4703 Secret: 4704 type: "object" 4705 properties: 4706 ID: 4707 type: "string" 4708 example: "blt1owaxmitz71s9v5zh81zun" 4709 Version: 4710 $ref: "#/definitions/ObjectVersion" 4711 CreatedAt: 4712 type: "string" 4713 format: "dateTime" 4714 example: "2017-07-20T13:55:28.678958722Z" 4715 UpdatedAt: 4716 type: "string" 4717 format: "dateTime" 4718 example: "2017-07-20T13:55:28.678958722Z" 4719 Spec: 4720 $ref: "#/definitions/SecretSpec" 4721 4722 ConfigSpec: 4723 type: "object" 4724 properties: 4725 Name: 4726 description: "User-defined name of the config." 4727 type: "string" 4728 Labels: 4729 description: "User-defined key/value metadata." 4730 type: "object" 4731 additionalProperties: 4732 type: "string" 4733 Data: 4734 description: | 4735 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4736 config data. 4737 type: "string" 4738 Templating: 4739 description: | 4740 Templating driver, if applicable 4741 4742 Templating controls whether and how to evaluate the config payload as 4743 a template. If no driver is set, no templating is used. 4744 $ref: "#/definitions/Driver" 4745 4746 Config: 4747 type: "object" 4748 properties: 4749 ID: 4750 type: "string" 4751 Version: 4752 $ref: "#/definitions/ObjectVersion" 4753 CreatedAt: 4754 type: "string" 4755 format: "dateTime" 4756 UpdatedAt: 4757 type: "string" 4758 format: "dateTime" 4759 Spec: 4760 $ref: "#/definitions/ConfigSpec" 4761 4762 ContainerState: 4763 description: | 4764 ContainerState stores container's running state. It's part of ContainerJSONBase 4765 and will be returned by the "inspect" command. 4766 type: "object" 4767 x-nullable: true 4768 properties: 4769 Status: 4770 description: | 4771 String representation of the container state. Can be one of "created", 4772 "running", "paused", "restarting", "removing", "exited", or "dead". 4773 type: "string" 4774 enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] 4775 example: "running" 4776 Running: 4777 description: | 4778 Whether this container is running. 4779 4780 Note that a running container can be _paused_. The `Running` and `Paused` 4781 booleans are not mutually exclusive: 4782 4783 When pausing a container (on Linux), the freezer cgroup is used to suspend 4784 all processes in the container. Freezing the process requires the process to 4785 be running. As a result, paused containers are both `Running` _and_ `Paused`. 4786 4787 Use the `Status` field instead to determine if a container's state is "running". 4788 type: "boolean" 4789 example: true 4790 Paused: 4791 description: "Whether this container is paused." 4792 type: "boolean" 4793 example: false 4794 Restarting: 4795 description: "Whether this container is restarting." 4796 type: "boolean" 4797 example: false 4798 OOMKilled: 4799 description: | 4800 Whether a process within this container has been killed because it ran 4801 out of memory since the container was last started. 4802 type: "boolean" 4803 example: false 4804 Dead: 4805 type: "boolean" 4806 example: false 4807 Pid: 4808 description: "The process ID of this container" 4809 type: "integer" 4810 example: 1234 4811 ExitCode: 4812 description: "The last exit code of this container" 4813 type: "integer" 4814 example: 0 4815 Error: 4816 type: "string" 4817 StartedAt: 4818 description: "The time when this container was last started." 4819 type: "string" 4820 example: "2020-01-06T09:06:59.461876391Z" 4821 FinishedAt: 4822 description: "The time when this container last exited." 4823 type: "string" 4824 example: "2020-01-06T09:07:59.461876391Z" 4825 Health: 4826 $ref: "#/definitions/Health" 4827 4828 ContainerCreateResponse: 4829 description: "OK response to ContainerCreate operation" 4830 type: "object" 4831 title: "ContainerCreateResponse" 4832 x-go-name: "CreateResponse" 4833 required: [Id, Warnings] 4834 properties: 4835 Id: 4836 description: "The ID of the created container" 4837 type: "string" 4838 x-nullable: false 4839 example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 4840 Warnings: 4841 description: "Warnings encountered when creating the container" 4842 type: "array" 4843 x-nullable: false 4844 items: 4845 type: "string" 4846 example: [] 4847 4848 ContainerWaitResponse: 4849 description: "OK response to ContainerWait operation" 4850 type: "object" 4851 x-go-name: "WaitResponse" 4852 title: "ContainerWaitResponse" 4853 required: [StatusCode] 4854 properties: 4855 StatusCode: 4856 description: "Exit code of the container" 4857 type: "integer" 4858 format: "int64" 4859 x-nullable: false 4860 Error: 4861 $ref: "#/definitions/ContainerWaitExitError" 4862 4863 ContainerWaitExitError: 4864 description: "container waiting error, if any" 4865 type: "object" 4866 x-go-name: "WaitExitError" 4867 properties: 4868 Message: 4869 description: "Details of an error" 4870 type: "string" 4871 4872 SystemVersion: 4873 type: "object" 4874 description: | 4875 Response of Engine API: GET "/version" 4876 properties: 4877 Platform: 4878 type: "object" 4879 required: [Name] 4880 properties: 4881 Name: 4882 type: "string" 4883 Components: 4884 type: "array" 4885 description: | 4886 Information about system components 4887 items: 4888 type: "object" 4889 x-go-name: ComponentVersion 4890 required: [Name, Version] 4891 properties: 4892 Name: 4893 description: | 4894 Name of the component 4895 type: "string" 4896 example: "Engine" 4897 Version: 4898 description: | 4899 Version of the component 4900 type: "string" 4901 x-nullable: false 4902 example: "19.03.12" 4903 Details: 4904 description: | 4905 Key/value pairs of strings with additional information about the 4906 component. These values are intended for informational purposes 4907 only, and their content is not defined, and not part of the API 4908 specification. 4909 4910 These messages can be printed by the client as information to the user. 4911 type: "object" 4912 x-nullable: true 4913 Version: 4914 description: "The version of the daemon" 4915 type: "string" 4916 example: "19.03.12" 4917 ApiVersion: 4918 description: | 4919 The default (and highest) API version that is supported by the daemon 4920 type: "string" 4921 example: "1.40" 4922 MinAPIVersion: 4923 description: | 4924 The minimum API version that is supported by the daemon 4925 type: "string" 4926 example: "1.12" 4927 GitCommit: 4928 description: | 4929 The Git commit of the source code that was used to build the daemon 4930 type: "string" 4931 example: "48a66213fe" 4932 GoVersion: 4933 description: | 4934 The version Go used to compile the daemon, and the version of the Go 4935 runtime in use. 4936 type: "string" 4937 example: "go1.13.14" 4938 Os: 4939 description: | 4940 The operating system that the daemon is running on ("linux" or "windows") 4941 type: "string" 4942 example: "linux" 4943 Arch: 4944 description: | 4945 The architecture that the daemon is running on 4946 type: "string" 4947 example: "amd64" 4948 KernelVersion: 4949 description: | 4950 The kernel version (`uname -r`) that the daemon is running on. 4951 4952 This field is omitted when empty. 4953 type: "string" 4954 example: "4.19.76-linuxkit" 4955 Experimental: 4956 description: | 4957 Indicates if the daemon is started with experimental features enabled. 4958 4959 This field is omitted when empty / false. 4960 type: "boolean" 4961 example: true 4962 BuildTime: 4963 description: | 4964 The date and time that the daemon was compiled. 4965 type: "string" 4966 example: "2020-06-22T15:49:27.000000000+00:00" 4967 4968 SystemInfo: 4969 type: "object" 4970 properties: 4971 ID: 4972 description: | 4973 Unique identifier of the daemon. 4974 4975 <p><br /></p> 4976 4977 > **Note**: The format of the ID itself is not part of the API, and 4978 > should not be considered stable. 4979 type: "string" 4980 example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" 4981 Containers: 4982 description: "Total number of containers on the host." 4983 type: "integer" 4984 example: 14 4985 ContainersRunning: 4986 description: | 4987 Number of containers with status `"running"`. 4988 type: "integer" 4989 example: 3 4990 ContainersPaused: 4991 description: | 4992 Number of containers with status `"paused"`. 4993 type: "integer" 4994 example: 1 4995 ContainersStopped: 4996 description: | 4997 Number of containers with status `"stopped"`. 4998 type: "integer" 4999 example: 10 5000 Images: 5001 description: | 5002 Total number of images on the host. 5003 5004 Both _tagged_ and _untagged_ (dangling) images are counted. 5005 type: "integer" 5006 example: 508 5007 Driver: 5008 description: "Name of the storage driver in use." 5009 type: "string" 5010 example: "overlay2" 5011 DriverStatus: 5012 description: | 5013 Information specific to the storage driver, provided as 5014 "label" / "value" pairs. 5015 5016 This information is provided by the storage driver, and formatted 5017 in a way consistent with the output of `docker info` on the command 5018 line. 5019 5020 <p><br /></p> 5021 5022 > **Note**: The information returned in this field, including the 5023 > formatting of values and labels, should not be considered stable, 5024 > and may change without notice. 5025 type: "array" 5026 items: 5027 type: "array" 5028 items: 5029 type: "string" 5030 example: 5031 - ["Backing Filesystem", "extfs"] 5032 - ["Supports d_type", "true"] 5033 - ["Native Overlay Diff", "true"] 5034 DockerRootDir: 5035 description: | 5036 Root directory of persistent Docker state. 5037 5038 Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` 5039 on Windows. 5040 type: "string" 5041 example: "/var/lib/docker" 5042 Plugins: 5043 $ref: "#/definitions/PluginsInfo" 5044 MemoryLimit: 5045 description: "Indicates if the host has memory limit support enabled." 5046 type: "boolean" 5047 example: true 5048 SwapLimit: 5049 description: "Indicates if the host has memory swap limit support enabled." 5050 type: "boolean" 5051 example: true 5052 KernelMemoryTCP: 5053 description: | 5054 Indicates if the host has kernel memory TCP limit support enabled. This 5055 field is omitted if not supported. 5056 5057 Kernel memory TCP limits are not supported when using cgroups v2, which 5058 does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. 5059 type: "boolean" 5060 example: true 5061 CpuCfsPeriod: 5062 description: | 5063 Indicates if CPU CFS(Completely Fair Scheduler) period is supported by 5064 the host. 5065 type: "boolean" 5066 example: true 5067 CpuCfsQuota: 5068 description: | 5069 Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by 5070 the host. 5071 type: "boolean" 5072 example: true 5073 CPUShares: 5074 description: | 5075 Indicates if CPU Shares limiting is supported by the host. 5076 type: "boolean" 5077 example: true 5078 CPUSet: 5079 description: | 5080 Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. 5081 5082 See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) 5083 type: "boolean" 5084 example: true 5085 PidsLimit: 5086 description: "Indicates if the host kernel has PID limit support enabled." 5087 type: "boolean" 5088 example: true 5089 OomKillDisable: 5090 description: "Indicates if OOM killer disable is supported on the host." 5091 type: "boolean" 5092 IPv4Forwarding: 5093 description: "Indicates IPv4 forwarding is enabled." 5094 type: "boolean" 5095 example: true 5096 BridgeNfIptables: 5097 description: "Indicates if `bridge-nf-call-iptables` is available on the host." 5098 type: "boolean" 5099 example: true 5100 BridgeNfIp6tables: 5101 description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." 5102 type: "boolean" 5103 example: true 5104 Debug: 5105 description: | 5106 Indicates if the daemon is running in debug-mode / with debug-level 5107 logging enabled. 5108 type: "boolean" 5109 example: true 5110 NFd: 5111 description: | 5112 The total number of file Descriptors in use by the daemon process. 5113 5114 This information is only returned if debug-mode is enabled. 5115 type: "integer" 5116 example: 64 5117 NGoroutines: 5118 description: | 5119 The number of goroutines that currently exist. 5120 5121 This information is only returned if debug-mode is enabled. 5122 type: "integer" 5123 example: 174 5124 SystemTime: 5125 description: | 5126 Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) 5127 format with nano-seconds. 5128 type: "string" 5129 example: "2017-08-08T20:28:29.06202363Z" 5130 LoggingDriver: 5131 description: | 5132 The logging driver to use as a default for new containers. 5133 type: "string" 5134 CgroupDriver: 5135 description: | 5136 The driver to use for managing cgroups. 5137 type: "string" 5138 enum: ["cgroupfs", "systemd", "none"] 5139 default: "cgroupfs" 5140 example: "cgroupfs" 5141 CgroupVersion: 5142 description: | 5143 The version of the cgroup. 5144 type: "string" 5145 enum: ["1", "2"] 5146 default: "1" 5147 example: "1" 5148 NEventsListener: 5149 description: "Number of event listeners subscribed." 5150 type: "integer" 5151 example: 30 5152 KernelVersion: 5153 description: | 5154 Kernel version of the host. 5155 5156 On Linux, this information obtained from `uname`. On Windows this 5157 information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd> 5158 registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. 5159 type: "string" 5160 example: "4.9.38-moby" 5161 OperatingSystem: 5162 description: | 5163 Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" 5164 or "Windows Server 2016 Datacenter" 5165 type: "string" 5166 example: "Alpine Linux v3.5" 5167 OSVersion: 5168 description: | 5169 Version of the host's operating system 5170 5171 <p><br /></p> 5172 5173 > **Note**: The information returned in this field, including its 5174 > very existence, and the formatting of values, should not be considered 5175 > stable, and may change without notice. 5176 type: "string" 5177 example: "16.04" 5178 OSType: 5179 description: | 5180 Generic type of the operating system of the host, as returned by the 5181 Go runtime (`GOOS`). 5182 5183 Currently returned values are "linux" and "windows". A full list of 5184 possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). 5185 type: "string" 5186 example: "linux" 5187 Architecture: 5188 description: | 5189 Hardware architecture of the host, as returned by the Go runtime 5190 (`GOARCH`). 5191 5192 A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). 5193 type: "string" 5194 example: "x86_64" 5195 NCPU: 5196 description: | 5197 The number of logical CPUs usable by the daemon. 5198 5199 The number of available CPUs is checked by querying the operating 5200 system when the daemon starts. Changes to operating system CPU 5201 allocation after the daemon is started are not reflected. 5202 type: "integer" 5203 example: 4 5204 MemTotal: 5205 description: | 5206 Total amount of physical memory available on the host, in bytes. 5207 type: "integer" 5208 format: "int64" 5209 example: 2095882240 5210 5211 IndexServerAddress: 5212 description: | 5213 Address / URL of the index server that is used for image search, 5214 and as a default for user authentication for Docker Hub and Docker Cloud. 5215 default: "https://index.docker.io/v1/" 5216 type: "string" 5217 example: "https://index.docker.io/v1/" 5218 RegistryConfig: 5219 $ref: "#/definitions/RegistryServiceConfig" 5220 GenericResources: 5221 $ref: "#/definitions/GenericResources" 5222 HttpProxy: 5223 description: | 5224 HTTP-proxy configured for the daemon. This value is obtained from the 5225 [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 5226 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 5227 are masked in the API response. 5228 5229 Containers do not automatically inherit this configuration. 5230 type: "string" 5231 example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" 5232 HttpsProxy: 5233 description: | 5234 HTTPS-proxy configured for the daemon. This value is obtained from the 5235 [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 5236 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 5237 are masked in the API response. 5238 5239 Containers do not automatically inherit this configuration. 5240 type: "string" 5241 example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" 5242 NoProxy: 5243 description: | 5244 Comma-separated list of domain extensions for which no proxy should be 5245 used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) 5246 environment variable. 5247 5248 Containers do not automatically inherit this configuration. 5249 type: "string" 5250 example: "*.local, 169.254/16" 5251 Name: 5252 description: "Hostname of the host." 5253 type: "string" 5254 example: "node5.corp.example.com" 5255 Labels: 5256 description: | 5257 User-defined labels (key/value metadata) as set on the daemon. 5258 5259 <p><br /></p> 5260 5261 > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, 5262 > set through the daemon configuration, and _node_ labels, set from a 5263 > manager node in the Swarm. Node labels are not included in this 5264 > field. Node labels can be retrieved using the `/nodes/(id)` endpoint 5265 > on a manager node in the Swarm. 5266 type: "array" 5267 items: 5268 type: "string" 5269 example: ["storage=ssd", "production"] 5270 ExperimentalBuild: 5271 description: | 5272 Indicates if experimental features are enabled on the daemon. 5273 type: "boolean" 5274 example: true 5275 ServerVersion: 5276 description: | 5277 Version string of the daemon. 5278 type: "string" 5279 example: "24.0.2" 5280 Runtimes: 5281 description: | 5282 List of [OCI compliant](https://github.com/opencontainers/runtime-spec) 5283 runtimes configured on the daemon. Keys hold the "name" used to 5284 reference the runtime. 5285 5286 The Docker daemon relies on an OCI compliant runtime (invoked via the 5287 `containerd` daemon) as its interface to the Linux kernel namespaces, 5288 cgroups, and SELinux. 5289 5290 The default runtime is `runc`, and automatically configured. Additional 5291 runtimes can be configured by the user and will be listed here. 5292 type: "object" 5293 additionalProperties: 5294 $ref: "#/definitions/Runtime" 5295 default: 5296 runc: 5297 path: "runc" 5298 example: 5299 runc: 5300 path: "runc" 5301 runc-master: 5302 path: "/go/bin/runc" 5303 custom: 5304 path: "/usr/local/bin/my-oci-runtime" 5305 runtimeArgs: ["--debug", "--systemd-cgroup=false"] 5306 DefaultRuntime: 5307 description: | 5308 Name of the default OCI runtime that is used when starting containers. 5309 5310 The default can be overridden per-container at create time. 5311 type: "string" 5312 default: "runc" 5313 example: "runc" 5314 Swarm: 5315 $ref: "#/definitions/SwarmInfo" 5316 LiveRestoreEnabled: 5317 description: | 5318 Indicates if live restore is enabled. 5319 5320 If enabled, containers are kept running when the daemon is shutdown 5321 or upon daemon start if running containers are detected. 5322 type: "boolean" 5323 default: false 5324 example: false 5325 Isolation: 5326 description: | 5327 Represents the isolation technology to use as a default for containers. 5328 The supported values are platform-specific. 5329 5330 If no isolation value is specified on daemon start, on Windows client, 5331 the default is `hyperv`, and on Windows server, the default is `process`. 5332 5333 This option is currently not used on other platforms. 5334 default: "default" 5335 type: "string" 5336 enum: 5337 - "default" 5338 - "hyperv" 5339 - "process" 5340 InitBinary: 5341 description: | 5342 Name and, optional, path of the `docker-init` binary. 5343 5344 If the path is omitted, the daemon searches the host's `$PATH` for the 5345 binary and uses the first result. 5346 type: "string" 5347 example: "docker-init" 5348 ContainerdCommit: 5349 $ref: "#/definitions/Commit" 5350 RuncCommit: 5351 $ref: "#/definitions/Commit" 5352 InitCommit: 5353 $ref: "#/definitions/Commit" 5354 SecurityOptions: 5355 description: | 5356 List of security features that are enabled on the daemon, such as 5357 apparmor, seccomp, SELinux, user-namespaces (userns), rootless and 5358 no-new-privileges. 5359 5360 Additional configuration options for each security feature may 5361 be present, and are included as a comma-separated list of key/value 5362 pairs. 5363 type: "array" 5364 items: 5365 type: "string" 5366 example: 5367 - "name=apparmor" 5368 - "name=seccomp,profile=default" 5369 - "name=selinux" 5370 - "name=userns" 5371 - "name=rootless" 5372 ProductLicense: 5373 description: | 5374 Reports a summary of the product license on the daemon. 5375 5376 If a commercial license has been applied to the daemon, information 5377 such as number of nodes, and expiration are included. 5378 type: "string" 5379 example: "Community Engine" 5380 DefaultAddressPools: 5381 description: | 5382 List of custom default address pools for local networks, which can be 5383 specified in the daemon.json file or dockerd option. 5384 5385 Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 5386 10.10.[0-255].0/24 address pools. 5387 type: "array" 5388 items: 5389 type: "object" 5390 properties: 5391 Base: 5392 description: "The network address in CIDR format" 5393 type: "string" 5394 example: "10.10.0.0/16" 5395 Size: 5396 description: "The network pool size" 5397 type: "integer" 5398 example: "24" 5399 Warnings: 5400 description: | 5401 List of warnings / informational messages about missing features, or 5402 issues related to the daemon configuration. 5403 5404 These messages can be printed by the client as information to the user. 5405 type: "array" 5406 items: 5407 type: "string" 5408 example: 5409 - "WARNING: No memory limit support" 5410 - "WARNING: bridge-nf-call-iptables is disabled" 5411 - "WARNING: bridge-nf-call-ip6tables is disabled" 5412 CDISpecDirs: 5413 description: | 5414 List of directories where (Container Device Interface) CDI 5415 specifications are located. 5416 5417 These specifications define vendor-specific modifications to an OCI 5418 runtime specification for a container being created. 5419 5420 An empty list indicates that CDI device injection is disabled. 5421 5422 Note that since using CDI device injection requires the daemon to have 5423 experimental enabled. For non-experimental daemons an empty list will 5424 always be returned. 5425 type: "array" 5426 items: 5427 type: "string" 5428 example: 5429 - "/etc/cdi" 5430 - "/var/run/cdi" 5431 5432 # PluginsInfo is a temp struct holding Plugins name 5433 # registered with docker daemon. It is used by Info struct 5434 PluginsInfo: 5435 description: | 5436 Available plugins per type. 5437 5438 <p><br /></p> 5439 5440 > **Note**: Only unmanaged (V1) plugins are included in this list. 5441 > V1 plugins are "lazily" loaded, and are not returned in this list 5442 > if there is no resource using the plugin. 5443 type: "object" 5444 properties: 5445 Volume: 5446 description: "Names of available volume-drivers, and network-driver plugins." 5447 type: "array" 5448 items: 5449 type: "string" 5450 example: ["local"] 5451 Network: 5452 description: "Names of available network-drivers, and network-driver plugins." 5453 type: "array" 5454 items: 5455 type: "string" 5456 example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] 5457 Authorization: 5458 description: "Names of available authorization plugins." 5459 type: "array" 5460 items: 5461 type: "string" 5462 example: ["img-authz-plugin", "hbm"] 5463 Log: 5464 description: "Names of available logging-drivers, and logging-driver plugins." 5465 type: "array" 5466 items: 5467 type: "string" 5468 example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "splunk", "syslog"] 5469 5470 5471 RegistryServiceConfig: 5472 description: | 5473 RegistryServiceConfig stores daemon registry services configuration. 5474 type: "object" 5475 x-nullable: true 5476 properties: 5477 AllowNondistributableArtifactsCIDRs: 5478 description: | 5479 List of IP ranges to which nondistributable artifacts can be pushed, 5480 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). 5481 5482 Some images (for example, Windows base images) contain artifacts 5483 whose distribution is restricted by license. When these images are 5484 pushed to a registry, restricted artifacts are not included. 5485 5486 This configuration override this behavior, and enables the daemon to 5487 push nondistributable artifacts to all registries whose resolved IP 5488 address is within the subnet described by the CIDR syntax. 5489 5490 This option is useful when pushing images containing 5491 nondistributable artifacts to a registry on an air-gapped network so 5492 hosts on that network can pull the images without connecting to 5493 another server. 5494 5495 > **Warning**: Nondistributable artifacts typically have restrictions 5496 > on how and where they can be distributed and shared. Only use this 5497 > feature to push artifacts to private registries and ensure that you 5498 > are in compliance with any terms that cover redistributing 5499 > nondistributable artifacts. 5500 5501 type: "array" 5502 items: 5503 type: "string" 5504 example: ["::1/128", "127.0.0.0/8"] 5505 AllowNondistributableArtifactsHostnames: 5506 description: | 5507 List of registry hostnames to which nondistributable artifacts can be 5508 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. 5509 5510 Some images (for example, Windows base images) contain artifacts 5511 whose distribution is restricted by license. When these images are 5512 pushed to a registry, restricted artifacts are not included. 5513 5514 This configuration override this behavior for the specified 5515 registries. 5516 5517 This option is useful when pushing images containing 5518 nondistributable artifacts to a registry on an air-gapped network so 5519 hosts on that network can pull the images without connecting to 5520 another server. 5521 5522 > **Warning**: Nondistributable artifacts typically have restrictions 5523 > on how and where they can be distributed and shared. Only use this 5524 > feature to push artifacts to private registries and ensure that you 5525 > are in compliance with any terms that cover redistributing 5526 > nondistributable artifacts. 5527 type: "array" 5528 items: 5529 type: "string" 5530 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] 5531 InsecureRegistryCIDRs: 5532 description: | 5533 List of IP ranges of insecure registries, using the CIDR syntax 5534 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries 5535 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates 5536 from unknown CAs) communication. 5537 5538 By default, local registries (`127.0.0.0/8`) are configured as 5539 insecure. All other registries are secure. Communicating with an 5540 insecure registry is not possible if the daemon assumes that registry 5541 is secure. 5542 5543 This configuration override this behavior, insecure communication with 5544 registries whose resolved IP address is within the subnet described by 5545 the CIDR syntax. 5546 5547 Registries can also be marked insecure by hostname. Those registries 5548 are listed under `IndexConfigs` and have their `Secure` field set to 5549 `false`. 5550 5551 > **Warning**: Using this option can be useful when running a local 5552 > registry, but introduces security vulnerabilities. This option 5553 > should therefore ONLY be used for testing purposes. For increased 5554 > security, users should add their CA to their system's list of trusted 5555 > CAs instead of enabling this option. 5556 type: "array" 5557 items: 5558 type: "string" 5559 example: ["::1/128", "127.0.0.0/8"] 5560 IndexConfigs: 5561 type: "object" 5562 additionalProperties: 5563 $ref: "#/definitions/IndexInfo" 5564 example: 5565 "127.0.0.1:5000": 5566 "Name": "127.0.0.1:5000" 5567 "Mirrors": [] 5568 "Secure": false 5569 "Official": false 5570 "[2001:db8:a0b:12f0::1]:80": 5571 "Name": "[2001:db8:a0b:12f0::1]:80" 5572 "Mirrors": [] 5573 "Secure": false 5574 "Official": false 5575 "docker.io": 5576 Name: "docker.io" 5577 Mirrors: ["https://hub-mirror.corp.example.com:5000/"] 5578 Secure: true 5579 Official: true 5580 "registry.internal.corp.example.com:3000": 5581 Name: "registry.internal.corp.example.com:3000" 5582 Mirrors: [] 5583 Secure: false 5584 Official: false 5585 Mirrors: 5586 description: | 5587 List of registry URLs that act as a mirror for the official 5588 (`docker.io`) registry. 5589 5590 type: "array" 5591 items: 5592 type: "string" 5593 example: 5594 - "https://hub-mirror.corp.example.com:5000/" 5595 - "https://[2001:db8:a0b:12f0::1]/" 5596 5597 IndexInfo: 5598 description: 5599 IndexInfo contains information about a registry. 5600 type: "object" 5601 x-nullable: true 5602 properties: 5603 Name: 5604 description: | 5605 Name of the registry, such as "docker.io". 5606 type: "string" 5607 example: "docker.io" 5608 Mirrors: 5609 description: | 5610 List of mirrors, expressed as URIs. 5611 type: "array" 5612 items: 5613 type: "string" 5614 example: 5615 - "https://hub-mirror.corp.example.com:5000/" 5616 - "https://registry-2.docker.io/" 5617 - "https://registry-3.docker.io/" 5618 Secure: 5619 description: | 5620 Indicates if the registry is part of the list of insecure 5621 registries. 5622 5623 If `false`, the registry is insecure. Insecure registries accept 5624 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from 5625 unknown CAs) communication. 5626 5627 > **Warning**: Insecure registries can be useful when running a local 5628 > registry. However, because its use creates security vulnerabilities 5629 > it should ONLY be enabled for testing purposes. For increased 5630 > security, users should add their CA to their system's list of 5631 > trusted CAs instead of enabling this option. 5632 type: "boolean" 5633 example: true 5634 Official: 5635 description: | 5636 Indicates whether this is an official registry (i.e., Docker Hub / docker.io) 5637 type: "boolean" 5638 example: true 5639 5640 Runtime: 5641 description: | 5642 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) 5643 runtime. 5644 5645 The runtime is invoked by the daemon via the `containerd` daemon. OCI 5646 runtimes act as an interface to the Linux kernel namespaces, cgroups, 5647 and SELinux. 5648 type: "object" 5649 properties: 5650 path: 5651 description: | 5652 Name and, optional, path, of the OCI executable binary. 5653 5654 If the path is omitted, the daemon searches the host's `$PATH` for the 5655 binary and uses the first result. 5656 type: "string" 5657 example: "/usr/local/bin/my-oci-runtime" 5658 runtimeArgs: 5659 description: | 5660 List of command-line arguments to pass to the runtime when invoked. 5661 type: "array" 5662 x-nullable: true 5663 items: 5664 type: "string" 5665 example: ["--debug", "--systemd-cgroup=false"] 5666 status: 5667 description: | 5668 Information specific to the runtime. 5669 5670 While this API specification does not define data provided by runtimes, 5671 the following well-known properties may be provided by runtimes: 5672 5673 `org.opencontainers.runtime-spec.features`: features structure as defined 5674 in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), 5675 in a JSON string representation. 5676 5677 <p><br /></p> 5678 5679 > **Note**: The information returned in this field, including the 5680 > formatting of values and labels, should not be considered stable, 5681 > and may change without notice. 5682 type: "object" 5683 x-nullable: true 5684 additionalProperties: 5685 type: "string" 5686 example: 5687 "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.1.0\",\"...\":\"...\"}" 5688 5689 Commit: 5690 description: | 5691 Commit holds the Git-commit (SHA1) that a binary was built from, as 5692 reported in the version-string of external tools, such as `containerd`, 5693 or `runC`. 5694 type: "object" 5695 properties: 5696 ID: 5697 description: "Actual commit ID of external tool." 5698 type: "string" 5699 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" 5700 Expected: 5701 description: | 5702 Commit ID of external tool expected by dockerd as set at build time. 5703 type: "string" 5704 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" 5705 5706 SwarmInfo: 5707 description: | 5708 Represents generic information about swarm. 5709 type: "object" 5710 properties: 5711 NodeID: 5712 description: "Unique identifier of for this node in the swarm." 5713 type: "string" 5714 default: "" 5715 example: "k67qz4598weg5unwwffg6z1m1" 5716 NodeAddr: 5717 description: | 5718 IP address at which this node can be reached by other nodes in the 5719 swarm. 5720 type: "string" 5721 default: "" 5722 example: "10.0.0.46" 5723 LocalNodeState: 5724 $ref: "#/definitions/LocalNodeState" 5725 ControlAvailable: 5726 type: "boolean" 5727 default: false 5728 example: true 5729 Error: 5730 type: "string" 5731 default: "" 5732 RemoteManagers: 5733 description: | 5734 List of ID's and addresses of other managers in the swarm. 5735 type: "array" 5736 default: null 5737 x-nullable: true 5738 items: 5739 $ref: "#/definitions/PeerNode" 5740 example: 5741 - NodeID: "71izy0goik036k48jg985xnds" 5742 Addr: "10.0.0.158:2377" 5743 - NodeID: "79y6h1o4gv8n120drcprv5nmc" 5744 Addr: "10.0.0.159:2377" 5745 - NodeID: "k67qz4598weg5unwwffg6z1m1" 5746 Addr: "10.0.0.46:2377" 5747 Nodes: 5748 description: "Total number of nodes in the swarm." 5749 type: "integer" 5750 x-nullable: true 5751 example: 4 5752 Managers: 5753 description: "Total number of managers in the swarm." 5754 type: "integer" 5755 x-nullable: true 5756 example: 3 5757 Cluster: 5758 $ref: "#/definitions/ClusterInfo" 5759 5760 LocalNodeState: 5761 description: "Current local status of this node." 5762 type: "string" 5763 default: "" 5764 enum: 5765 - "" 5766 - "inactive" 5767 - "pending" 5768 - "active" 5769 - "error" 5770 - "locked" 5771 example: "active" 5772 5773 PeerNode: 5774 description: "Represents a peer-node in the swarm" 5775 type: "object" 5776 properties: 5777 NodeID: 5778 description: "Unique identifier of for this node in the swarm." 5779 type: "string" 5780 Addr: 5781 description: | 5782 IP address and ports at which this node can be reached. 5783 type: "string" 5784 5785 NetworkAttachmentConfig: 5786 description: | 5787 Specifies how a service should be attached to a particular network. 5788 type: "object" 5789 properties: 5790 Target: 5791 description: | 5792 The target network for attachment. Must be a network name or ID. 5793 type: "string" 5794 Aliases: 5795 description: | 5796 Discoverable alternate names for the service on this network. 5797 type: "array" 5798 items: 5799 type: "string" 5800 DriverOpts: 5801 description: | 5802 Driver attachment options for the network target. 5803 type: "object" 5804 additionalProperties: 5805 type: "string" 5806 5807 EventActor: 5808 description: | 5809 Actor describes something that generates events, like a container, network, 5810 or a volume. 5811 type: "object" 5812 properties: 5813 ID: 5814 description: "The ID of the object emitting the event" 5815 type: "string" 5816 example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 5817 Attributes: 5818 description: | 5819 Various key/value attributes of the object, depending on its type. 5820 type: "object" 5821 additionalProperties: 5822 type: "string" 5823 example: 5824 com.example.some-label: "some-label-value" 5825 image: "alpine:latest" 5826 name: "my-container" 5827 5828 EventMessage: 5829 description: | 5830 EventMessage represents the information an event contains. 5831 type: "object" 5832 title: "SystemEventsResponse" 5833 properties: 5834 Type: 5835 description: "The type of object emitting the event" 5836 type: "string" 5837 enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] 5838 example: "container" 5839 Action: 5840 description: "The type of event" 5841 type: "string" 5842 example: "create" 5843 Actor: 5844 $ref: "#/definitions/EventActor" 5845 scope: 5846 description: | 5847 Scope of the event. Engine events are `local` scope. Cluster (Swarm) 5848 events are `swarm` scope. 5849 type: "string" 5850 enum: ["local", "swarm"] 5851 time: 5852 description: "Timestamp of event" 5853 type: "integer" 5854 format: "int64" 5855 example: 1629574695 5856 timeNano: 5857 description: "Timestamp of event, with nanosecond accuracy" 5858 type: "integer" 5859 format: "int64" 5860 example: 1629574695515050031 5861 5862 OCIDescriptor: 5863 type: "object" 5864 x-go-name: Descriptor 5865 description: | 5866 A descriptor struct containing digest, media type, and size, as defined in 5867 the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). 5868 properties: 5869 mediaType: 5870 description: | 5871 The media type of the object this schema refers to. 5872 type: "string" 5873 example: "application/vnd.docker.distribution.manifest.v2+json" 5874 digest: 5875 description: | 5876 The digest of the targeted content. 5877 type: "string" 5878 example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" 5879 size: 5880 description: | 5881 The size in bytes of the blob. 5882 type: "integer" 5883 format: "int64" 5884 example: 3987495 5885 # TODO Not yet including these fields for now, as they are nil / omitted in our response. 5886 # urls: 5887 # description: | 5888 # List of URLs from which this object MAY be downloaded. 5889 # type: "array" 5890 # items: 5891 # type: "string" 5892 # format: "uri" 5893 # annotations: 5894 # description: | 5895 # Arbitrary metadata relating to the targeted content. 5896 # type: "object" 5897 # additionalProperties: 5898 # type: "string" 5899 # platform: 5900 # $ref: "#/definitions/OCIPlatform" 5901 5902 OCIPlatform: 5903 type: "object" 5904 x-go-name: Platform 5905 description: | 5906 Describes the platform which the image in the manifest runs on, as defined 5907 in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). 5908 properties: 5909 architecture: 5910 description: | 5911 The CPU architecture, for example `amd64` or `ppc64`. 5912 type: "string" 5913 example: "arm" 5914 os: 5915 description: | 5916 The operating system, for example `linux` or `windows`. 5917 type: "string" 5918 example: "windows" 5919 os.version: 5920 description: | 5921 Optional field specifying the operating system version, for example on 5922 Windows `10.0.19041.1165`. 5923 type: "string" 5924 example: "10.0.19041.1165" 5925 os.features: 5926 description: | 5927 Optional field specifying an array of strings, each listing a required 5928 OS feature (for example on Windows `win32k`). 5929 type: "array" 5930 items: 5931 type: "string" 5932 example: 5933 - "win32k" 5934 variant: 5935 description: | 5936 Optional field specifying a variant of the CPU, for example `v7` to 5937 specify ARMv7 when architecture is `arm`. 5938 type: "string" 5939 example: "v7" 5940 5941 DistributionInspect: 5942 type: "object" 5943 x-go-name: DistributionInspect 5944 title: "DistributionInspectResponse" 5945 required: [Descriptor, Platforms] 5946 description: | 5947 Describes the result obtained from contacting the registry to retrieve 5948 image metadata. 5949 properties: 5950 Descriptor: 5951 $ref: "#/definitions/OCIDescriptor" 5952 Platforms: 5953 type: "array" 5954 description: | 5955 An array containing all platforms supported by the image. 5956 items: 5957 $ref: "#/definitions/OCIPlatform" 5958 5959 ClusterVolume: 5960 type: "object" 5961 description: | 5962 Options and information specific to, and only present on, Swarm CSI 5963 cluster volumes. 5964 properties: 5965 ID: 5966 type: "string" 5967 description: | 5968 The Swarm ID of this volume. Because cluster volumes are Swarm 5969 objects, they have an ID, unlike non-cluster volumes. This ID can 5970 be used to refer to the Volume instead of the name. 5971 Version: 5972 $ref: "#/definitions/ObjectVersion" 5973 CreatedAt: 5974 type: "string" 5975 format: "dateTime" 5976 UpdatedAt: 5977 type: "string" 5978 format: "dateTime" 5979 Spec: 5980 $ref: "#/definitions/ClusterVolumeSpec" 5981 Info: 5982 type: "object" 5983 description: | 5984 Information about the global status of the volume. 5985 properties: 5986 CapacityBytes: 5987 type: "integer" 5988 format: "int64" 5989 description: | 5990 The capacity of the volume in bytes. A value of 0 indicates that 5991 the capacity is unknown. 5992 VolumeContext: 5993 type: "object" 5994 description: | 5995 A map of strings to strings returned from the storage plugin when 5996 the volume is created. 5997 additionalProperties: 5998 type: "string" 5999 VolumeID: 6000 type: "string" 6001 description: | 6002 The ID of the volume as returned by the CSI storage plugin. This 6003 is distinct from the volume's ID as provided by Docker. This ID 6004 is never used by the user when communicating with Docker to refer 6005 to this volume. If the ID is blank, then the Volume has not been 6006 successfully created in the plugin yet. 6007 AccessibleTopology: 6008 type: "array" 6009 description: | 6010 The topology this volume is actually accessible from. 6011 items: 6012 $ref: "#/definitions/Topology" 6013 PublishStatus: 6014 type: "array" 6015 description: | 6016 The status of the volume as it pertains to its publishing and use on 6017 specific nodes 6018 items: 6019 type: "object" 6020 properties: 6021 NodeID: 6022 type: "string" 6023 description: | 6024 The ID of the Swarm node the volume is published on. 6025 State: 6026 type: "string" 6027 description: | 6028 The published state of the volume. 6029 * `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. 6030 * `published` The volume is published successfully to the node. 6031 * `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. 6032 * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. 6033 enum: 6034 - "pending-publish" 6035 - "published" 6036 - "pending-node-unpublish" 6037 - "pending-controller-unpublish" 6038 PublishContext: 6039 type: "object" 6040 description: | 6041 A map of strings to strings returned by the CSI controller 6042 plugin when a volume is published. 6043 additionalProperties: 6044 type: "string" 6045 6046 ClusterVolumeSpec: 6047 type: "object" 6048 description: | 6049 Cluster-specific options used to create the volume. 6050 properties: 6051 Group: 6052 type: "string" 6053 description: | 6054 Group defines the volume group of this volume. Volumes belonging to 6055 the same group can be referred to by group name when creating 6056 Services. Referring to a volume by group instructs Swarm to treat 6057 volumes in that group interchangeably for the purpose of scheduling. 6058 Volumes with an empty string for a group technically all belong to 6059 the same, emptystring group. 6060 AccessMode: 6061 type: "object" 6062 description: | 6063 Defines how the volume is used by tasks. 6064 properties: 6065 Scope: 6066 type: "string" 6067 description: | 6068 The set of nodes this volume can be used on at one time. 6069 - `single` The volume may only be scheduled to one node at a time. 6070 - `multi` the volume may be scheduled to any supported number of nodes at a time. 6071 default: "single" 6072 enum: ["single", "multi"] 6073 x-nullable: false 6074 Sharing: 6075 type: "string" 6076 description: | 6077 The number and way that different tasks can use this volume 6078 at one time. 6079 - `none` The volume may only be used by one task at a time. 6080 - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly 6081 - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. 6082 - `all` The volume may have any number of readers and writers. 6083 default: "none" 6084 enum: ["none", "readonly", "onewriter", "all"] 6085 x-nullable: false 6086 MountVolume: 6087 type: "object" 6088 description: | 6089 Options for using this volume as a Mount-type volume. 6090 6091 Either MountVolume or BlockVolume, but not both, must be 6092 present. 6093 properties: 6094 FsType: 6095 type: "string" 6096 description: | 6097 Specifies the filesystem type for the mount volume. 6098 Optional. 6099 MountFlags: 6100 type: "array" 6101 description: | 6102 Flags to pass when mounting the volume. Optional. 6103 items: 6104 type: "string" 6105 BlockVolume: 6106 type: "object" 6107 description: | 6108 Options for using this volume as a Block-type volume. 6109 Intentionally empty. 6110 Secrets: 6111 type: "array" 6112 description: | 6113 Swarm Secrets that are passed to the CSI storage plugin when 6114 operating on this volume. 6115 items: 6116 type: "object" 6117 description: | 6118 One cluster volume secret entry. Defines a key-value pair that 6119 is passed to the plugin. 6120 properties: 6121 Key: 6122 type: "string" 6123 description: | 6124 Key is the name of the key of the key-value pair passed to 6125 the plugin. 6126 Secret: 6127 type: "string" 6128 description: | 6129 Secret is the swarm Secret object from which to read data. 6130 This can be a Secret name or ID. The Secret data is 6131 retrieved by swarm and used as the value of the key-value 6132 pair passed to the plugin. 6133 AccessibilityRequirements: 6134 type: "object" 6135 description: | 6136 Requirements for the accessible topology of the volume. These 6137 fields are optional. For an in-depth description of what these 6138 fields mean, see the CSI specification. 6139 properties: 6140 Requisite: 6141 type: "array" 6142 description: | 6143 A list of required topologies, at least one of which the 6144 volume must be accessible from. 6145 items: 6146 $ref: "#/definitions/Topology" 6147 Preferred: 6148 type: "array" 6149 description: | 6150 A list of topologies that the volume should attempt to be 6151 provisioned in. 6152 items: 6153 $ref: "#/definitions/Topology" 6154 CapacityRange: 6155 type: "object" 6156 description: | 6157 The desired capacity that the volume should be created with. If 6158 empty, the plugin will decide the capacity. 6159 properties: 6160 RequiredBytes: 6161 type: "integer" 6162 format: "int64" 6163 description: | 6164 The volume must be at least this big. The value of 0 6165 indicates an unspecified minimum 6166 LimitBytes: 6167 type: "integer" 6168 format: "int64" 6169 description: | 6170 The volume must not be bigger than this. The value of 0 6171 indicates an unspecified maximum. 6172 Availability: 6173 type: "string" 6174 description: | 6175 The availability of the volume for use in tasks. 6176 - `active` The volume is fully available for scheduling on the cluster 6177 - `pause` No new workloads should use the volume, but existing workloads are not stopped. 6178 - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. 6179 default: "active" 6180 x-nullable: false 6181 enum: 6182 - "active" 6183 - "pause" 6184 - "drain" 6185 6186 Topology: 6187 description: | 6188 A map of topological domains to topological segments. For in depth 6189 details, see documentation for the Topology object in the CSI 6190 specification. 6191 type: "object" 6192 additionalProperties: 6193 type: "string" 6194 6195 paths: 6196 /containers/json: 6197 get: 6198 summary: "List containers" 6199 description: | 6200 Returns a list of containers. For details on the format, see the 6201 [inspect endpoint](#operation/ContainerInspect). 6202 6203 Note that it uses a different, smaller representation of a container 6204 than inspecting a single container. For example, the list of linked 6205 containers is not propagated . 6206 operationId: "ContainerList" 6207 produces: 6208 - "application/json" 6209 parameters: 6210 - name: "all" 6211 in: "query" 6212 description: | 6213 Return all containers. By default, only running containers are shown. 6214 type: "boolean" 6215 default: false 6216 - name: "limit" 6217 in: "query" 6218 description: | 6219 Return this number of most recently created containers, including 6220 non-running ones. 6221 type: "integer" 6222 - name: "size" 6223 in: "query" 6224 description: | 6225 Return the size of container as fields `SizeRw` and `SizeRootFs`. 6226 type: "boolean" 6227 default: false 6228 - name: "filters" 6229 in: "query" 6230 description: | 6231 Filters to process on the container list, encoded as JSON (a 6232 `map[string][]string`). For example, `{"status": ["paused"]}` will 6233 only return paused containers. 6234 6235 Available filters: 6236 6237 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 6238 - `before`=(`<container id>` or `<container name>`) 6239 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 6240 - `exited=<int>` containers with exit code of `<int>` 6241 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 6242 - `id=<ID>` a container's ID 6243 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 6244 - `is-task=`(`true`|`false`) 6245 - `label=key` or `label="key=value"` of a container label 6246 - `name=<name>` a container's name 6247 - `network`=(`<network id>` or `<network name>`) 6248 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 6249 - `since`=(`<container id>` or `<container name>`) 6250 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 6251 - `volume`=(`<volume name>` or `<mount point destination>`) 6252 type: "string" 6253 responses: 6254 200: 6255 description: "no error" 6256 schema: 6257 type: "array" 6258 items: 6259 $ref: "#/definitions/ContainerSummary" 6260 examples: 6261 application/json: 6262 - Id: "8dfafdbc3a40" 6263 Names: 6264 - "/boring_feynman" 6265 Image: "ubuntu:latest" 6266 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 6267 Command: "echo 1" 6268 Created: 1367854155 6269 State: "Exited" 6270 Status: "Exit 0" 6271 Ports: 6272 - PrivatePort: 2222 6273 PublicPort: 3333 6274 Type: "tcp" 6275 Labels: 6276 com.example.vendor: "Acme" 6277 com.example.license: "GPL" 6278 com.example.version: "1.0" 6279 SizeRw: 12288 6280 SizeRootFs: 0 6281 HostConfig: 6282 NetworkMode: "default" 6283 NetworkSettings: 6284 Networks: 6285 bridge: 6286 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6287 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 6288 Gateway: "172.17.0.1" 6289 IPAddress: "172.17.0.2" 6290 IPPrefixLen: 16 6291 IPv6Gateway: "" 6292 GlobalIPv6Address: "" 6293 GlobalIPv6PrefixLen: 0 6294 MacAddress: "02:42:ac:11:00:02" 6295 Mounts: 6296 - Name: "fac362...80535" 6297 Source: "/data" 6298 Destination: "/data" 6299 Driver: "local" 6300 Mode: "ro,Z" 6301 RW: false 6302 Propagation: "" 6303 - Id: "9cd87474be90" 6304 Names: 6305 - "/coolName" 6306 Image: "ubuntu:latest" 6307 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 6308 Command: "echo 222222" 6309 Created: 1367854155 6310 State: "Exited" 6311 Status: "Exit 0" 6312 Ports: [] 6313 Labels: {} 6314 SizeRw: 12288 6315 SizeRootFs: 0 6316 HostConfig: 6317 NetworkMode: "default" 6318 NetworkSettings: 6319 Networks: 6320 bridge: 6321 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6322 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 6323 Gateway: "172.17.0.1" 6324 IPAddress: "172.17.0.8" 6325 IPPrefixLen: 16 6326 IPv6Gateway: "" 6327 GlobalIPv6Address: "" 6328 GlobalIPv6PrefixLen: 0 6329 MacAddress: "02:42:ac:11:00:08" 6330 Mounts: [] 6331 - Id: "3176a2479c92" 6332 Names: 6333 - "/sleepy_dog" 6334 Image: "ubuntu:latest" 6335 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 6336 Command: "echo 3333333333333333" 6337 Created: 1367854154 6338 State: "Exited" 6339 Status: "Exit 0" 6340 Ports: [] 6341 Labels: {} 6342 SizeRw: 12288 6343 SizeRootFs: 0 6344 HostConfig: 6345 NetworkMode: "default" 6346 NetworkSettings: 6347 Networks: 6348 bridge: 6349 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6350 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 6351 Gateway: "172.17.0.1" 6352 IPAddress: "172.17.0.6" 6353 IPPrefixLen: 16 6354 IPv6Gateway: "" 6355 GlobalIPv6Address: "" 6356 GlobalIPv6PrefixLen: 0 6357 MacAddress: "02:42:ac:11:00:06" 6358 Mounts: [] 6359 - Id: "4cb07b47f9fb" 6360 Names: 6361 - "/running_cat" 6362 Image: "ubuntu:latest" 6363 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 6364 Command: "echo 444444444444444444444444444444444" 6365 Created: 1367854152 6366 State: "Exited" 6367 Status: "Exit 0" 6368 Ports: [] 6369 Labels: {} 6370 SizeRw: 12288 6371 SizeRootFs: 0 6372 HostConfig: 6373 NetworkMode: "default" 6374 NetworkSettings: 6375 Networks: 6376 bridge: 6377 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6378 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 6379 Gateway: "172.17.0.1" 6380 IPAddress: "172.17.0.5" 6381 IPPrefixLen: 16 6382 IPv6Gateway: "" 6383 GlobalIPv6Address: "" 6384 GlobalIPv6PrefixLen: 0 6385 MacAddress: "02:42:ac:11:00:05" 6386 Mounts: [] 6387 400: 6388 description: "bad parameter" 6389 schema: 6390 $ref: "#/definitions/ErrorResponse" 6391 500: 6392 description: "server error" 6393 schema: 6394 $ref: "#/definitions/ErrorResponse" 6395 tags: ["Container"] 6396 /containers/create: 6397 post: 6398 summary: "Create a container" 6399 operationId: "ContainerCreate" 6400 consumes: 6401 - "application/json" 6402 - "application/octet-stream" 6403 produces: 6404 - "application/json" 6405 parameters: 6406 - name: "name" 6407 in: "query" 6408 description: | 6409 Assign the specified name to the container. Must match 6410 `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. 6411 type: "string" 6412 pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" 6413 - name: "platform" 6414 in: "query" 6415 description: | 6416 Platform in the format `os[/arch[/variant]]` used for image lookup. 6417 6418 When specified, the daemon checks if the requested image is present 6419 in the local image cache with the given OS and Architecture, and 6420 otherwise returns a `404` status. 6421 6422 If the option is not set, the host's native OS and Architecture are 6423 used to look up the image in the image cache. However, if no platform 6424 is passed and the given image does exist in the local image cache, 6425 but its OS or architecture does not match, the container is created 6426 with the available image, and a warning is added to the `Warnings` 6427 field in the response, for example; 6428 6429 WARNING: The requested image's platform (linux/arm64/v8) does not 6430 match the detected host platform (linux/amd64) and no 6431 specific platform was requested 6432 6433 type: "string" 6434 default: "" 6435 - name: "body" 6436 in: "body" 6437 description: "Container to create" 6438 schema: 6439 allOf: 6440 - $ref: "#/definitions/ContainerConfig" 6441 - type: "object" 6442 properties: 6443 HostConfig: 6444 $ref: "#/definitions/HostConfig" 6445 NetworkingConfig: 6446 $ref: "#/definitions/NetworkingConfig" 6447 example: 6448 Hostname: "" 6449 Domainname: "" 6450 User: "" 6451 AttachStdin: false 6452 AttachStdout: true 6453 AttachStderr: true 6454 Tty: false 6455 OpenStdin: false 6456 StdinOnce: false 6457 Env: 6458 - "FOO=bar" 6459 - "BAZ=quux" 6460 Cmd: 6461 - "date" 6462 Entrypoint: "" 6463 Image: "ubuntu" 6464 Labels: 6465 com.example.vendor: "Acme" 6466 com.example.license: "GPL" 6467 com.example.version: "1.0" 6468 Volumes: 6469 /volumes/data: {} 6470 WorkingDir: "" 6471 NetworkDisabled: false 6472 MacAddress: "12:34:56:78:9a:bc" 6473 ExposedPorts: 6474 22/tcp: {} 6475 StopSignal: "SIGTERM" 6476 StopTimeout: 10 6477 HostConfig: 6478 Binds: 6479 - "/tmp:/tmp" 6480 Links: 6481 - "redis3:redis" 6482 Memory: 0 6483 MemorySwap: 0 6484 MemoryReservation: 0 6485 NanoCpus: 500000 6486 CpuPercent: 80 6487 CpuShares: 512 6488 CpuPeriod: 100000 6489 CpuRealtimePeriod: 1000000 6490 CpuRealtimeRuntime: 10000 6491 CpuQuota: 50000 6492 CpusetCpus: "0,1" 6493 CpusetMems: "0,1" 6494 MaximumIOps: 0 6495 MaximumIOBps: 0 6496 BlkioWeight: 300 6497 BlkioWeightDevice: 6498 - {} 6499 BlkioDeviceReadBps: 6500 - {} 6501 BlkioDeviceReadIOps: 6502 - {} 6503 BlkioDeviceWriteBps: 6504 - {} 6505 BlkioDeviceWriteIOps: 6506 - {} 6507 DeviceRequests: 6508 - Driver: "nvidia" 6509 Count: -1 6510 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6511 Capabilities: [["gpu", "nvidia", "compute"]] 6512 Options: 6513 property1: "string" 6514 property2: "string" 6515 MemorySwappiness: 60 6516 OomKillDisable: false 6517 OomScoreAdj: 500 6518 PidMode: "" 6519 PidsLimit: 0 6520 PortBindings: 6521 22/tcp: 6522 - HostPort: "11022" 6523 PublishAllPorts: false 6524 Privileged: false 6525 ReadonlyRootfs: false 6526 Dns: 6527 - "8.8.8.8" 6528 DnsOptions: 6529 - "" 6530 DnsSearch: 6531 - "" 6532 VolumesFrom: 6533 - "parent" 6534 - "other:ro" 6535 CapAdd: 6536 - "NET_ADMIN" 6537 CapDrop: 6538 - "MKNOD" 6539 GroupAdd: 6540 - "newgroup" 6541 RestartPolicy: 6542 Name: "" 6543 MaximumRetryCount: 0 6544 AutoRemove: true 6545 NetworkMode: "bridge" 6546 Devices: [] 6547 Ulimits: 6548 - {} 6549 LogConfig: 6550 Type: "json-file" 6551 Config: {} 6552 SecurityOpt: [] 6553 StorageOpt: {} 6554 CgroupParent: "" 6555 VolumeDriver: "" 6556 ShmSize: 67108864 6557 NetworkingConfig: 6558 EndpointsConfig: 6559 isolated_nw: 6560 IPAMConfig: 6561 IPv4Address: "172.20.30.33" 6562 IPv6Address: "2001:db8:abcd::3033" 6563 LinkLocalIPs: 6564 - "169.254.34.68" 6565 - "fe80::3468" 6566 Links: 6567 - "container_1" 6568 - "container_2" 6569 Aliases: 6570 - "server_x" 6571 - "server_y" 6572 database_nw: {} 6573 6574 required: true 6575 responses: 6576 201: 6577 description: "Container created successfully" 6578 schema: 6579 $ref: "#/definitions/ContainerCreateResponse" 6580 400: 6581 description: "bad parameter" 6582 schema: 6583 $ref: "#/definitions/ErrorResponse" 6584 404: 6585 description: "no such image" 6586 schema: 6587 $ref: "#/definitions/ErrorResponse" 6588 examples: 6589 application/json: 6590 message: "No such image: c2ada9df5af8" 6591 409: 6592 description: "conflict" 6593 schema: 6594 $ref: "#/definitions/ErrorResponse" 6595 500: 6596 description: "server error" 6597 schema: 6598 $ref: "#/definitions/ErrorResponse" 6599 tags: ["Container"] 6600 /containers/{id}/json: 6601 get: 6602 summary: "Inspect a container" 6603 description: "Return low-level information about a container." 6604 operationId: "ContainerInspect" 6605 produces: 6606 - "application/json" 6607 responses: 6608 200: 6609 description: "no error" 6610 schema: 6611 type: "object" 6612 title: "ContainerInspectResponse" 6613 properties: 6614 Id: 6615 description: "The ID of the container" 6616 type: "string" 6617 Created: 6618 description: "The time the container was created" 6619 type: "string" 6620 Path: 6621 description: "The path to the command being run" 6622 type: "string" 6623 Args: 6624 description: "The arguments to the command being run" 6625 type: "array" 6626 items: 6627 type: "string" 6628 State: 6629 $ref: "#/definitions/ContainerState" 6630 Image: 6631 description: "The container's image ID" 6632 type: "string" 6633 ResolvConfPath: 6634 type: "string" 6635 HostnamePath: 6636 type: "string" 6637 HostsPath: 6638 type: "string" 6639 LogPath: 6640 type: "string" 6641 Name: 6642 type: "string" 6643 RestartCount: 6644 type: "integer" 6645 Driver: 6646 type: "string" 6647 Platform: 6648 type: "string" 6649 MountLabel: 6650 type: "string" 6651 ProcessLabel: 6652 type: "string" 6653 AppArmorProfile: 6654 type: "string" 6655 ExecIDs: 6656 description: "IDs of exec instances that are running in the container." 6657 type: "array" 6658 items: 6659 type: "string" 6660 x-nullable: true 6661 HostConfig: 6662 $ref: "#/definitions/HostConfig" 6663 GraphDriver: 6664 $ref: "#/definitions/GraphDriverData" 6665 SizeRw: 6666 description: | 6667 The size of files that have been created or changed by this 6668 container. 6669 type: "integer" 6670 format: "int64" 6671 SizeRootFs: 6672 description: "The total size of all the files in this container." 6673 type: "integer" 6674 format: "int64" 6675 Mounts: 6676 type: "array" 6677 items: 6678 $ref: "#/definitions/MountPoint" 6679 Config: 6680 $ref: "#/definitions/ContainerConfig" 6681 NetworkSettings: 6682 $ref: "#/definitions/NetworkSettings" 6683 examples: 6684 application/json: 6685 AppArmorProfile: "" 6686 Args: 6687 - "-c" 6688 - "exit 9" 6689 Config: 6690 AttachStderr: true 6691 AttachStdin: false 6692 AttachStdout: true 6693 Cmd: 6694 - "/bin/sh" 6695 - "-c" 6696 - "exit 9" 6697 Domainname: "" 6698 Env: 6699 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 6700 Healthcheck: 6701 Test: ["CMD-SHELL", "exit 0"] 6702 Hostname: "ba033ac44011" 6703 Image: "ubuntu" 6704 Labels: 6705 com.example.vendor: "Acme" 6706 com.example.license: "GPL" 6707 com.example.version: "1.0" 6708 MacAddress: "" 6709 NetworkDisabled: false 6710 OpenStdin: false 6711 StdinOnce: false 6712 Tty: false 6713 User: "" 6714 Volumes: 6715 /volumes/data: {} 6716 WorkingDir: "" 6717 StopSignal: "SIGTERM" 6718 StopTimeout: 10 6719 Created: "2015-01-06T15:47:31.485331387Z" 6720 Driver: "overlay2" 6721 ExecIDs: 6722 - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" 6723 - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" 6724 HostConfig: 6725 MaximumIOps: 0 6726 MaximumIOBps: 0 6727 BlkioWeight: 0 6728 BlkioWeightDevice: 6729 - {} 6730 BlkioDeviceReadBps: 6731 - {} 6732 BlkioDeviceWriteBps: 6733 - {} 6734 BlkioDeviceReadIOps: 6735 - {} 6736 BlkioDeviceWriteIOps: 6737 - {} 6738 ContainerIDFile: "" 6739 CpusetCpus: "" 6740 CpusetMems: "" 6741 CpuPercent: 80 6742 CpuShares: 0 6743 CpuPeriod: 100000 6744 CpuRealtimePeriod: 1000000 6745 CpuRealtimeRuntime: 10000 6746 Devices: [] 6747 DeviceRequests: 6748 - Driver: "nvidia" 6749 Count: -1 6750 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6751 Capabilities: [["gpu", "nvidia", "compute"]] 6752 Options: 6753 property1: "string" 6754 property2: "string" 6755 IpcMode: "" 6756 Memory: 0 6757 MemorySwap: 0 6758 MemoryReservation: 0 6759 OomKillDisable: false 6760 OomScoreAdj: 500 6761 NetworkMode: "bridge" 6762 PidMode: "" 6763 PortBindings: {} 6764 Privileged: false 6765 ReadonlyRootfs: false 6766 PublishAllPorts: false 6767 RestartPolicy: 6768 MaximumRetryCount: 2 6769 Name: "on-failure" 6770 LogConfig: 6771 Type: "json-file" 6772 Sysctls: 6773 net.ipv4.ip_forward: "1" 6774 Ulimits: 6775 - {} 6776 VolumeDriver: "" 6777 ShmSize: 67108864 6778 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 6779 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 6780 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 6781 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 6782 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 6783 MountLabel: "" 6784 Name: "/boring_euclid" 6785 NetworkSettings: 6786 Bridge: "" 6787 SandboxID: "" 6788 HairpinMode: false 6789 LinkLocalIPv6Address: "" 6790 LinkLocalIPv6PrefixLen: 0 6791 SandboxKey: "" 6792 EndpointID: "" 6793 Gateway: "" 6794 GlobalIPv6Address: "" 6795 GlobalIPv6PrefixLen: 0 6796 IPAddress: "" 6797 IPPrefixLen: 0 6798 IPv6Gateway: "" 6799 MacAddress: "" 6800 Networks: 6801 bridge: 6802 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6803 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 6804 Gateway: "172.17.0.1" 6805 IPAddress: "172.17.0.2" 6806 IPPrefixLen: 16 6807 IPv6Gateway: "" 6808 GlobalIPv6Address: "" 6809 GlobalIPv6PrefixLen: 0 6810 MacAddress: "02:42:ac:12:00:02" 6811 Path: "/bin/sh" 6812 ProcessLabel: "" 6813 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 6814 RestartCount: 1 6815 State: 6816 Error: "" 6817 ExitCode: 9 6818 FinishedAt: "2015-01-06T15:47:32.080254511Z" 6819 Health: 6820 Status: "healthy" 6821 FailingStreak: 0 6822 Log: 6823 - Start: "2019-12-22T10:59:05.6385933Z" 6824 End: "2019-12-22T10:59:05.8078452Z" 6825 ExitCode: 0 6826 Output: "" 6827 OOMKilled: false 6828 Dead: false 6829 Paused: false 6830 Pid: 0 6831 Restarting: false 6832 Running: true 6833 StartedAt: "2015-01-06T15:47:32.072697474Z" 6834 Status: "running" 6835 Mounts: 6836 - Name: "fac362...80535" 6837 Source: "/data" 6838 Destination: "/data" 6839 Driver: "local" 6840 Mode: "ro,Z" 6841 RW: false 6842 Propagation: "" 6843 404: 6844 description: "no such container" 6845 schema: 6846 $ref: "#/definitions/ErrorResponse" 6847 examples: 6848 application/json: 6849 message: "No such container: c2ada9df5af8" 6850 500: 6851 description: "server error" 6852 schema: 6853 $ref: "#/definitions/ErrorResponse" 6854 parameters: 6855 - name: "id" 6856 in: "path" 6857 required: true 6858 description: "ID or name of the container" 6859 type: "string" 6860 - name: "size" 6861 in: "query" 6862 type: "boolean" 6863 default: false 6864 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 6865 tags: ["Container"] 6866 /containers/{id}/top: 6867 get: 6868 summary: "List processes running inside a container" 6869 description: | 6870 On Unix systems, this is done by running the `ps` command. This endpoint 6871 is not supported on Windows. 6872 operationId: "ContainerTop" 6873 responses: 6874 200: 6875 description: "no error" 6876 schema: 6877 type: "object" 6878 title: "ContainerTopResponse" 6879 description: "OK response to ContainerTop operation" 6880 properties: 6881 Titles: 6882 description: "The ps column titles" 6883 type: "array" 6884 items: 6885 type: "string" 6886 Processes: 6887 description: | 6888 Each process running in the container, where each is process 6889 is an array of values corresponding to the titles. 6890 type: "array" 6891 items: 6892 type: "array" 6893 items: 6894 type: "string" 6895 examples: 6896 application/json: 6897 Titles: 6898 - "UID" 6899 - "PID" 6900 - "PPID" 6901 - "C" 6902 - "STIME" 6903 - "TTY" 6904 - "TIME" 6905 - "CMD" 6906 Processes: 6907 - 6908 - "root" 6909 - "13642" 6910 - "882" 6911 - "0" 6912 - "17:03" 6913 - "pts/0" 6914 - "00:00:00" 6915 - "/bin/bash" 6916 - 6917 - "root" 6918 - "13735" 6919 - "13642" 6920 - "0" 6921 - "17:06" 6922 - "pts/0" 6923 - "00:00:00" 6924 - "sleep 10" 6925 404: 6926 description: "no such container" 6927 schema: 6928 $ref: "#/definitions/ErrorResponse" 6929 examples: 6930 application/json: 6931 message: "No such container: c2ada9df5af8" 6932 500: 6933 description: "server error" 6934 schema: 6935 $ref: "#/definitions/ErrorResponse" 6936 parameters: 6937 - name: "id" 6938 in: "path" 6939 required: true 6940 description: "ID or name of the container" 6941 type: "string" 6942 - name: "ps_args" 6943 in: "query" 6944 description: "The arguments to pass to `ps`. For example, `aux`" 6945 type: "string" 6946 default: "-ef" 6947 tags: ["Container"] 6948 /containers/{id}/logs: 6949 get: 6950 summary: "Get container logs" 6951 description: | 6952 Get `stdout` and `stderr` logs from a container. 6953 6954 Note: This endpoint works only for containers with the `json-file` or 6955 `journald` logging driver. 6956 produces: 6957 - "application/vnd.docker.raw-stream" 6958 - "application/vnd.docker.multiplexed-stream" 6959 operationId: "ContainerLogs" 6960 responses: 6961 200: 6962 description: | 6963 logs returned as a stream in response body. 6964 For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 6965 Note that unlike the attach endpoint, the logs endpoint does not 6966 upgrade the connection and does not set Content-Type. 6967 schema: 6968 type: "string" 6969 format: "binary" 6970 404: 6971 description: "no such container" 6972 schema: 6973 $ref: "#/definitions/ErrorResponse" 6974 examples: 6975 application/json: 6976 message: "No such container: c2ada9df5af8" 6977 500: 6978 description: "server error" 6979 schema: 6980 $ref: "#/definitions/ErrorResponse" 6981 parameters: 6982 - name: "id" 6983 in: "path" 6984 required: true 6985 description: "ID or name of the container" 6986 type: "string" 6987 - name: "follow" 6988 in: "query" 6989 description: "Keep connection after returning logs." 6990 type: "boolean" 6991 default: false 6992 - name: "stdout" 6993 in: "query" 6994 description: "Return logs from `stdout`" 6995 type: "boolean" 6996 default: false 6997 - name: "stderr" 6998 in: "query" 6999 description: "Return logs from `stderr`" 7000 type: "boolean" 7001 default: false 7002 - name: "since" 7003 in: "query" 7004 description: "Only return logs since this time, as a UNIX timestamp" 7005 type: "integer" 7006 default: 0 7007 - name: "until" 7008 in: "query" 7009 description: "Only return logs before this time, as a UNIX timestamp" 7010 type: "integer" 7011 default: 0 7012 - name: "timestamps" 7013 in: "query" 7014 description: "Add timestamps to every log line" 7015 type: "boolean" 7016 default: false 7017 - name: "tail" 7018 in: "query" 7019 description: | 7020 Only return this number of log lines from the end of the logs. 7021 Specify as an integer or `all` to output all log lines. 7022 type: "string" 7023 default: "all" 7024 tags: ["Container"] 7025 /containers/{id}/changes: 7026 get: 7027 summary: "Get changes on a container’s filesystem" 7028 description: | 7029 Returns which files in a container's filesystem have been added, deleted, 7030 or modified. The `Kind` of modification can be one of: 7031 7032 - `0`: Modified ("C") 7033 - `1`: Added ("A") 7034 - `2`: Deleted ("D") 7035 operationId: "ContainerChanges" 7036 produces: ["application/json"] 7037 responses: 7038 200: 7039 description: "The list of changes" 7040 schema: 7041 type: "array" 7042 items: 7043 $ref: "#/definitions/FilesystemChange" 7044 examples: 7045 application/json: 7046 - Path: "/dev" 7047 Kind: 0 7048 - Path: "/dev/kmsg" 7049 Kind: 1 7050 - Path: "/test" 7051 Kind: 1 7052 404: 7053 description: "no such container" 7054 schema: 7055 $ref: "#/definitions/ErrorResponse" 7056 examples: 7057 application/json: 7058 message: "No such container: c2ada9df5af8" 7059 500: 7060 description: "server error" 7061 schema: 7062 $ref: "#/definitions/ErrorResponse" 7063 parameters: 7064 - name: "id" 7065 in: "path" 7066 required: true 7067 description: "ID or name of the container" 7068 type: "string" 7069 tags: ["Container"] 7070 /containers/{id}/export: 7071 get: 7072 summary: "Export a container" 7073 description: "Export the contents of a container as a tarball." 7074 operationId: "ContainerExport" 7075 produces: 7076 - "application/octet-stream" 7077 responses: 7078 200: 7079 description: "no error" 7080 404: 7081 description: "no such container" 7082 schema: 7083 $ref: "#/definitions/ErrorResponse" 7084 examples: 7085 application/json: 7086 message: "No such container: c2ada9df5af8" 7087 500: 7088 description: "server error" 7089 schema: 7090 $ref: "#/definitions/ErrorResponse" 7091 parameters: 7092 - name: "id" 7093 in: "path" 7094 required: true 7095 description: "ID or name of the container" 7096 type: "string" 7097 tags: ["Container"] 7098 /containers/{id}/stats: 7099 get: 7100 summary: "Get container stats based on resource usage" 7101 description: | 7102 This endpoint returns a live stream of a container’s resource usage 7103 statistics. 7104 7105 The `precpu_stats` is the CPU statistic of the *previous* read, and is 7106 used to calculate the CPU usage percentage. It is not an exact copy 7107 of the `cpu_stats` field. 7108 7109 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 7110 nil then for compatibility with older daemons the length of the 7111 corresponding `cpu_usage.percpu_usage` array should be used. 7112 7113 On a cgroup v2 host, the following fields are not set 7114 * `blkio_stats`: all fields other than `io_service_bytes_recursive` 7115 * `cpu_stats`: `cpu_usage.percpu_usage` 7116 * `memory_stats`: `max_usage` and `failcnt` 7117 Also, `memory_stats.stats` fields are incompatible with cgroup v1. 7118 7119 To calculate the values shown by the `stats` command of the docker cli tool 7120 the following formulas can be used: 7121 * used_memory = `memory_stats.usage - memory_stats.stats.cache` 7122 * available_memory = `memory_stats.limit` 7123 * Memory usage % = `(used_memory / available_memory) * 100.0` 7124 * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` 7125 * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` 7126 * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` 7127 * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` 7128 operationId: "ContainerStats" 7129 produces: ["application/json"] 7130 responses: 7131 200: 7132 description: "no error" 7133 schema: 7134 type: "object" 7135 examples: 7136 application/json: 7137 read: "2015-01-08T22:57:31.547920715Z" 7138 pids_stats: 7139 current: 3 7140 networks: 7141 eth0: 7142 rx_bytes: 5338 7143 rx_dropped: 0 7144 rx_errors: 0 7145 rx_packets: 36 7146 tx_bytes: 648 7147 tx_dropped: 0 7148 tx_errors: 0 7149 tx_packets: 8 7150 eth5: 7151 rx_bytes: 4641 7152 rx_dropped: 0 7153 rx_errors: 0 7154 rx_packets: 26 7155 tx_bytes: 690 7156 tx_dropped: 0 7157 tx_errors: 0 7158 tx_packets: 9 7159 memory_stats: 7160 stats: 7161 total_pgmajfault: 0 7162 cache: 0 7163 mapped_file: 0 7164 total_inactive_file: 0 7165 pgpgout: 414 7166 rss: 6537216 7167 total_mapped_file: 0 7168 writeback: 0 7169 unevictable: 0 7170 pgpgin: 477 7171 total_unevictable: 0 7172 pgmajfault: 0 7173 total_rss: 6537216 7174 total_rss_huge: 6291456 7175 total_writeback: 0 7176 total_inactive_anon: 0 7177 rss_huge: 6291456 7178 hierarchical_memory_limit: 67108864 7179 total_pgfault: 964 7180 total_active_file: 0 7181 active_anon: 6537216 7182 total_active_anon: 6537216 7183 total_pgpgout: 414 7184 total_cache: 0 7185 inactive_anon: 0 7186 active_file: 0 7187 pgfault: 964 7188 inactive_file: 0 7189 total_pgpgin: 477 7190 max_usage: 6651904 7191 usage: 6537216 7192 failcnt: 0 7193 limit: 67108864 7194 blkio_stats: {} 7195 cpu_stats: 7196 cpu_usage: 7197 percpu_usage: 7198 - 8646879 7199 - 24472255 7200 - 36438778 7201 - 30657443 7202 usage_in_usermode: 50000000 7203 total_usage: 100215355 7204 usage_in_kernelmode: 30000000 7205 system_cpu_usage: 739306590000000 7206 online_cpus: 4 7207 throttling_data: 7208 periods: 0 7209 throttled_periods: 0 7210 throttled_time: 0 7211 precpu_stats: 7212 cpu_usage: 7213 percpu_usage: 7214 - 8646879 7215 - 24350896 7216 - 36438778 7217 - 30657443 7218 usage_in_usermode: 50000000 7219 total_usage: 100093996 7220 usage_in_kernelmode: 30000000 7221 system_cpu_usage: 9492140000000 7222 online_cpus: 4 7223 throttling_data: 7224 periods: 0 7225 throttled_periods: 0 7226 throttled_time: 0 7227 404: 7228 description: "no such container" 7229 schema: 7230 $ref: "#/definitions/ErrorResponse" 7231 examples: 7232 application/json: 7233 message: "No such container: c2ada9df5af8" 7234 500: 7235 description: "server error" 7236 schema: 7237 $ref: "#/definitions/ErrorResponse" 7238 parameters: 7239 - name: "id" 7240 in: "path" 7241 required: true 7242 description: "ID or name of the container" 7243 type: "string" 7244 - name: "stream" 7245 in: "query" 7246 description: | 7247 Stream the output. If false, the stats will be output once and then 7248 it will disconnect. 7249 type: "boolean" 7250 default: true 7251 - name: "one-shot" 7252 in: "query" 7253 description: | 7254 Only get a single stat instead of waiting for 2 cycles. Must be used 7255 with `stream=false`. 7256 type: "boolean" 7257 default: false 7258 tags: ["Container"] 7259 /containers/{id}/resize: 7260 post: 7261 summary: "Resize a container TTY" 7262 description: "Resize the TTY for a container." 7263 operationId: "ContainerResize" 7264 consumes: 7265 - "application/octet-stream" 7266 produces: 7267 - "text/plain" 7268 responses: 7269 200: 7270 description: "no error" 7271 404: 7272 description: "no such container" 7273 schema: 7274 $ref: "#/definitions/ErrorResponse" 7275 examples: 7276 application/json: 7277 message: "No such container: c2ada9df5af8" 7278 500: 7279 description: "cannot resize container" 7280 schema: 7281 $ref: "#/definitions/ErrorResponse" 7282 parameters: 7283 - name: "id" 7284 in: "path" 7285 required: true 7286 description: "ID or name of the container" 7287 type: "string" 7288 - name: "h" 7289 in: "query" 7290 description: "Height of the TTY session in characters" 7291 type: "integer" 7292 - name: "w" 7293 in: "query" 7294 description: "Width of the TTY session in characters" 7295 type: "integer" 7296 tags: ["Container"] 7297 /containers/{id}/start: 7298 post: 7299 summary: "Start a container" 7300 operationId: "ContainerStart" 7301 responses: 7302 204: 7303 description: "no error" 7304 304: 7305 description: "container already started" 7306 404: 7307 description: "no such container" 7308 schema: 7309 $ref: "#/definitions/ErrorResponse" 7310 examples: 7311 application/json: 7312 message: "No such container: c2ada9df5af8" 7313 500: 7314 description: "server error" 7315 schema: 7316 $ref: "#/definitions/ErrorResponse" 7317 parameters: 7318 - name: "id" 7319 in: "path" 7320 required: true 7321 description: "ID or name of the container" 7322 type: "string" 7323 - name: "detachKeys" 7324 in: "query" 7325 description: | 7326 Override the key sequence for detaching a container. Format is a 7327 single character `[a-Z]` or `ctrl-<value>` where `<value>` is one 7328 of: `a-z`, `@`, `^`, `[`, `,` or `_`. 7329 type: "string" 7330 tags: ["Container"] 7331 /containers/{id}/stop: 7332 post: 7333 summary: "Stop a container" 7334 operationId: "ContainerStop" 7335 responses: 7336 204: 7337 description: "no error" 7338 304: 7339 description: "container already stopped" 7340 404: 7341 description: "no such container" 7342 schema: 7343 $ref: "#/definitions/ErrorResponse" 7344 examples: 7345 application/json: 7346 message: "No such container: c2ada9df5af8" 7347 500: 7348 description: "server error" 7349 schema: 7350 $ref: "#/definitions/ErrorResponse" 7351 parameters: 7352 - name: "id" 7353 in: "path" 7354 required: true 7355 description: "ID or name of the container" 7356 type: "string" 7357 - name: "signal" 7358 in: "query" 7359 description: | 7360 Signal to send to the container as an integer or string (e.g. `SIGINT`). 7361 type: "string" 7362 - name: "t" 7363 in: "query" 7364 description: "Number of seconds to wait before killing the container" 7365 type: "integer" 7366 tags: ["Container"] 7367 /containers/{id}/restart: 7368 post: 7369 summary: "Restart a container" 7370 operationId: "ContainerRestart" 7371 responses: 7372 204: 7373 description: "no error" 7374 404: 7375 description: "no such container" 7376 schema: 7377 $ref: "#/definitions/ErrorResponse" 7378 examples: 7379 application/json: 7380 message: "No such container: c2ada9df5af8" 7381 500: 7382 description: "server error" 7383 schema: 7384 $ref: "#/definitions/ErrorResponse" 7385 parameters: 7386 - name: "id" 7387 in: "path" 7388 required: true 7389 description: "ID or name of the container" 7390 type: "string" 7391 - name: "signal" 7392 in: "query" 7393 description: | 7394 Signal to send to the container as an integer or string (e.g. `SIGINT`). 7395 type: "string" 7396 - name: "t" 7397 in: "query" 7398 description: "Number of seconds to wait before killing the container" 7399 type: "integer" 7400 tags: ["Container"] 7401 /containers/{id}/kill: 7402 post: 7403 summary: "Kill a container" 7404 description: | 7405 Send a POSIX signal to a container, defaulting to killing to the 7406 container. 7407 operationId: "ContainerKill" 7408 responses: 7409 204: 7410 description: "no error" 7411 404: 7412 description: "no such container" 7413 schema: 7414 $ref: "#/definitions/ErrorResponse" 7415 examples: 7416 application/json: 7417 message: "No such container: c2ada9df5af8" 7418 409: 7419 description: "container is not running" 7420 schema: 7421 $ref: "#/definitions/ErrorResponse" 7422 examples: 7423 application/json: 7424 message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 7425 500: 7426 description: "server error" 7427 schema: 7428 $ref: "#/definitions/ErrorResponse" 7429 parameters: 7430 - name: "id" 7431 in: "path" 7432 required: true 7433 description: "ID or name of the container" 7434 type: "string" 7435 - name: "signal" 7436 in: "query" 7437 description: | 7438 Signal to send to the container as an integer or string (e.g. `SIGINT`). 7439 type: "string" 7440 default: "SIGKILL" 7441 tags: ["Container"] 7442 /containers/{id}/update: 7443 post: 7444 summary: "Update a container" 7445 description: | 7446 Change various configuration options of a container without having to 7447 recreate it. 7448 operationId: "ContainerUpdate" 7449 consumes: ["application/json"] 7450 produces: ["application/json"] 7451 responses: 7452 200: 7453 description: "The container has been updated." 7454 schema: 7455 type: "object" 7456 title: "ContainerUpdateResponse" 7457 description: "OK response to ContainerUpdate operation" 7458 properties: 7459 Warnings: 7460 type: "array" 7461 items: 7462 type: "string" 7463 404: 7464 description: "no such container" 7465 schema: 7466 $ref: "#/definitions/ErrorResponse" 7467 examples: 7468 application/json: 7469 message: "No such container: c2ada9df5af8" 7470 500: 7471 description: "server error" 7472 schema: 7473 $ref: "#/definitions/ErrorResponse" 7474 parameters: 7475 - name: "id" 7476 in: "path" 7477 required: true 7478 description: "ID or name of the container" 7479 type: "string" 7480 - name: "update" 7481 in: "body" 7482 required: true 7483 schema: 7484 allOf: 7485 - $ref: "#/definitions/Resources" 7486 - type: "object" 7487 properties: 7488 RestartPolicy: 7489 $ref: "#/definitions/RestartPolicy" 7490 example: 7491 BlkioWeight: 300 7492 CpuShares: 512 7493 CpuPeriod: 100000 7494 CpuQuota: 50000 7495 CpuRealtimePeriod: 1000000 7496 CpuRealtimeRuntime: 10000 7497 CpusetCpus: "0,1" 7498 CpusetMems: "0" 7499 Memory: 314572800 7500 MemorySwap: 514288000 7501 MemoryReservation: 209715200 7502 RestartPolicy: 7503 MaximumRetryCount: 4 7504 Name: "on-failure" 7505 tags: ["Container"] 7506 /containers/{id}/rename: 7507 post: 7508 summary: "Rename a container" 7509 operationId: "ContainerRename" 7510 responses: 7511 204: 7512 description: "no error" 7513 404: 7514 description: "no such container" 7515 schema: 7516 $ref: "#/definitions/ErrorResponse" 7517 examples: 7518 application/json: 7519 message: "No such container: c2ada9df5af8" 7520 409: 7521 description: "name already in use" 7522 schema: 7523 $ref: "#/definitions/ErrorResponse" 7524 500: 7525 description: "server error" 7526 schema: 7527 $ref: "#/definitions/ErrorResponse" 7528 parameters: 7529 - name: "id" 7530 in: "path" 7531 required: true 7532 description: "ID or name of the container" 7533 type: "string" 7534 - name: "name" 7535 in: "query" 7536 required: true 7537 description: "New name for the container" 7538 type: "string" 7539 tags: ["Container"] 7540 /containers/{id}/pause: 7541 post: 7542 summary: "Pause a container" 7543 description: | 7544 Use the freezer cgroup to suspend all processes in a container. 7545 7546 Traditionally, when suspending a process the `SIGSTOP` signal is used, 7547 which is observable by the process being suspended. With the freezer 7548 cgroup the process is unaware, and unable to capture, that it is being 7549 suspended, and subsequently resumed. 7550 operationId: "ContainerPause" 7551 responses: 7552 204: 7553 description: "no error" 7554 404: 7555 description: "no such container" 7556 schema: 7557 $ref: "#/definitions/ErrorResponse" 7558 examples: 7559 application/json: 7560 message: "No such container: c2ada9df5af8" 7561 500: 7562 description: "server error" 7563 schema: 7564 $ref: "#/definitions/ErrorResponse" 7565 parameters: 7566 - name: "id" 7567 in: "path" 7568 required: true 7569 description: "ID or name of the container" 7570 type: "string" 7571 tags: ["Container"] 7572 /containers/{id}/unpause: 7573 post: 7574 summary: "Unpause a container" 7575 description: "Resume a container which has been paused." 7576 operationId: "ContainerUnpause" 7577 responses: 7578 204: 7579 description: "no error" 7580 404: 7581 description: "no such container" 7582 schema: 7583 $ref: "#/definitions/ErrorResponse" 7584 examples: 7585 application/json: 7586 message: "No such container: c2ada9df5af8" 7587 500: 7588 description: "server error" 7589 schema: 7590 $ref: "#/definitions/ErrorResponse" 7591 parameters: 7592 - name: "id" 7593 in: "path" 7594 required: true 7595 description: "ID or name of the container" 7596 type: "string" 7597 tags: ["Container"] 7598 /containers/{id}/attach: 7599 post: 7600 summary: "Attach to a container" 7601 description: | 7602 Attach to a container to read its output or send it input. You can attach 7603 to the same container multiple times and you can reattach to containers 7604 that have been detached. 7605 7606 Either the `stream` or `logs` parameter must be `true` for this endpoint 7607 to do anything. 7608 7609 See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) 7610 for more details. 7611 7612 ### Hijacking 7613 7614 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, 7615 and `stderr` on the same socket. 7616 7617 This is the response from the daemon for an attach request: 7618 7619 ``` 7620 HTTP/1.1 200 OK 7621 Content-Type: application/vnd.docker.raw-stream 7622 7623 [STREAM] 7624 ``` 7625 7626 After the headers and two new lines, the TCP connection can now be used 7627 for raw, bidirectional communication between the client and server. 7628 7629 To hint potential proxies about connection hijacking, the Docker client 7630 can also optionally send connection upgrade headers. 7631 7632 For example, the client sends this request to upgrade the connection: 7633 7634 ``` 7635 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 7636 Upgrade: tcp 7637 Connection: Upgrade 7638 ``` 7639 7640 The Docker daemon will respond with a `101 UPGRADED` response, and will 7641 similarly follow with the raw stream: 7642 7643 ``` 7644 HTTP/1.1 101 UPGRADED 7645 Content-Type: application/vnd.docker.raw-stream 7646 Connection: Upgrade 7647 Upgrade: tcp 7648 7649 [STREAM] 7650 ``` 7651 7652 ### Stream format 7653 7654 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), 7655 the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream 7656 and the stream over the hijacked connected is multiplexed to separate out 7657 `stdout` and `stderr`. The stream consists of a series of frames, each 7658 containing a header and a payload. 7659 7660 The header contains the information which the stream writes (`stdout` or 7661 `stderr`). It also contains the size of the associated frame encoded in 7662 the last four bytes (`uint32`). 7663 7664 It is encoded on the first eight bytes like this: 7665 7666 ```go 7667 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 7668 ``` 7669 7670 `STREAM_TYPE` can be: 7671 7672 - 0: `stdin` (is written on `stdout`) 7673 - 1: `stdout` 7674 - 2: `stderr` 7675 7676 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size 7677 encoded as big endian. 7678 7679 Following the header is the payload, which is the specified number of 7680 bytes of `STREAM_TYPE`. 7681 7682 The simplest way to implement this protocol is the following: 7683 7684 1. Read 8 bytes. 7685 2. Choose `stdout` or `stderr` depending on the first byte. 7686 3. Extract the frame size from the last four bytes. 7687 4. Read the extracted size and output it on the correct output. 7688 5. Goto 1. 7689 7690 ### Stream format when using a TTY 7691 7692 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), 7693 the stream is not multiplexed. The data exchanged over the hijacked 7694 connection is simply the raw data from the process PTY and client's 7695 `stdin`. 7696 7697 operationId: "ContainerAttach" 7698 produces: 7699 - "application/vnd.docker.raw-stream" 7700 - "application/vnd.docker.multiplexed-stream" 7701 responses: 7702 101: 7703 description: "no error, hints proxy about hijacking" 7704 200: 7705 description: "no error, no upgrade header found" 7706 400: 7707 description: "bad parameter" 7708 schema: 7709 $ref: "#/definitions/ErrorResponse" 7710 404: 7711 description: "no such container" 7712 schema: 7713 $ref: "#/definitions/ErrorResponse" 7714 examples: 7715 application/json: 7716 message: "No such container: c2ada9df5af8" 7717 500: 7718 description: "server error" 7719 schema: 7720 $ref: "#/definitions/ErrorResponse" 7721 parameters: 7722 - name: "id" 7723 in: "path" 7724 required: true 7725 description: "ID or name of the container" 7726 type: "string" 7727 - name: "detachKeys" 7728 in: "query" 7729 description: | 7730 Override the key sequence for detaching a container.Format is a single 7731 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7732 `@`, `^`, `[`, `,` or `_`. 7733 type: "string" 7734 - name: "logs" 7735 in: "query" 7736 description: | 7737 Replay previous logs from the container. 7738 7739 This is useful for attaching to a container that has started and you 7740 want to output everything since the container started. 7741 7742 If `stream` is also enabled, once all the previous output has been 7743 returned, it will seamlessly transition into streaming current 7744 output. 7745 type: "boolean" 7746 default: false 7747 - name: "stream" 7748 in: "query" 7749 description: | 7750 Stream attached streams from the time the request was made onwards. 7751 type: "boolean" 7752 default: false 7753 - name: "stdin" 7754 in: "query" 7755 description: "Attach to `stdin`" 7756 type: "boolean" 7757 default: false 7758 - name: "stdout" 7759 in: "query" 7760 description: "Attach to `stdout`" 7761 type: "boolean" 7762 default: false 7763 - name: "stderr" 7764 in: "query" 7765 description: "Attach to `stderr`" 7766 type: "boolean" 7767 default: false 7768 tags: ["Container"] 7769 /containers/{id}/attach/ws: 7770 get: 7771 summary: "Attach to a container via a websocket" 7772 operationId: "ContainerAttachWebsocket" 7773 responses: 7774 101: 7775 description: "no error, hints proxy about hijacking" 7776 200: 7777 description: "no error, no upgrade header found" 7778 400: 7779 description: "bad parameter" 7780 schema: 7781 $ref: "#/definitions/ErrorResponse" 7782 404: 7783 description: "no such container" 7784 schema: 7785 $ref: "#/definitions/ErrorResponse" 7786 examples: 7787 application/json: 7788 message: "No such container: c2ada9df5af8" 7789 500: 7790 description: "server error" 7791 schema: 7792 $ref: "#/definitions/ErrorResponse" 7793 parameters: 7794 - name: "id" 7795 in: "path" 7796 required: true 7797 description: "ID or name of the container" 7798 type: "string" 7799 - name: "detachKeys" 7800 in: "query" 7801 description: | 7802 Override the key sequence for detaching a container.Format is a single 7803 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7804 `@`, `^`, `[`, `,`, or `_`. 7805 type: "string" 7806 - name: "logs" 7807 in: "query" 7808 description: "Return logs" 7809 type: "boolean" 7810 default: false 7811 - name: "stream" 7812 in: "query" 7813 description: "Return stream" 7814 type: "boolean" 7815 default: false 7816 - name: "stdin" 7817 in: "query" 7818 description: "Attach to `stdin`" 7819 type: "boolean" 7820 default: false 7821 - name: "stdout" 7822 in: "query" 7823 description: "Attach to `stdout`" 7824 type: "boolean" 7825 default: false 7826 - name: "stderr" 7827 in: "query" 7828 description: "Attach to `stderr`" 7829 type: "boolean" 7830 default: false 7831 tags: ["Container"] 7832 /containers/{id}/wait: 7833 post: 7834 summary: "Wait for a container" 7835 description: "Block until a container stops, then returns the exit code." 7836 operationId: "ContainerWait" 7837 produces: ["application/json"] 7838 responses: 7839 200: 7840 description: "The container has exit." 7841 schema: 7842 $ref: "#/definitions/ContainerWaitResponse" 7843 400: 7844 description: "bad parameter" 7845 schema: 7846 $ref: "#/definitions/ErrorResponse" 7847 404: 7848 description: "no such container" 7849 schema: 7850 $ref: "#/definitions/ErrorResponse" 7851 examples: 7852 application/json: 7853 message: "No such container: c2ada9df5af8" 7854 500: 7855 description: "server error" 7856 schema: 7857 $ref: "#/definitions/ErrorResponse" 7858 parameters: 7859 - name: "id" 7860 in: "path" 7861 required: true 7862 description: "ID or name of the container" 7863 type: "string" 7864 - name: "condition" 7865 in: "query" 7866 description: | 7867 Wait until a container state reaches the given condition. 7868 7869 Defaults to `not-running` if omitted or empty. 7870 type: "string" 7871 enum: 7872 - "not-running" 7873 - "next-exit" 7874 - "removed" 7875 default: "not-running" 7876 tags: ["Container"] 7877 /containers/{id}: 7878 delete: 7879 summary: "Remove a container" 7880 operationId: "ContainerDelete" 7881 responses: 7882 204: 7883 description: "no error" 7884 400: 7885 description: "bad parameter" 7886 schema: 7887 $ref: "#/definitions/ErrorResponse" 7888 404: 7889 description: "no such container" 7890 schema: 7891 $ref: "#/definitions/ErrorResponse" 7892 examples: 7893 application/json: 7894 message: "No such container: c2ada9df5af8" 7895 409: 7896 description: "conflict" 7897 schema: 7898 $ref: "#/definitions/ErrorResponse" 7899 examples: 7900 application/json: 7901 message: | 7902 You cannot remove a running container: c2ada9df5af8. Stop the 7903 container before attempting removal or force remove 7904 500: 7905 description: "server error" 7906 schema: 7907 $ref: "#/definitions/ErrorResponse" 7908 parameters: 7909 - name: "id" 7910 in: "path" 7911 required: true 7912 description: "ID or name of the container" 7913 type: "string" 7914 - name: "v" 7915 in: "query" 7916 description: "Remove anonymous volumes associated with the container." 7917 type: "boolean" 7918 default: false 7919 - name: "force" 7920 in: "query" 7921 description: "If the container is running, kill it before removing it." 7922 type: "boolean" 7923 default: false 7924 - name: "link" 7925 in: "query" 7926 description: "Remove the specified link associated with the container." 7927 type: "boolean" 7928 default: false 7929 tags: ["Container"] 7930 /containers/{id}/archive: 7931 head: 7932 summary: "Get information about files in a container" 7933 description: | 7934 A response header `X-Docker-Container-Path-Stat` is returned, containing 7935 a base64 - encoded JSON object with some filesystem header information 7936 about the path. 7937 operationId: "ContainerArchiveInfo" 7938 responses: 7939 200: 7940 description: "no error" 7941 headers: 7942 X-Docker-Container-Path-Stat: 7943 type: "string" 7944 description: | 7945 A base64 - encoded JSON object with some filesystem header 7946 information about the path 7947 400: 7948 description: "Bad parameter" 7949 schema: 7950 $ref: "#/definitions/ErrorResponse" 7951 404: 7952 description: "Container or path does not exist" 7953 schema: 7954 $ref: "#/definitions/ErrorResponse" 7955 examples: 7956 application/json: 7957 message: "No such container: c2ada9df5af8" 7958 500: 7959 description: "Server error" 7960 schema: 7961 $ref: "#/definitions/ErrorResponse" 7962 parameters: 7963 - name: "id" 7964 in: "path" 7965 required: true 7966 description: "ID or name of the container" 7967 type: "string" 7968 - name: "path" 7969 in: "query" 7970 required: true 7971 description: "Resource in the container’s filesystem to archive." 7972 type: "string" 7973 tags: ["Container"] 7974 get: 7975 summary: "Get an archive of a filesystem resource in a container" 7976 description: "Get a tar archive of a resource in the filesystem of container id." 7977 operationId: "ContainerArchive" 7978 produces: ["application/x-tar"] 7979 responses: 7980 200: 7981 description: "no error" 7982 400: 7983 description: "Bad parameter" 7984 schema: 7985 $ref: "#/definitions/ErrorResponse" 7986 404: 7987 description: "Container or path does not exist" 7988 schema: 7989 $ref: "#/definitions/ErrorResponse" 7990 examples: 7991 application/json: 7992 message: "No such container: c2ada9df5af8" 7993 500: 7994 description: "server error" 7995 schema: 7996 $ref: "#/definitions/ErrorResponse" 7997 parameters: 7998 - name: "id" 7999 in: "path" 8000 required: true 8001 description: "ID or name of the container" 8002 type: "string" 8003 - name: "path" 8004 in: "query" 8005 required: true 8006 description: "Resource in the container’s filesystem to archive." 8007 type: "string" 8008 tags: ["Container"] 8009 put: 8010 summary: "Extract an archive of files or folders to a directory in a container" 8011 description: | 8012 Upload a tar archive to be extracted to a path in the filesystem of container id. 8013 `path` parameter is asserted to be a directory. If it exists as a file, 400 error 8014 will be returned with message "not a directory". 8015 operationId: "PutContainerArchive" 8016 consumes: ["application/x-tar", "application/octet-stream"] 8017 responses: 8018 200: 8019 description: "The content was extracted successfully" 8020 400: 8021 description: "Bad parameter" 8022 schema: 8023 $ref: "#/definitions/ErrorResponse" 8024 examples: 8025 application/json: 8026 message: "not a directory" 8027 403: 8028 description: "Permission denied, the volume or container rootfs is marked as read-only." 8029 schema: 8030 $ref: "#/definitions/ErrorResponse" 8031 404: 8032 description: "No such container or path does not exist inside the container" 8033 schema: 8034 $ref: "#/definitions/ErrorResponse" 8035 examples: 8036 application/json: 8037 message: "No such container: c2ada9df5af8" 8038 500: 8039 description: "Server error" 8040 schema: 8041 $ref: "#/definitions/ErrorResponse" 8042 parameters: 8043 - name: "id" 8044 in: "path" 8045 required: true 8046 description: "ID or name of the container" 8047 type: "string" 8048 - name: "path" 8049 in: "query" 8050 required: true 8051 description: "Path to a directory in the container to extract the archive’s contents into. " 8052 type: "string" 8053 - name: "noOverwriteDirNonDir" 8054 in: "query" 8055 description: | 8056 If `1`, `true`, or `True` then it will be an error if unpacking the 8057 given content would cause an existing directory to be replaced with 8058 a non-directory and vice versa. 8059 type: "string" 8060 - name: "copyUIDGID" 8061 in: "query" 8062 description: | 8063 If `1`, `true`, then it will copy UID/GID maps to the dest file or 8064 dir 8065 type: "string" 8066 - name: "inputStream" 8067 in: "body" 8068 required: true 8069 description: | 8070 The input stream must be a tar archive compressed with one of the 8071 following algorithms: `identity` (no compression), `gzip`, `bzip2`, 8072 or `xz`. 8073 schema: 8074 type: "string" 8075 format: "binary" 8076 tags: ["Container"] 8077 /containers/prune: 8078 post: 8079 summary: "Delete stopped containers" 8080 produces: 8081 - "application/json" 8082 operationId: "ContainerPrune" 8083 parameters: 8084 - name: "filters" 8085 in: "query" 8086 description: | 8087 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 8088 8089 Available filters: 8090 - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 8091 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels. 8092 type: "string" 8093 responses: 8094 200: 8095 description: "No error" 8096 schema: 8097 type: "object" 8098 title: "ContainerPruneResponse" 8099 properties: 8100 ContainersDeleted: 8101 description: "Container IDs that were deleted" 8102 type: "array" 8103 items: 8104 type: "string" 8105 SpaceReclaimed: 8106 description: "Disk space reclaimed in bytes" 8107 type: "integer" 8108 format: "int64" 8109 500: 8110 description: "Server error" 8111 schema: 8112 $ref: "#/definitions/ErrorResponse" 8113 tags: ["Container"] 8114 /images/json: 8115 get: 8116 summary: "List Images" 8117 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." 8118 operationId: "ImageList" 8119 produces: 8120 - "application/json" 8121 responses: 8122 200: 8123 description: "Summary image data for the images matching the query" 8124 schema: 8125 type: "array" 8126 items: 8127 $ref: "#/definitions/ImageSummary" 8128 500: 8129 description: "server error" 8130 schema: 8131 $ref: "#/definitions/ErrorResponse" 8132 parameters: 8133 - name: "all" 8134 in: "query" 8135 description: "Show all images. Only images from a final layer (no children) are shown by default." 8136 type: "boolean" 8137 default: false 8138 - name: "filters" 8139 in: "query" 8140 description: | 8141 A JSON encoded value of the filters (a `map[string][]string`) to 8142 process on the images list. 8143 8144 Available filters: 8145 8146 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 8147 - `dangling=true` 8148 - `label=key` or `label="key=value"` of an image label 8149 - `reference`=(`<image-name>[:<tag>]`) 8150 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 8151 - `until=<timestamp>` 8152 type: "string" 8153 - name: "shared-size" 8154 in: "query" 8155 description: "Compute and show shared size as a `SharedSize` field on each image." 8156 type: "boolean" 8157 default: false 8158 - name: "digests" 8159 in: "query" 8160 description: "Show digest information as a `RepoDigests` field on each image." 8161 type: "boolean" 8162 default: false 8163 tags: ["Image"] 8164 /build: 8165 post: 8166 summary: "Build an image" 8167 description: | 8168 Build an image from a tar archive with a `Dockerfile` in it. 8169 8170 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/). 8171 8172 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. 8173 8174 The build is canceled if the client drops the connection by quitting or being killed. 8175 operationId: "ImageBuild" 8176 consumes: 8177 - "application/octet-stream" 8178 produces: 8179 - "application/json" 8180 parameters: 8181 - name: "inputStream" 8182 in: "body" 8183 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 8184 schema: 8185 type: "string" 8186 format: "binary" 8187 - name: "dockerfile" 8188 in: "query" 8189 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 8190 type: "string" 8191 default: "Dockerfile" 8192 - name: "t" 8193 in: "query" 8194 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." 8195 type: "string" 8196 - name: "extrahosts" 8197 in: "query" 8198 description: "Extra hosts to add to /etc/hosts" 8199 type: "string" 8200 - name: "remote" 8201 in: "query" 8202 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." 8203 type: "string" 8204 - name: "q" 8205 in: "query" 8206 description: "Suppress verbose build output." 8207 type: "boolean" 8208 default: false 8209 - name: "nocache" 8210 in: "query" 8211 description: "Do not use the cache when building the image." 8212 type: "boolean" 8213 default: false 8214 - name: "cachefrom" 8215 in: "query" 8216 description: "JSON array of images used for build cache resolution." 8217 type: "string" 8218 - name: "pull" 8219 in: "query" 8220 description: "Attempt to pull the image even if an older image exists locally." 8221 type: "string" 8222 - name: "rm" 8223 in: "query" 8224 description: "Remove intermediate containers after a successful build." 8225 type: "boolean" 8226 default: true 8227 - name: "forcerm" 8228 in: "query" 8229 description: "Always remove intermediate containers, even upon failure." 8230 type: "boolean" 8231 default: false 8232 - name: "memory" 8233 in: "query" 8234 description: "Set memory limit for build." 8235 type: "integer" 8236 - name: "memswap" 8237 in: "query" 8238 description: "Total memory (memory + swap). Set as `-1` to disable swap." 8239 type: "integer" 8240 - name: "cpushares" 8241 in: "query" 8242 description: "CPU shares (relative weight)." 8243 type: "integer" 8244 - name: "cpusetcpus" 8245 in: "query" 8246 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 8247 type: "string" 8248 - name: "cpuperiod" 8249 in: "query" 8250 description: "The length of a CPU period in microseconds." 8251 type: "integer" 8252 - name: "cpuquota" 8253 in: "query" 8254 description: "Microseconds of CPU time that the container can get in a CPU period." 8255 type: "integer" 8256 - name: "buildargs" 8257 in: "query" 8258 description: > 8259 JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker 8260 uses the buildargs as the environment context for commands run via the `Dockerfile` RUN 8261 instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for 8262 passing secret values. 8263 8264 8265 For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the 8266 query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. 8267 8268 8269 [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) 8270 type: "string" 8271 - name: "shmsize" 8272 in: "query" 8273 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 8274 type: "integer" 8275 - name: "squash" 8276 in: "query" 8277 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 8278 type: "boolean" 8279 - name: "labels" 8280 in: "query" 8281 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 8282 type: "string" 8283 - name: "networkmode" 8284 in: "query" 8285 description: | 8286 Sets the networking mode for the run commands during build. Supported 8287 standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. 8288 Any other value is taken as a custom network's name or ID to which this 8289 container should connect to. 8290 type: "string" 8291 - name: "Content-type" 8292 in: "header" 8293 type: "string" 8294 enum: 8295 - "application/x-tar" 8296 default: "application/x-tar" 8297 - name: "X-Registry-Config" 8298 in: "header" 8299 description: | 8300 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 8301 8302 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 8303 8304 ``` 8305 { 8306 "docker.example.com": { 8307 "username": "janedoe", 8308 "password": "hunter2" 8309 }, 8310 "https://index.docker.io/v1/": { 8311 "username": "mobydock", 8312 "password": "conta1n3rize14" 8313 } 8314 } 8315 ``` 8316 8317 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. 8318 type: "string" 8319 - name: "platform" 8320 in: "query" 8321 description: "Platform in the format os[/arch[/variant]]" 8322 type: "string" 8323 default: "" 8324 - name: "target" 8325 in: "query" 8326 description: "Target build stage" 8327 type: "string" 8328 default: "" 8329 - name: "outputs" 8330 in: "query" 8331 description: "BuildKit output configuration" 8332 type: "string" 8333 default: "" 8334 responses: 8335 200: 8336 description: "no error" 8337 400: 8338 description: "Bad parameter" 8339 schema: 8340 $ref: "#/definitions/ErrorResponse" 8341 500: 8342 description: "server error" 8343 schema: 8344 $ref: "#/definitions/ErrorResponse" 8345 tags: ["Image"] 8346 /build/prune: 8347 post: 8348 summary: "Delete builder cache" 8349 produces: 8350 - "application/json" 8351 operationId: "BuildPrune" 8352 parameters: 8353 - name: "keep-storage" 8354 in: "query" 8355 description: "Amount of disk space in bytes to keep for cache" 8356 type: "integer" 8357 format: "int64" 8358 - name: "all" 8359 in: "query" 8360 type: "boolean" 8361 description: "Remove all types of build cache" 8362 - name: "filters" 8363 in: "query" 8364 type: "string" 8365 description: | 8366 A JSON encoded value of the filters (a `map[string][]string`) to 8367 process on the list of build cache objects. 8368 8369 Available filters: 8370 8371 - `until=<timestamp>` remove cache older than `<timestamp>`. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. 8372 - `id=<id>` 8373 - `parent=<id>` 8374 - `type=<string>` 8375 - `description=<string>` 8376 - `inuse` 8377 - `shared` 8378 - `private` 8379 responses: 8380 200: 8381 description: "No error" 8382 schema: 8383 type: "object" 8384 title: "BuildPruneResponse" 8385 properties: 8386 CachesDeleted: 8387 type: "array" 8388 items: 8389 description: "ID of build cache object" 8390 type: "string" 8391 SpaceReclaimed: 8392 description: "Disk space reclaimed in bytes" 8393 type: "integer" 8394 format: "int64" 8395 500: 8396 description: "Server error" 8397 schema: 8398 $ref: "#/definitions/ErrorResponse" 8399 tags: ["Image"] 8400 /images/create: 8401 post: 8402 summary: "Create an image" 8403 description: "Pull or import an image." 8404 operationId: "ImageCreate" 8405 consumes: 8406 - "text/plain" 8407 - "application/octet-stream" 8408 produces: 8409 - "application/json" 8410 responses: 8411 200: 8412 description: "no error" 8413 404: 8414 description: "repository does not exist or no read access" 8415 schema: 8416 $ref: "#/definitions/ErrorResponse" 8417 500: 8418 description: "server error" 8419 schema: 8420 $ref: "#/definitions/ErrorResponse" 8421 parameters: 8422 - name: "fromImage" 8423 in: "query" 8424 description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed." 8425 type: "string" 8426 - name: "fromSrc" 8427 in: "query" 8428 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." 8429 type: "string" 8430 - name: "repo" 8431 in: "query" 8432 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." 8433 type: "string" 8434 - name: "tag" 8435 in: "query" 8436 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 8437 type: "string" 8438 - name: "message" 8439 in: "query" 8440 description: "Set commit message for imported image." 8441 type: "string" 8442 - name: "inputImage" 8443 in: "body" 8444 description: "Image content if the value `-` has been specified in fromSrc query parameter" 8445 schema: 8446 type: "string" 8447 required: false 8448 - name: "X-Registry-Auth" 8449 in: "header" 8450 description: | 8451 A base64url-encoded auth configuration. 8452 8453 Refer to the [authentication section](#section/Authentication) for 8454 details. 8455 type: "string" 8456 - name: "changes" 8457 in: "query" 8458 description: | 8459 Apply `Dockerfile` instructions to the image that is created, 8460 for example: `changes=ENV DEBUG=true`. 8461 Note that `ENV DEBUG=true` should be URI component encoded. 8462 8463 Supported `Dockerfile` instructions: 8464 `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` 8465 type: "array" 8466 items: 8467 type: "string" 8468 - name: "platform" 8469 in: "query" 8470 description: | 8471 Platform in the format os[/arch[/variant]]. 8472 8473 When used in combination with the `fromImage` option, the daemon checks 8474 if the given image is present in the local image cache with the given 8475 OS and Architecture, and otherwise attempts to pull the image. If the 8476 option is not set, the host's native OS and Architecture are used. 8477 If the given image does not exist in the local image cache, the daemon 8478 attempts to pull the image with the host's native OS and Architecture. 8479 If the given image does exists in the local image cache, but its OS or 8480 architecture does not match, a warning is produced. 8481 8482 When used with the `fromSrc` option to import an image from an archive, 8483 this option sets the platform information for the imported image. If 8484 the option is not set, the host's native OS and Architecture are used 8485 for the imported image. 8486 type: "string" 8487 default: "" 8488 tags: ["Image"] 8489 /images/{name}/json: 8490 get: 8491 summary: "Inspect an image" 8492 description: "Return low-level information about an image." 8493 operationId: "ImageInspect" 8494 produces: 8495 - "application/json" 8496 responses: 8497 200: 8498 description: "No error" 8499 schema: 8500 $ref: "#/definitions/ImageInspect" 8501 404: 8502 description: "No such image" 8503 schema: 8504 $ref: "#/definitions/ErrorResponse" 8505 examples: 8506 application/json: 8507 message: "No such image: someimage (tag: latest)" 8508 500: 8509 description: "Server error" 8510 schema: 8511 $ref: "#/definitions/ErrorResponse" 8512 parameters: 8513 - name: "name" 8514 in: "path" 8515 description: "Image name or id" 8516 type: "string" 8517 required: true 8518 tags: ["Image"] 8519 /images/{name}/history: 8520 get: 8521 summary: "Get the history of an image" 8522 description: "Return parent layers of an image." 8523 operationId: "ImageHistory" 8524 produces: ["application/json"] 8525 responses: 8526 200: 8527 description: "List of image layers" 8528 schema: 8529 type: "array" 8530 items: 8531 type: "object" 8532 x-go-name: HistoryResponseItem 8533 title: "HistoryResponseItem" 8534 description: "individual image layer information in response to ImageHistory operation" 8535 required: [Id, Created, CreatedBy, Tags, Size, Comment] 8536 properties: 8537 Id: 8538 type: "string" 8539 x-nullable: false 8540 Created: 8541 type: "integer" 8542 format: "int64" 8543 x-nullable: false 8544 CreatedBy: 8545 type: "string" 8546 x-nullable: false 8547 Tags: 8548 type: "array" 8549 items: 8550 type: "string" 8551 Size: 8552 type: "integer" 8553 format: "int64" 8554 x-nullable: false 8555 Comment: 8556 type: "string" 8557 x-nullable: false 8558 examples: 8559 application/json: 8560 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 8561 Created: 1398108230 8562 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 8563 Tags: 8564 - "ubuntu:lucid" 8565 - "ubuntu:10.04" 8566 Size: 182964289 8567 Comment: "" 8568 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 8569 Created: 1398108222 8570 CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" 8571 Tags: [] 8572 Size: 0 8573 Comment: "" 8574 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 8575 Created: 1371157430 8576 CreatedBy: "" 8577 Tags: 8578 - "scratch12:latest" 8579 - "scratch:latest" 8580 Size: 0 8581 Comment: "Imported from -" 8582 404: 8583 description: "No such image" 8584 schema: 8585 $ref: "#/definitions/ErrorResponse" 8586 500: 8587 description: "Server error" 8588 schema: 8589 $ref: "#/definitions/ErrorResponse" 8590 parameters: 8591 - name: "name" 8592 in: "path" 8593 description: "Image name or ID" 8594 type: "string" 8595 required: true 8596 tags: ["Image"] 8597 /images/{name}/push: 8598 post: 8599 summary: "Push an image" 8600 description: | 8601 Push an image to a registry. 8602 8603 If you wish to push an image on to a private registry, that image must 8604 already have a tag which references the registry. For example, 8605 `registry.example.com/myimage:latest`. 8606 8607 The push is cancelled if the HTTP connection is closed. 8608 operationId: "ImagePush" 8609 consumes: 8610 - "application/octet-stream" 8611 responses: 8612 200: 8613 description: "No error" 8614 404: 8615 description: "No such image" 8616 schema: 8617 $ref: "#/definitions/ErrorResponse" 8618 500: 8619 description: "Server error" 8620 schema: 8621 $ref: "#/definitions/ErrorResponse" 8622 parameters: 8623 - name: "name" 8624 in: "path" 8625 description: "Image name or ID." 8626 type: "string" 8627 required: true 8628 - name: "tag" 8629 in: "query" 8630 description: "The tag to associate with the image on the registry." 8631 type: "string" 8632 - name: "X-Registry-Auth" 8633 in: "header" 8634 description: | 8635 A base64url-encoded auth configuration. 8636 8637 Refer to the [authentication section](#section/Authentication) for 8638 details. 8639 type: "string" 8640 required: true 8641 tags: ["Image"] 8642 /images/{name}/tag: 8643 post: 8644 summary: "Tag an image" 8645 description: "Tag an image so that it becomes part of a repository." 8646 operationId: "ImageTag" 8647 responses: 8648 201: 8649 description: "No error" 8650 400: 8651 description: "Bad parameter" 8652 schema: 8653 $ref: "#/definitions/ErrorResponse" 8654 404: 8655 description: "No such image" 8656 schema: 8657 $ref: "#/definitions/ErrorResponse" 8658 409: 8659 description: "Conflict" 8660 schema: 8661 $ref: "#/definitions/ErrorResponse" 8662 500: 8663 description: "Server error" 8664 schema: 8665 $ref: "#/definitions/ErrorResponse" 8666 parameters: 8667 - name: "name" 8668 in: "path" 8669 description: "Image name or ID to tag." 8670 type: "string" 8671 required: true 8672 - name: "repo" 8673 in: "query" 8674 description: "The repository to tag in. For example, `someuser/someimage`." 8675 type: "string" 8676 - name: "tag" 8677 in: "query" 8678 description: "The name of the new tag." 8679 type: "string" 8680 tags: ["Image"] 8681 /images/{name}: 8682 delete: 8683 summary: "Remove an image" 8684 description: | 8685 Remove an image, along with any untagged parent images that were 8686 referenced by that image. 8687 8688 Images can't be removed if they have descendant images, are being 8689 used by a running container or are being used by a build. 8690 operationId: "ImageDelete" 8691 produces: ["application/json"] 8692 responses: 8693 200: 8694 description: "The image was deleted successfully" 8695 schema: 8696 type: "array" 8697 items: 8698 $ref: "#/definitions/ImageDeleteResponseItem" 8699 examples: 8700 application/json: 8701 - Untagged: "3e2f21a89f" 8702 - Deleted: "3e2f21a89f" 8703 - Deleted: "53b4f83ac9" 8704 404: 8705 description: "No such image" 8706 schema: 8707 $ref: "#/definitions/ErrorResponse" 8708 409: 8709 description: "Conflict" 8710 schema: 8711 $ref: "#/definitions/ErrorResponse" 8712 500: 8713 description: "Server error" 8714 schema: 8715 $ref: "#/definitions/ErrorResponse" 8716 parameters: 8717 - name: "name" 8718 in: "path" 8719 description: "Image name or ID" 8720 type: "string" 8721 required: true 8722 - name: "force" 8723 in: "query" 8724 description: "Remove the image even if it is being used by stopped containers or has other tags" 8725 type: "boolean" 8726 default: false 8727 - name: "noprune" 8728 in: "query" 8729 description: "Do not delete untagged parent images" 8730 type: "boolean" 8731 default: false 8732 tags: ["Image"] 8733 /images/search: 8734 get: 8735 summary: "Search images" 8736 description: "Search for an image on Docker Hub." 8737 operationId: "ImageSearch" 8738 produces: 8739 - "application/json" 8740 responses: 8741 200: 8742 description: "No error" 8743 schema: 8744 type: "array" 8745 items: 8746 type: "object" 8747 title: "ImageSearchResponseItem" 8748 properties: 8749 description: 8750 type: "string" 8751 is_official: 8752 type: "boolean" 8753 is_automated: 8754 description: | 8755 Whether this repository has automated builds enabled. 8756 8757 <p><br /></p> 8758 8759 > **Deprecated**: This field is deprecated and will always 8760 > be "false" in future. 8761 type: "boolean" 8762 example: false 8763 name: 8764 type: "string" 8765 star_count: 8766 type: "integer" 8767 examples: 8768 application/json: 8769 - description: "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!" 8770 is_official: true 8771 is_automated: false 8772 name: "alpine" 8773 star_count: 10093 8774 - description: "Busybox base image." 8775 is_official: true 8776 is_automated: false 8777 name: "Busybox base image." 8778 star_count: 3037 8779 - description: "The PostgreSQL object-relational database system provides reliability and data integrity." 8780 is_official: true 8781 is_automated: false 8782 name: "postgres" 8783 star_count: 12408 8784 500: 8785 description: "Server error" 8786 schema: 8787 $ref: "#/definitions/ErrorResponse" 8788 parameters: 8789 - name: "term" 8790 in: "query" 8791 description: "Term to search" 8792 type: "string" 8793 required: true 8794 - name: "limit" 8795 in: "query" 8796 description: "Maximum number of results to return" 8797 type: "integer" 8798 - name: "filters" 8799 in: "query" 8800 description: | 8801 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 8802 8803 - `is-automated=(true|false)` (deprecated, see below) 8804 - `is-official=(true|false)` 8805 - `stars=<number>` Matches images that has at least 'number' stars. 8806 8807 The `is-automated` filter is deprecated. The `is_automated` field has 8808 been deprecated by Docker Hub's search API. Consequently, searching 8809 for `is-automated=true` will yield no results. 8810 type: "string" 8811 tags: ["Image"] 8812 /images/prune: 8813 post: 8814 summary: "Delete unused images" 8815 produces: 8816 - "application/json" 8817 operationId: "ImagePrune" 8818 parameters: 8819 - name: "filters" 8820 in: "query" 8821 description: | 8822 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 8823 8824 - `dangling=<boolean>` When set to `true` (or `1`), prune only 8825 unused *and* untagged images. When set to `false` 8826 (or `0`), all unused images are pruned. 8827 - `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 8828 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune images with (or without, in case `label!=...` is used) the specified labels. 8829 type: "string" 8830 responses: 8831 200: 8832 description: "No error" 8833 schema: 8834 type: "object" 8835 title: "ImagePruneResponse" 8836 properties: 8837 ImagesDeleted: 8838 description: "Images that were deleted" 8839 type: "array" 8840 items: 8841 $ref: "#/definitions/ImageDeleteResponseItem" 8842 SpaceReclaimed: 8843 description: "Disk space reclaimed in bytes" 8844 type: "integer" 8845 format: "int64" 8846 500: 8847 description: "Server error" 8848 schema: 8849 $ref: "#/definitions/ErrorResponse" 8850 tags: ["Image"] 8851 /auth: 8852 post: 8853 summary: "Check auth configuration" 8854 description: | 8855 Validate credentials for a registry and, if available, get an identity 8856 token for accessing the registry without password. 8857 operationId: "SystemAuth" 8858 consumes: ["application/json"] 8859 produces: ["application/json"] 8860 responses: 8861 200: 8862 description: "An identity token was generated successfully." 8863 schema: 8864 type: "object" 8865 title: "SystemAuthResponse" 8866 required: [Status] 8867 properties: 8868 Status: 8869 description: "The status of the authentication" 8870 type: "string" 8871 x-nullable: false 8872 IdentityToken: 8873 description: "An opaque token used to authenticate a user after a successful login" 8874 type: "string" 8875 x-nullable: false 8876 examples: 8877 application/json: 8878 Status: "Login Succeeded" 8879 IdentityToken: "9cbaf023786cd7..." 8880 204: 8881 description: "No error" 8882 401: 8883 description: "Auth error" 8884 schema: 8885 $ref: "#/definitions/ErrorResponse" 8886 500: 8887 description: "Server error" 8888 schema: 8889 $ref: "#/definitions/ErrorResponse" 8890 parameters: 8891 - name: "authConfig" 8892 in: "body" 8893 description: "Authentication to check" 8894 schema: 8895 $ref: "#/definitions/AuthConfig" 8896 tags: ["System"] 8897 /info: 8898 get: 8899 summary: "Get system information" 8900 operationId: "SystemInfo" 8901 produces: 8902 - "application/json" 8903 responses: 8904 200: 8905 description: "No error" 8906 schema: 8907 $ref: "#/definitions/SystemInfo" 8908 500: 8909 description: "Server error" 8910 schema: 8911 $ref: "#/definitions/ErrorResponse" 8912 tags: ["System"] 8913 /version: 8914 get: 8915 summary: "Get version" 8916 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 8917 operationId: "SystemVersion" 8918 produces: ["application/json"] 8919 responses: 8920 200: 8921 description: "no error" 8922 schema: 8923 $ref: "#/definitions/SystemVersion" 8924 500: 8925 description: "server error" 8926 schema: 8927 $ref: "#/definitions/ErrorResponse" 8928 tags: ["System"] 8929 /_ping: 8930 get: 8931 summary: "Ping" 8932 description: "This is a dummy endpoint you can use to test if the server is accessible." 8933 operationId: "SystemPing" 8934 produces: ["text/plain"] 8935 responses: 8936 200: 8937 description: "no error" 8938 schema: 8939 type: "string" 8940 example: "OK" 8941 headers: 8942 API-Version: 8943 type: "string" 8944 description: "Max API Version the server supports" 8945 Builder-Version: 8946 type: "string" 8947 description: | 8948 Default version of docker image builder 8949 8950 The default on Linux is version "2" (BuildKit), but the daemon 8951 can be configured to recommend version "1" (classic Builder). 8952 Windows does not yet support BuildKit for native Windows images, 8953 and uses "1" (classic builder) as a default. 8954 8955 This value is a recommendation as advertised by the daemon, and 8956 it is up to the client to choose which builder to use. 8957 default: "2" 8958 Docker-Experimental: 8959 type: "boolean" 8960 description: "If the server is running with experimental mode enabled" 8961 Swarm: 8962 type: "string" 8963 enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] 8964 description: | 8965 Contains information about Swarm status of the daemon, 8966 and if the daemon is acting as a manager or worker node. 8967 default: "inactive" 8968 Cache-Control: 8969 type: "string" 8970 default: "no-cache, no-store, must-revalidate" 8971 Pragma: 8972 type: "string" 8973 default: "no-cache" 8974 500: 8975 description: "server error" 8976 schema: 8977 $ref: "#/definitions/ErrorResponse" 8978 headers: 8979 Cache-Control: 8980 type: "string" 8981 default: "no-cache, no-store, must-revalidate" 8982 Pragma: 8983 type: "string" 8984 default: "no-cache" 8985 tags: ["System"] 8986 head: 8987 summary: "Ping" 8988 description: "This is a dummy endpoint you can use to test if the server is accessible." 8989 operationId: "SystemPingHead" 8990 produces: ["text/plain"] 8991 responses: 8992 200: 8993 description: "no error" 8994 schema: 8995 type: "string" 8996 example: "(empty)" 8997 headers: 8998 API-Version: 8999 type: "string" 9000 description: "Max API Version the server supports" 9001 Builder-Version: 9002 type: "string" 9003 description: "Default version of docker image builder" 9004 Docker-Experimental: 9005 type: "boolean" 9006 description: "If the server is running with experimental mode enabled" 9007 Swarm: 9008 type: "string" 9009 enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] 9010 description: | 9011 Contains information about Swarm status of the daemon, 9012 and if the daemon is acting as a manager or worker node. 9013 default: "inactive" 9014 Cache-Control: 9015 type: "string" 9016 default: "no-cache, no-store, must-revalidate" 9017 Pragma: 9018 type: "string" 9019 default: "no-cache" 9020 500: 9021 description: "server error" 9022 schema: 9023 $ref: "#/definitions/ErrorResponse" 9024 tags: ["System"] 9025 /commit: 9026 post: 9027 summary: "Create a new image from a container" 9028 operationId: "ImageCommit" 9029 consumes: 9030 - "application/json" 9031 produces: 9032 - "application/json" 9033 responses: 9034 201: 9035 description: "no error" 9036 schema: 9037 $ref: "#/definitions/IdResponse" 9038 404: 9039 description: "no such container" 9040 schema: 9041 $ref: "#/definitions/ErrorResponse" 9042 examples: 9043 application/json: 9044 message: "No such container: c2ada9df5af8" 9045 500: 9046 description: "server error" 9047 schema: 9048 $ref: "#/definitions/ErrorResponse" 9049 parameters: 9050 - name: "containerConfig" 9051 in: "body" 9052 description: "The container configuration" 9053 schema: 9054 $ref: "#/definitions/ContainerConfig" 9055 - name: "container" 9056 in: "query" 9057 description: "The ID or name of the container to commit" 9058 type: "string" 9059 - name: "repo" 9060 in: "query" 9061 description: "Repository name for the created image" 9062 type: "string" 9063 - name: "tag" 9064 in: "query" 9065 description: "Tag name for the create image" 9066 type: "string" 9067 - name: "comment" 9068 in: "query" 9069 description: "Commit message" 9070 type: "string" 9071 - name: "author" 9072 in: "query" 9073 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 9074 type: "string" 9075 - name: "pause" 9076 in: "query" 9077 description: "Whether to pause the container before committing" 9078 type: "boolean" 9079 default: true 9080 - name: "changes" 9081 in: "query" 9082 description: "`Dockerfile` instructions to apply while committing" 9083 type: "string" 9084 tags: ["Image"] 9085 /events: 9086 get: 9087 summary: "Monitor events" 9088 description: | 9089 Stream real-time events from the server. 9090 9091 Various objects within Docker report events when something happens to them. 9092 9093 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` 9094 9095 Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` 9096 9097 Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` 9098 9099 Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` 9100 9101 The Docker daemon reports these events: `reload` 9102 9103 Services report these events: `create`, `update`, and `remove` 9104 9105 Nodes report these events: `create`, `update`, and `remove` 9106 9107 Secrets report these events: `create`, `update`, and `remove` 9108 9109 Configs report these events: `create`, `update`, and `remove` 9110 9111 The Builder reports `prune` events 9112 9113 operationId: "SystemEvents" 9114 produces: 9115 - "application/json" 9116 responses: 9117 200: 9118 description: "no error" 9119 schema: 9120 $ref: "#/definitions/EventMessage" 9121 400: 9122 description: "bad parameter" 9123 schema: 9124 $ref: "#/definitions/ErrorResponse" 9125 500: 9126 description: "server error" 9127 schema: 9128 $ref: "#/definitions/ErrorResponse" 9129 parameters: 9130 - name: "since" 9131 in: "query" 9132 description: "Show events created since this timestamp then stream new events." 9133 type: "string" 9134 - name: "until" 9135 in: "query" 9136 description: "Show events created until this timestamp then stop streaming." 9137 type: "string" 9138 - name: "filters" 9139 in: "query" 9140 description: | 9141 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 9142 9143 - `config=<string>` config name or ID 9144 - `container=<string>` container name or ID 9145 - `daemon=<string>` daemon name or ID 9146 - `event=<string>` event type 9147 - `image=<string>` image name or ID 9148 - `label=<string>` image or container label 9149 - `network=<string>` network name or ID 9150 - `node=<string>` node ID 9151 - `plugin`=<string> plugin name or ID 9152 - `scope`=<string> local or swarm 9153 - `secret=<string>` secret name or ID 9154 - `service=<string>` service name or ID 9155 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` 9156 - `volume=<string>` volume name 9157 type: "string" 9158 tags: ["System"] 9159 /system/df: 9160 get: 9161 summary: "Get data usage information" 9162 operationId: "SystemDataUsage" 9163 responses: 9164 200: 9165 description: "no error" 9166 schema: 9167 type: "object" 9168 title: "SystemDataUsageResponse" 9169 properties: 9170 LayersSize: 9171 type: "integer" 9172 format: "int64" 9173 Images: 9174 type: "array" 9175 items: 9176 $ref: "#/definitions/ImageSummary" 9177 Containers: 9178 type: "array" 9179 items: 9180 $ref: "#/definitions/ContainerSummary" 9181 Volumes: 9182 type: "array" 9183 items: 9184 $ref: "#/definitions/Volume" 9185 BuildCache: 9186 type: "array" 9187 items: 9188 $ref: "#/definitions/BuildCache" 9189 example: 9190 LayersSize: 1092588 9191 Images: 9192 - 9193 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 9194 ParentId: "" 9195 RepoTags: 9196 - "busybox:latest" 9197 RepoDigests: 9198 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 9199 Created: 1466724217 9200 Size: 1092588 9201 SharedSize: 0 9202 Labels: {} 9203 Containers: 1 9204 Containers: 9205 - 9206 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 9207 Names: 9208 - "/top" 9209 Image: "busybox" 9210 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 9211 Command: "top" 9212 Created: 1472592424 9213 Ports: [] 9214 SizeRootFs: 1092588 9215 Labels: {} 9216 State: "exited" 9217 Status: "Exited (0) 56 minutes ago" 9218 HostConfig: 9219 NetworkMode: "default" 9220 NetworkSettings: 9221 Networks: 9222 bridge: 9223 IPAMConfig: null 9224 Links: null 9225 Aliases: null 9226 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 9227 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 9228 Gateway: "172.18.0.1" 9229 IPAddress: "172.18.0.2" 9230 IPPrefixLen: 16 9231 IPv6Gateway: "" 9232 GlobalIPv6Address: "" 9233 GlobalIPv6PrefixLen: 0 9234 MacAddress: "02:42:ac:12:00:02" 9235 Mounts: [] 9236 Volumes: 9237 - 9238 Name: "my-volume" 9239 Driver: "local" 9240 Mountpoint: "/var/lib/docker/volumes/my-volume/_data" 9241 Labels: null 9242 Scope: "local" 9243 Options: null 9244 UsageData: 9245 Size: 10920104 9246 RefCount: 2 9247 BuildCache: 9248 - 9249 ID: "hw53o5aio51xtltp5xjp8v7fx" 9250 Parents: [] 9251 Type: "regular" 9252 Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" 9253 InUse: false 9254 Shared: true 9255 Size: 0 9256 CreatedAt: "2021-06-28T13:31:01.474619385Z" 9257 LastUsedAt: "2021-07-07T22:02:32.738075951Z" 9258 UsageCount: 26 9259 - 9260 ID: "ndlpt0hhvkqcdfkputsk4cq9c" 9261 Parents: ["ndlpt0hhvkqcdfkputsk4cq9c"] 9262 Type: "regular" 9263 Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" 9264 InUse: false 9265 Shared: true 9266 Size: 51 9267 CreatedAt: "2021-06-28T13:31:03.002625487Z" 9268 LastUsedAt: "2021-07-07T22:02:32.773909517Z" 9269 UsageCount: 26 9270 500: 9271 description: "server error" 9272 schema: 9273 $ref: "#/definitions/ErrorResponse" 9274 parameters: 9275 - name: "type" 9276 in: "query" 9277 description: | 9278 Object types, for which to compute and return data. 9279 type: "array" 9280 collectionFormat: multi 9281 items: 9282 type: "string" 9283 enum: ["container", "image", "volume", "build-cache"] 9284 tags: ["System"] 9285 /images/{name}/get: 9286 get: 9287 summary: "Export an image" 9288 description: | 9289 Get a tarball containing all images and metadata for a repository. 9290 9291 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. 9292 9293 ### Image tarball format 9294 9295 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 9296 9297 - `VERSION`: currently `1.0` - the file format version 9298 - `json`: detailed layer information, similar to `docker inspect layer_id` 9299 - `layer.tar`: A tarfile containing the filesystem changes in this layer 9300 9301 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 9302 9303 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. 9304 9305 ```json 9306 { 9307 "hello-world": { 9308 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 9309 } 9310 } 9311 ``` 9312 operationId: "ImageGet" 9313 produces: 9314 - "application/x-tar" 9315 responses: 9316 200: 9317 description: "no error" 9318 schema: 9319 type: "string" 9320 format: "binary" 9321 500: 9322 description: "server error" 9323 schema: 9324 $ref: "#/definitions/ErrorResponse" 9325 parameters: 9326 - name: "name" 9327 in: "path" 9328 description: "Image name or ID" 9329 type: "string" 9330 required: true 9331 tags: ["Image"] 9332 /images/get: 9333 get: 9334 summary: "Export several images" 9335 description: | 9336 Get a tarball containing all images and metadata for several image 9337 repositories. 9338 9339 For each value of the `names` parameter: if it is a specific name and 9340 tag (e.g. `ubuntu:latest`), then only that image (and its parents) are 9341 returned; if it is an image ID, similarly only that image (and its parents) 9342 are returned and there would be no names referenced in the 'repositories' 9343 file for this image ID. 9344 9345 For details on the format, see the [export image endpoint](#operation/ImageGet). 9346 operationId: "ImageGetAll" 9347 produces: 9348 - "application/x-tar" 9349 responses: 9350 200: 9351 description: "no error" 9352 schema: 9353 type: "string" 9354 format: "binary" 9355 500: 9356 description: "server error" 9357 schema: 9358 $ref: "#/definitions/ErrorResponse" 9359 parameters: 9360 - name: "names" 9361 in: "query" 9362 description: "Image names to filter by" 9363 type: "array" 9364 items: 9365 type: "string" 9366 tags: ["Image"] 9367 /images/load: 9368 post: 9369 summary: "Import images" 9370 description: | 9371 Load a set of images and tags into a repository. 9372 9373 For details on the format, see the [export image endpoint](#operation/ImageGet). 9374 operationId: "ImageLoad" 9375 consumes: 9376 - "application/x-tar" 9377 produces: 9378 - "application/json" 9379 responses: 9380 200: 9381 description: "no error" 9382 500: 9383 description: "server error" 9384 schema: 9385 $ref: "#/definitions/ErrorResponse" 9386 parameters: 9387 - name: "imagesTarball" 9388 in: "body" 9389 description: "Tar archive containing images" 9390 schema: 9391 type: "string" 9392 format: "binary" 9393 - name: "quiet" 9394 in: "query" 9395 description: "Suppress progress details during load." 9396 type: "boolean" 9397 default: false 9398 tags: ["Image"] 9399 /containers/{id}/exec: 9400 post: 9401 summary: "Create an exec instance" 9402 description: "Run a command inside a running container." 9403 operationId: "ContainerExec" 9404 consumes: 9405 - "application/json" 9406 produces: 9407 - "application/json" 9408 responses: 9409 201: 9410 description: "no error" 9411 schema: 9412 $ref: "#/definitions/IdResponse" 9413 404: 9414 description: "no such container" 9415 schema: 9416 $ref: "#/definitions/ErrorResponse" 9417 examples: 9418 application/json: 9419 message: "No such container: c2ada9df5af8" 9420 409: 9421 description: "container is paused" 9422 schema: 9423 $ref: "#/definitions/ErrorResponse" 9424 500: 9425 description: "Server error" 9426 schema: 9427 $ref: "#/definitions/ErrorResponse" 9428 parameters: 9429 - name: "execConfig" 9430 in: "body" 9431 description: "Exec configuration" 9432 schema: 9433 type: "object" 9434 title: "ExecConfig" 9435 properties: 9436 AttachStdin: 9437 type: "boolean" 9438 description: "Attach to `stdin` of the exec command." 9439 AttachStdout: 9440 type: "boolean" 9441 description: "Attach to `stdout` of the exec command." 9442 AttachStderr: 9443 type: "boolean" 9444 description: "Attach to `stderr` of the exec command." 9445 ConsoleSize: 9446 type: "array" 9447 description: "Initial console size, as an `[height, width]` array." 9448 x-nullable: true 9449 minItems: 2 9450 maxItems: 2 9451 items: 9452 type: "integer" 9453 minimum: 0 9454 DetachKeys: 9455 type: "string" 9456 description: | 9457 Override the key sequence for detaching a container. Format is 9458 a single character `[a-Z]` or `ctrl-<value>` where `<value>` 9459 is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. 9460 Tty: 9461 type: "boolean" 9462 description: "Allocate a pseudo-TTY." 9463 Env: 9464 description: | 9465 A list of environment variables in the form `["VAR=value", ...]`. 9466 type: "array" 9467 items: 9468 type: "string" 9469 Cmd: 9470 type: "array" 9471 description: "Command to run, as a string or array of strings." 9472 items: 9473 type: "string" 9474 Privileged: 9475 type: "boolean" 9476 description: "Runs the exec process with extended privileges." 9477 default: false 9478 User: 9479 type: "string" 9480 description: | 9481 The user, and optionally, group to run the exec process inside 9482 the container. Format is one of: `user`, `user:group`, `uid`, 9483 or `uid:gid`. 9484 WorkingDir: 9485 type: "string" 9486 description: | 9487 The working directory for the exec process inside the container. 9488 example: 9489 AttachStdin: false 9490 AttachStdout: true 9491 AttachStderr: true 9492 DetachKeys: "ctrl-p,ctrl-q" 9493 Tty: false 9494 Cmd: 9495 - "date" 9496 Env: 9497 - "FOO=bar" 9498 - "BAZ=quux" 9499 required: true 9500 - name: "id" 9501 in: "path" 9502 description: "ID or name of container" 9503 type: "string" 9504 required: true 9505 tags: ["Exec"] 9506 /exec/{id}/start: 9507 post: 9508 summary: "Start an exec instance" 9509 description: | 9510 Starts a previously set up exec instance. If detach is true, this endpoint 9511 returns immediately after starting the command. Otherwise, it sets up an 9512 interactive session with the command. 9513 operationId: "ExecStart" 9514 consumes: 9515 - "application/json" 9516 produces: 9517 - "application/vnd.docker.raw-stream" 9518 - "application/vnd.docker.multiplexed-stream" 9519 responses: 9520 200: 9521 description: "No error" 9522 404: 9523 description: "No such exec instance" 9524 schema: 9525 $ref: "#/definitions/ErrorResponse" 9526 409: 9527 description: "Container is stopped or paused" 9528 schema: 9529 $ref: "#/definitions/ErrorResponse" 9530 parameters: 9531 - name: "execStartConfig" 9532 in: "body" 9533 schema: 9534 type: "object" 9535 title: "ExecStartConfig" 9536 properties: 9537 Detach: 9538 type: "boolean" 9539 description: "Detach from the command." 9540 Tty: 9541 type: "boolean" 9542 description: "Allocate a pseudo-TTY." 9543 ConsoleSize: 9544 type: "array" 9545 description: "Initial console size, as an `[height, width]` array." 9546 x-nullable: true 9547 minItems: 2 9548 maxItems: 2 9549 items: 9550 type: "integer" 9551 minimum: 0 9552 example: 9553 Detach: false 9554 Tty: true 9555 ConsoleSize: [80, 64] 9556 - name: "id" 9557 in: "path" 9558 description: "Exec instance ID" 9559 required: true 9560 type: "string" 9561 tags: ["Exec"] 9562 /exec/{id}/resize: 9563 post: 9564 summary: "Resize an exec instance" 9565 description: | 9566 Resize the TTY session used by an exec instance. This endpoint only works 9567 if `tty` was specified as part of creating and starting the exec instance. 9568 operationId: "ExecResize" 9569 responses: 9570 200: 9571 description: "No error" 9572 400: 9573 description: "bad parameter" 9574 schema: 9575 $ref: "#/definitions/ErrorResponse" 9576 404: 9577 description: "No such exec instance" 9578 schema: 9579 $ref: "#/definitions/ErrorResponse" 9580 500: 9581 description: "Server error" 9582 schema: 9583 $ref: "#/definitions/ErrorResponse" 9584 parameters: 9585 - name: "id" 9586 in: "path" 9587 description: "Exec instance ID" 9588 required: true 9589 type: "string" 9590 - name: "h" 9591 in: "query" 9592 description: "Height of the TTY session in characters" 9593 type: "integer" 9594 - name: "w" 9595 in: "query" 9596 description: "Width of the TTY session in characters" 9597 type: "integer" 9598 tags: ["Exec"] 9599 /exec/{id}/json: 9600 get: 9601 summary: "Inspect an exec instance" 9602 description: "Return low-level information about an exec instance." 9603 operationId: "ExecInspect" 9604 produces: 9605 - "application/json" 9606 responses: 9607 200: 9608 description: "No error" 9609 schema: 9610 type: "object" 9611 title: "ExecInspectResponse" 9612 properties: 9613 CanRemove: 9614 type: "boolean" 9615 DetachKeys: 9616 type: "string" 9617 ID: 9618 type: "string" 9619 Running: 9620 type: "boolean" 9621 ExitCode: 9622 type: "integer" 9623 ProcessConfig: 9624 $ref: "#/definitions/ProcessConfig" 9625 OpenStdin: 9626 type: "boolean" 9627 OpenStderr: 9628 type: "boolean" 9629 OpenStdout: 9630 type: "boolean" 9631 ContainerID: 9632 type: "string" 9633 Pid: 9634 type: "integer" 9635 description: "The system process ID for the exec process." 9636 examples: 9637 application/json: 9638 CanRemove: false 9639 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 9640 DetachKeys: "" 9641 ExitCode: 2 9642 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 9643 OpenStderr: true 9644 OpenStdin: true 9645 OpenStdout: true 9646 ProcessConfig: 9647 arguments: 9648 - "-c" 9649 - "exit 2" 9650 entrypoint: "sh" 9651 privileged: false 9652 tty: true 9653 user: "1000" 9654 Running: false 9655 Pid: 42000 9656 404: 9657 description: "No such exec instance" 9658 schema: 9659 $ref: "#/definitions/ErrorResponse" 9660 500: 9661 description: "Server error" 9662 schema: 9663 $ref: "#/definitions/ErrorResponse" 9664 parameters: 9665 - name: "id" 9666 in: "path" 9667 description: "Exec instance ID" 9668 required: true 9669 type: "string" 9670 tags: ["Exec"] 9671 9672 /volumes: 9673 get: 9674 summary: "List volumes" 9675 operationId: "VolumeList" 9676 produces: ["application/json"] 9677 responses: 9678 200: 9679 description: "Summary volume data that matches the query" 9680 schema: 9681 $ref: "#/definitions/VolumeListResponse" 9682 500: 9683 description: "Server error" 9684 schema: 9685 $ref: "#/definitions/ErrorResponse" 9686 parameters: 9687 - name: "filters" 9688 in: "query" 9689 description: | 9690 JSON encoded value of the filters (a `map[string][]string`) to 9691 process on the volumes list. Available filters: 9692 9693 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9694 volumes that are not in use by a container. When set to `false` 9695 (or `0`), only volumes that are in use by one or more 9696 containers are returned. 9697 - `driver=<volume-driver-name>` Matches volumes based on their driver. 9698 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 9699 the presence of a `label` alone or a `label` and a value. 9700 - `name=<volume-name>` Matches all or part of a volume name. 9701 type: "string" 9702 format: "json" 9703 tags: ["Volume"] 9704 9705 /volumes/create: 9706 post: 9707 summary: "Create a volume" 9708 operationId: "VolumeCreate" 9709 consumes: ["application/json"] 9710 produces: ["application/json"] 9711 responses: 9712 201: 9713 description: "The volume was created successfully" 9714 schema: 9715 $ref: "#/definitions/Volume" 9716 500: 9717 description: "Server error" 9718 schema: 9719 $ref: "#/definitions/ErrorResponse" 9720 parameters: 9721 - name: "volumeConfig" 9722 in: "body" 9723 required: true 9724 description: "Volume configuration" 9725 schema: 9726 $ref: "#/definitions/VolumeCreateOptions" 9727 tags: ["Volume"] 9728 9729 /volumes/{name}: 9730 get: 9731 summary: "Inspect a volume" 9732 operationId: "VolumeInspect" 9733 produces: ["application/json"] 9734 responses: 9735 200: 9736 description: "No error" 9737 schema: 9738 $ref: "#/definitions/Volume" 9739 404: 9740 description: "No such volume" 9741 schema: 9742 $ref: "#/definitions/ErrorResponse" 9743 500: 9744 description: "Server error" 9745 schema: 9746 $ref: "#/definitions/ErrorResponse" 9747 parameters: 9748 - name: "name" 9749 in: "path" 9750 required: true 9751 description: "Volume name or ID" 9752 type: "string" 9753 tags: ["Volume"] 9754 9755 put: 9756 summary: | 9757 "Update a volume. Valid only for Swarm cluster volumes" 9758 operationId: "VolumeUpdate" 9759 consumes: ["application/json"] 9760 produces: ["application/json"] 9761 responses: 9762 200: 9763 description: "no error" 9764 400: 9765 description: "bad parameter" 9766 schema: 9767 $ref: "#/definitions/ErrorResponse" 9768 404: 9769 description: "no such volume" 9770 schema: 9771 $ref: "#/definitions/ErrorResponse" 9772 500: 9773 description: "server error" 9774 schema: 9775 $ref: "#/definitions/ErrorResponse" 9776 503: 9777 description: "node is not part of a swarm" 9778 schema: 9779 $ref: "#/definitions/ErrorResponse" 9780 parameters: 9781 - name: "name" 9782 in: "path" 9783 description: "The name or ID of the volume" 9784 type: "string" 9785 required: true 9786 - name: "body" 9787 in: "body" 9788 schema: 9789 # though the schema for is an object that contains only a 9790 # ClusterVolumeSpec, wrapping the ClusterVolumeSpec in this object 9791 # means that if, later on, we support things like changing the 9792 # labels, we can do so without duplicating that information to the 9793 # ClusterVolumeSpec. 9794 type: "object" 9795 description: "Volume configuration" 9796 properties: 9797 Spec: 9798 $ref: "#/definitions/ClusterVolumeSpec" 9799 description: | 9800 The spec of the volume to update. Currently, only Availability may 9801 change. All other fields must remain unchanged. 9802 - name: "version" 9803 in: "query" 9804 description: | 9805 The version number of the volume being updated. This is required to 9806 avoid conflicting writes. Found in the volume's `ClusterVolume` 9807 field. 9808 type: "integer" 9809 format: "int64" 9810 required: true 9811 tags: ["Volume"] 9812 9813 delete: 9814 summary: "Remove a volume" 9815 description: "Instruct the driver to remove the volume." 9816 operationId: "VolumeDelete" 9817 responses: 9818 204: 9819 description: "The volume was removed" 9820 404: 9821 description: "No such volume or volume driver" 9822 schema: 9823 $ref: "#/definitions/ErrorResponse" 9824 409: 9825 description: "Volume is in use and cannot be removed" 9826 schema: 9827 $ref: "#/definitions/ErrorResponse" 9828 500: 9829 description: "Server error" 9830 schema: 9831 $ref: "#/definitions/ErrorResponse" 9832 parameters: 9833 - name: "name" 9834 in: "path" 9835 required: true 9836 description: "Volume name or ID" 9837 type: "string" 9838 - name: "force" 9839 in: "query" 9840 description: "Force the removal of the volume" 9841 type: "boolean" 9842 default: false 9843 tags: ["Volume"] 9844 9845 /volumes/prune: 9846 post: 9847 summary: "Delete unused volumes" 9848 produces: 9849 - "application/json" 9850 operationId: "VolumePrune" 9851 parameters: 9852 - name: "filters" 9853 in: "query" 9854 description: | 9855 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 9856 9857 Available filters: 9858 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. 9859 - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. 9860 type: "string" 9861 responses: 9862 200: 9863 description: "No error" 9864 schema: 9865 type: "object" 9866 title: "VolumePruneResponse" 9867 properties: 9868 VolumesDeleted: 9869 description: "Volumes that were deleted" 9870 type: "array" 9871 items: 9872 type: "string" 9873 SpaceReclaimed: 9874 description: "Disk space reclaimed in bytes" 9875 type: "integer" 9876 format: "int64" 9877 500: 9878 description: "Server error" 9879 schema: 9880 $ref: "#/definitions/ErrorResponse" 9881 tags: ["Volume"] 9882 /networks: 9883 get: 9884 summary: "List networks" 9885 description: | 9886 Returns a list of networks. For details on the format, see the 9887 [network inspect endpoint](#operation/NetworkInspect). 9888 9889 Note that it uses a different, smaller representation of a network than 9890 inspecting a single network. For example, the list of containers attached 9891 to the network is not propagated in API versions 1.28 and up. 9892 operationId: "NetworkList" 9893 produces: 9894 - "application/json" 9895 responses: 9896 200: 9897 description: "No error" 9898 schema: 9899 type: "array" 9900 items: 9901 $ref: "#/definitions/Network" 9902 examples: 9903 application/json: 9904 - Name: "bridge" 9905 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 9906 Created: "2016-10-19T06:21:00.416543526Z" 9907 Scope: "local" 9908 Driver: "bridge" 9909 EnableIPv6: false 9910 Internal: false 9911 Attachable: false 9912 Ingress: false 9913 IPAM: 9914 Driver: "default" 9915 Config: 9916 - 9917 Subnet: "172.17.0.0/16" 9918 Options: 9919 com.docker.network.bridge.default_bridge: "true" 9920 com.docker.network.bridge.enable_icc: "true" 9921 com.docker.network.bridge.enable_ip_masquerade: "true" 9922 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 9923 com.docker.network.bridge.name: "docker0" 9924 com.docker.network.driver.mtu: "1500" 9925 - Name: "none" 9926 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 9927 Created: "0001-01-01T00:00:00Z" 9928 Scope: "local" 9929 Driver: "null" 9930 EnableIPv6: false 9931 Internal: false 9932 Attachable: false 9933 Ingress: false 9934 IPAM: 9935 Driver: "default" 9936 Config: [] 9937 Containers: {} 9938 Options: {} 9939 - Name: "host" 9940 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 9941 Created: "0001-01-01T00:00:00Z" 9942 Scope: "local" 9943 Driver: "host" 9944 EnableIPv6: false 9945 Internal: false 9946 Attachable: false 9947 Ingress: false 9948 IPAM: 9949 Driver: "default" 9950 Config: [] 9951 Containers: {} 9952 Options: {} 9953 500: 9954 description: "Server error" 9955 schema: 9956 $ref: "#/definitions/ErrorResponse" 9957 parameters: 9958 - name: "filters" 9959 in: "query" 9960 description: | 9961 JSON encoded value of the filters (a `map[string][]string`) to process 9962 on the networks list. 9963 9964 Available filters: 9965 9966 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9967 networks that are not in use by a container. When set to `false` 9968 (or `0`), only networks that are in use by one or more 9969 containers are returned. 9970 - `driver=<driver-name>` Matches a network's driver. 9971 - `id=<network-id>` Matches all or part of a network ID. 9972 - `label=<key>` or `label=<key>=<value>` of a network label. 9973 - `name=<network-name>` Matches all or part of a network name. 9974 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 9975 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 9976 type: "string" 9977 tags: ["Network"] 9978 9979 /networks/{id}: 9980 get: 9981 summary: "Inspect a network" 9982 operationId: "NetworkInspect" 9983 produces: 9984 - "application/json" 9985 responses: 9986 200: 9987 description: "No error" 9988 schema: 9989 $ref: "#/definitions/Network" 9990 404: 9991 description: "Network not found" 9992 schema: 9993 $ref: "#/definitions/ErrorResponse" 9994 500: 9995 description: "Server error" 9996 schema: 9997 $ref: "#/definitions/ErrorResponse" 9998 parameters: 9999 - name: "id" 10000 in: "path" 10001 description: "Network ID or name" 10002 required: true 10003 type: "string" 10004 - name: "verbose" 10005 in: "query" 10006 description: "Detailed inspect output for troubleshooting" 10007 type: "boolean" 10008 default: false 10009 - name: "scope" 10010 in: "query" 10011 description: "Filter the network by scope (swarm, global, or local)" 10012 type: "string" 10013 tags: ["Network"] 10014 10015 delete: 10016 summary: "Remove a network" 10017 operationId: "NetworkDelete" 10018 responses: 10019 204: 10020 description: "No error" 10021 403: 10022 description: "operation not supported for pre-defined networks" 10023 schema: 10024 $ref: "#/definitions/ErrorResponse" 10025 404: 10026 description: "no such network" 10027 schema: 10028 $ref: "#/definitions/ErrorResponse" 10029 500: 10030 description: "Server error" 10031 schema: 10032 $ref: "#/definitions/ErrorResponse" 10033 parameters: 10034 - name: "id" 10035 in: "path" 10036 description: "Network ID or name" 10037 required: true 10038 type: "string" 10039 tags: ["Network"] 10040 10041 /networks/create: 10042 post: 10043 summary: "Create a network" 10044 operationId: "NetworkCreate" 10045 consumes: 10046 - "application/json" 10047 produces: 10048 - "application/json" 10049 responses: 10050 201: 10051 description: "No error" 10052 schema: 10053 type: "object" 10054 title: "NetworkCreateResponse" 10055 properties: 10056 Id: 10057 description: "The ID of the created network." 10058 type: "string" 10059 Warning: 10060 type: "string" 10061 example: 10062 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 10063 Warning: "" 10064 400: 10065 description: "bad parameter" 10066 schema: 10067 $ref: "#/definitions/ErrorResponse" 10068 403: 10069 description: | 10070 Forbidden operation. This happens when trying to create a network named after a pre-defined network, 10071 or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. 10072 schema: 10073 $ref: "#/definitions/ErrorResponse" 10074 404: 10075 description: "plugin not found" 10076 schema: 10077 $ref: "#/definitions/ErrorResponse" 10078 500: 10079 description: "Server error" 10080 schema: 10081 $ref: "#/definitions/ErrorResponse" 10082 parameters: 10083 - name: "networkConfig" 10084 in: "body" 10085 description: "Network configuration" 10086 required: true 10087 schema: 10088 type: "object" 10089 title: "NetworkCreateRequest" 10090 required: ["Name"] 10091 properties: 10092 Name: 10093 description: "The network's name." 10094 type: "string" 10095 CheckDuplicate: 10096 description: | 10097 Deprecated: CheckDuplicate is now always enabled. 10098 type: "boolean" 10099 Driver: 10100 description: "Name of the network driver plugin to use." 10101 type: "string" 10102 default: "bridge" 10103 Internal: 10104 description: "Restrict external access to the network." 10105 type: "boolean" 10106 Attachable: 10107 description: | 10108 Globally scoped network is manually attachable by regular 10109 containers from workers in swarm mode. 10110 type: "boolean" 10111 Ingress: 10112 description: | 10113 Ingress network is the network which provides the routing-mesh 10114 in swarm mode. 10115 type: "boolean" 10116 IPAM: 10117 description: "Optional custom IP scheme for the network." 10118 $ref: "#/definitions/IPAM" 10119 EnableIPv6: 10120 description: "Enable IPv6 on the network." 10121 type: "boolean" 10122 Options: 10123 description: "Network specific options to be used by the drivers." 10124 type: "object" 10125 additionalProperties: 10126 type: "string" 10127 Labels: 10128 description: "User-defined key/value metadata." 10129 type: "object" 10130 additionalProperties: 10131 type: "string" 10132 example: 10133 Name: "isolated_nw" 10134 CheckDuplicate: false 10135 Driver: "bridge" 10136 EnableIPv6: true 10137 IPAM: 10138 Driver: "default" 10139 Config: 10140 - Subnet: "172.20.0.0/16" 10141 IPRange: "172.20.10.0/24" 10142 Gateway: "172.20.10.11" 10143 - Subnet: "2001:db8:abcd::/64" 10144 Gateway: "2001:db8:abcd::1011" 10145 Options: 10146 foo: "bar" 10147 Internal: true 10148 Attachable: false 10149 Ingress: false 10150 Options: 10151 com.docker.network.bridge.default_bridge: "true" 10152 com.docker.network.bridge.enable_icc: "true" 10153 com.docker.network.bridge.enable_ip_masquerade: "true" 10154 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 10155 com.docker.network.bridge.name: "docker0" 10156 com.docker.network.driver.mtu: "1500" 10157 Labels: 10158 com.example.some-label: "some-value" 10159 com.example.some-other-label: "some-other-value" 10160 tags: ["Network"] 10161 10162 /networks/{id}/connect: 10163 post: 10164 summary: "Connect a container to a network" 10165 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" 10166 operationId: "NetworkConnect" 10167 consumes: 10168 - "application/json" 10169 responses: 10170 200: 10171 description: "No error" 10172 400: 10173 description: "bad parameter" 10174 schema: 10175 $ref: "#/definitions/ErrorResponse" 10176 403: 10177 description: "Operation forbidden" 10178 schema: 10179 $ref: "#/definitions/ErrorResponse" 10180 404: 10181 description: "Network or container not found" 10182 schema: 10183 $ref: "#/definitions/ErrorResponse" 10184 500: 10185 description: "Server error" 10186 schema: 10187 $ref: "#/definitions/ErrorResponse" 10188 parameters: 10189 - name: "id" 10190 in: "path" 10191 description: "Network ID or name" 10192 required: true 10193 type: "string" 10194 - name: "container" 10195 in: "body" 10196 required: true 10197 schema: 10198 type: "object" 10199 title: "NetworkConnectRequest" 10200 properties: 10201 Container: 10202 type: "string" 10203 description: "The ID or name of the container to connect to the network." 10204 EndpointConfig: 10205 $ref: "#/definitions/EndpointSettings" 10206 example: 10207 Container: "3613f73ba0e4" 10208 EndpointConfig: 10209 IPAMConfig: 10210 IPv4Address: "172.24.56.89" 10211 IPv6Address: "2001:db8::5689" 10212 MacAddress: "02:42:ac:12:05:02" 10213 tags: ["Network"] 10214 10215 /networks/{id}/disconnect: 10216 post: 10217 summary: "Disconnect a container from a network" 10218 operationId: "NetworkDisconnect" 10219 consumes: 10220 - "application/json" 10221 responses: 10222 200: 10223 description: "No error" 10224 403: 10225 description: "Operation not supported for swarm scoped networks" 10226 schema: 10227 $ref: "#/definitions/ErrorResponse" 10228 404: 10229 description: "Network or container not found" 10230 schema: 10231 $ref: "#/definitions/ErrorResponse" 10232 500: 10233 description: "Server error" 10234 schema: 10235 $ref: "#/definitions/ErrorResponse" 10236 parameters: 10237 - name: "id" 10238 in: "path" 10239 description: "Network ID or name" 10240 required: true 10241 type: "string" 10242 - name: "container" 10243 in: "body" 10244 required: true 10245 schema: 10246 type: "object" 10247 title: "NetworkDisconnectRequest" 10248 properties: 10249 Container: 10250 type: "string" 10251 description: | 10252 The ID or name of the container to disconnect from the network. 10253 Force: 10254 type: "boolean" 10255 description: | 10256 Force the container to disconnect from the network. 10257 tags: ["Network"] 10258 /networks/prune: 10259 post: 10260 summary: "Delete unused networks" 10261 produces: 10262 - "application/json" 10263 operationId: "NetworkPrune" 10264 parameters: 10265 - name: "filters" 10266 in: "query" 10267 description: | 10268 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 10269 10270 Available filters: 10271 - `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 10272 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels. 10273 type: "string" 10274 responses: 10275 200: 10276 description: "No error" 10277 schema: 10278 type: "object" 10279 title: "NetworkPruneResponse" 10280 properties: 10281 NetworksDeleted: 10282 description: "Networks that were deleted" 10283 type: "array" 10284 items: 10285 type: "string" 10286 500: 10287 description: "Server error" 10288 schema: 10289 $ref: "#/definitions/ErrorResponse" 10290 tags: ["Network"] 10291 /plugins: 10292 get: 10293 summary: "List plugins" 10294 operationId: "PluginList" 10295 description: "Returns information about installed plugins." 10296 produces: ["application/json"] 10297 responses: 10298 200: 10299 description: "No error" 10300 schema: 10301 type: "array" 10302 items: 10303 $ref: "#/definitions/Plugin" 10304 500: 10305 description: "Server error" 10306 schema: 10307 $ref: "#/definitions/ErrorResponse" 10308 parameters: 10309 - name: "filters" 10310 in: "query" 10311 type: "string" 10312 description: | 10313 A JSON encoded value of the filters (a `map[string][]string`) to 10314 process on the plugin list. 10315 10316 Available filters: 10317 10318 - `capability=<capability name>` 10319 - `enable=<true>|<false>` 10320 tags: ["Plugin"] 10321 10322 /plugins/privileges: 10323 get: 10324 summary: "Get plugin privileges" 10325 operationId: "GetPluginPrivileges" 10326 responses: 10327 200: 10328 description: "no error" 10329 schema: 10330 type: "array" 10331 items: 10332 $ref: "#/definitions/PluginPrivilege" 10333 example: 10334 - Name: "network" 10335 Description: "" 10336 Value: 10337 - "host" 10338 - Name: "mount" 10339 Description: "" 10340 Value: 10341 - "/data" 10342 - Name: "device" 10343 Description: "" 10344 Value: 10345 - "/dev/cpu_dma_latency" 10346 500: 10347 description: "server error" 10348 schema: 10349 $ref: "#/definitions/ErrorResponse" 10350 parameters: 10351 - name: "remote" 10352 in: "query" 10353 description: | 10354 The name of the plugin. The `:latest` tag is optional, and is the 10355 default if omitted. 10356 required: true 10357 type: "string" 10358 tags: 10359 - "Plugin" 10360 10361 /plugins/pull: 10362 post: 10363 summary: "Install a plugin" 10364 operationId: "PluginPull" 10365 description: | 10366 Pulls and installs a plugin. After the plugin is installed, it can be 10367 enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). 10368 produces: 10369 - "application/json" 10370 responses: 10371 204: 10372 description: "no error" 10373 500: 10374 description: "server error" 10375 schema: 10376 $ref: "#/definitions/ErrorResponse" 10377 parameters: 10378 - name: "remote" 10379 in: "query" 10380 description: | 10381 Remote reference for plugin to install. 10382 10383 The `:latest` tag is optional, and is used as the default if omitted. 10384 required: true 10385 type: "string" 10386 - name: "name" 10387 in: "query" 10388 description: | 10389 Local name for the pulled plugin. 10390 10391 The `:latest` tag is optional, and is used as the default if omitted. 10392 required: false 10393 type: "string" 10394 - name: "X-Registry-Auth" 10395 in: "header" 10396 description: | 10397 A base64url-encoded auth configuration to use when pulling a plugin 10398 from a registry. 10399 10400 Refer to the [authentication section](#section/Authentication) for 10401 details. 10402 type: "string" 10403 - name: "body" 10404 in: "body" 10405 schema: 10406 type: "array" 10407 items: 10408 $ref: "#/definitions/PluginPrivilege" 10409 example: 10410 - Name: "network" 10411 Description: "" 10412 Value: 10413 - "host" 10414 - Name: "mount" 10415 Description: "" 10416 Value: 10417 - "/data" 10418 - Name: "device" 10419 Description: "" 10420 Value: 10421 - "/dev/cpu_dma_latency" 10422 tags: ["Plugin"] 10423 /plugins/{name}/json: 10424 get: 10425 summary: "Inspect a plugin" 10426 operationId: "PluginInspect" 10427 responses: 10428 200: 10429 description: "no error" 10430 schema: 10431 $ref: "#/definitions/Plugin" 10432 404: 10433 description: "plugin is not installed" 10434 schema: 10435 $ref: "#/definitions/ErrorResponse" 10436 500: 10437 description: "server error" 10438 schema: 10439 $ref: "#/definitions/ErrorResponse" 10440 parameters: 10441 - name: "name" 10442 in: "path" 10443 description: | 10444 The name of the plugin. The `:latest` tag is optional, and is the 10445 default if omitted. 10446 required: true 10447 type: "string" 10448 tags: ["Plugin"] 10449 /plugins/{name}: 10450 delete: 10451 summary: "Remove a plugin" 10452 operationId: "PluginDelete" 10453 responses: 10454 200: 10455 description: "no error" 10456 schema: 10457 $ref: "#/definitions/Plugin" 10458 404: 10459 description: "plugin is not installed" 10460 schema: 10461 $ref: "#/definitions/ErrorResponse" 10462 500: 10463 description: "server error" 10464 schema: 10465 $ref: "#/definitions/ErrorResponse" 10466 parameters: 10467 - name: "name" 10468 in: "path" 10469 description: | 10470 The name of the plugin. The `:latest` tag is optional, and is the 10471 default if omitted. 10472 required: true 10473 type: "string" 10474 - name: "force" 10475 in: "query" 10476 description: | 10477 Disable the plugin before removing. This may result in issues if the 10478 plugin is in use by a container. 10479 type: "boolean" 10480 default: false 10481 tags: ["Plugin"] 10482 /plugins/{name}/enable: 10483 post: 10484 summary: "Enable a plugin" 10485 operationId: "PluginEnable" 10486 responses: 10487 200: 10488 description: "no error" 10489 404: 10490 description: "plugin is not installed" 10491 schema: 10492 $ref: "#/definitions/ErrorResponse" 10493 500: 10494 description: "server error" 10495 schema: 10496 $ref: "#/definitions/ErrorResponse" 10497 parameters: 10498 - name: "name" 10499 in: "path" 10500 description: | 10501 The name of the plugin. The `:latest` tag is optional, and is the 10502 default if omitted. 10503 required: true 10504 type: "string" 10505 - name: "timeout" 10506 in: "query" 10507 description: "Set the HTTP client timeout (in seconds)" 10508 type: "integer" 10509 default: 0 10510 tags: ["Plugin"] 10511 /plugins/{name}/disable: 10512 post: 10513 summary: "Disable a plugin" 10514 operationId: "PluginDisable" 10515 responses: 10516 200: 10517 description: "no error" 10518 404: 10519 description: "plugin is not installed" 10520 schema: 10521 $ref: "#/definitions/ErrorResponse" 10522 500: 10523 description: "server error" 10524 schema: 10525 $ref: "#/definitions/ErrorResponse" 10526 parameters: 10527 - name: "name" 10528 in: "path" 10529 description: | 10530 The name of the plugin. The `:latest` tag is optional, and is the 10531 default if omitted. 10532 required: true 10533 type: "string" 10534 - name: "force" 10535 in: "query" 10536 description: | 10537 Force disable a plugin even if still in use. 10538 required: false 10539 type: "boolean" 10540 tags: ["Plugin"] 10541 /plugins/{name}/upgrade: 10542 post: 10543 summary: "Upgrade a plugin" 10544 operationId: "PluginUpgrade" 10545 responses: 10546 204: 10547 description: "no error" 10548 404: 10549 description: "plugin not installed" 10550 schema: 10551 $ref: "#/definitions/ErrorResponse" 10552 500: 10553 description: "server error" 10554 schema: 10555 $ref: "#/definitions/ErrorResponse" 10556 parameters: 10557 - name: "name" 10558 in: "path" 10559 description: | 10560 The name of the plugin. The `:latest` tag is optional, and is the 10561 default if omitted. 10562 required: true 10563 type: "string" 10564 - name: "remote" 10565 in: "query" 10566 description: | 10567 Remote reference to upgrade to. 10568 10569 The `:latest` tag is optional, and is used as the default if omitted. 10570 required: true 10571 type: "string" 10572 - name: "X-Registry-Auth" 10573 in: "header" 10574 description: | 10575 A base64url-encoded auth configuration to use when pulling a plugin 10576 from a registry. 10577 10578 Refer to the [authentication section](#section/Authentication) for 10579 details. 10580 type: "string" 10581 - name: "body" 10582 in: "body" 10583 schema: 10584 type: "array" 10585 items: 10586 $ref: "#/definitions/PluginPrivilege" 10587 example: 10588 - Name: "network" 10589 Description: "" 10590 Value: 10591 - "host" 10592 - Name: "mount" 10593 Description: "" 10594 Value: 10595 - "/data" 10596 - Name: "device" 10597 Description: "" 10598 Value: 10599 - "/dev/cpu_dma_latency" 10600 tags: ["Plugin"] 10601 /plugins/create: 10602 post: 10603 summary: "Create a plugin" 10604 operationId: "PluginCreate" 10605 consumes: 10606 - "application/x-tar" 10607 responses: 10608 204: 10609 description: "no error" 10610 500: 10611 description: "server error" 10612 schema: 10613 $ref: "#/definitions/ErrorResponse" 10614 parameters: 10615 - name: "name" 10616 in: "query" 10617 description: | 10618 The name of the plugin. The `:latest` tag is optional, and is the 10619 default if omitted. 10620 required: true 10621 type: "string" 10622 - name: "tarContext" 10623 in: "body" 10624 description: "Path to tar containing plugin rootfs and manifest" 10625 schema: 10626 type: "string" 10627 format: "binary" 10628 tags: ["Plugin"] 10629 /plugins/{name}/push: 10630 post: 10631 summary: "Push a plugin" 10632 operationId: "PluginPush" 10633 description: | 10634 Push a plugin to the registry. 10635 parameters: 10636 - name: "name" 10637 in: "path" 10638 description: | 10639 The name of the plugin. The `:latest` tag is optional, and is the 10640 default if omitted. 10641 required: true 10642 type: "string" 10643 responses: 10644 200: 10645 description: "no error" 10646 404: 10647 description: "plugin not installed" 10648 schema: 10649 $ref: "#/definitions/ErrorResponse" 10650 500: 10651 description: "server error" 10652 schema: 10653 $ref: "#/definitions/ErrorResponse" 10654 tags: ["Plugin"] 10655 /plugins/{name}/set: 10656 post: 10657 summary: "Configure a plugin" 10658 operationId: "PluginSet" 10659 consumes: 10660 - "application/json" 10661 parameters: 10662 - name: "name" 10663 in: "path" 10664 description: | 10665 The name of the plugin. The `:latest` tag is optional, and is the 10666 default if omitted. 10667 required: true 10668 type: "string" 10669 - name: "body" 10670 in: "body" 10671 schema: 10672 type: "array" 10673 items: 10674 type: "string" 10675 example: ["DEBUG=1"] 10676 responses: 10677 204: 10678 description: "No error" 10679 404: 10680 description: "Plugin not installed" 10681 schema: 10682 $ref: "#/definitions/ErrorResponse" 10683 500: 10684 description: "Server error" 10685 schema: 10686 $ref: "#/definitions/ErrorResponse" 10687 tags: ["Plugin"] 10688 /nodes: 10689 get: 10690 summary: "List nodes" 10691 operationId: "NodeList" 10692 responses: 10693 200: 10694 description: "no error" 10695 schema: 10696 type: "array" 10697 items: 10698 $ref: "#/definitions/Node" 10699 500: 10700 description: "server error" 10701 schema: 10702 $ref: "#/definitions/ErrorResponse" 10703 503: 10704 description: "node is not part of a swarm" 10705 schema: 10706 $ref: "#/definitions/ErrorResponse" 10707 parameters: 10708 - name: "filters" 10709 in: "query" 10710 description: | 10711 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 10712 10713 Available filters: 10714 - `id=<node id>` 10715 - `label=<engine label>` 10716 - `membership=`(`accepted`|`pending`)` 10717 - `name=<node name>` 10718 - `node.label=<node label>` 10719 - `role=`(`manager`|`worker`)` 10720 type: "string" 10721 tags: ["Node"] 10722 /nodes/{id}: 10723 get: 10724 summary: "Inspect a node" 10725 operationId: "NodeInspect" 10726 responses: 10727 200: 10728 description: "no error" 10729 schema: 10730 $ref: "#/definitions/Node" 10731 404: 10732 description: "no such node" 10733 schema: 10734 $ref: "#/definitions/ErrorResponse" 10735 500: 10736 description: "server error" 10737 schema: 10738 $ref: "#/definitions/ErrorResponse" 10739 503: 10740 description: "node is not part of a swarm" 10741 schema: 10742 $ref: "#/definitions/ErrorResponse" 10743 parameters: 10744 - name: "id" 10745 in: "path" 10746 description: "The ID or name of the node" 10747 type: "string" 10748 required: true 10749 tags: ["Node"] 10750 delete: 10751 summary: "Delete a node" 10752 operationId: "NodeDelete" 10753 responses: 10754 200: 10755 description: "no error" 10756 404: 10757 description: "no such node" 10758 schema: 10759 $ref: "#/definitions/ErrorResponse" 10760 500: 10761 description: "server error" 10762 schema: 10763 $ref: "#/definitions/ErrorResponse" 10764 503: 10765 description: "node is not part of a swarm" 10766 schema: 10767 $ref: "#/definitions/ErrorResponse" 10768 parameters: 10769 - name: "id" 10770 in: "path" 10771 description: "The ID or name of the node" 10772 type: "string" 10773 required: true 10774 - name: "force" 10775 in: "query" 10776 description: "Force remove a node from the swarm" 10777 default: false 10778 type: "boolean" 10779 tags: ["Node"] 10780 /nodes/{id}/update: 10781 post: 10782 summary: "Update a node" 10783 operationId: "NodeUpdate" 10784 responses: 10785 200: 10786 description: "no error" 10787 400: 10788 description: "bad parameter" 10789 schema: 10790 $ref: "#/definitions/ErrorResponse" 10791 404: 10792 description: "no such node" 10793 schema: 10794 $ref: "#/definitions/ErrorResponse" 10795 500: 10796 description: "server error" 10797 schema: 10798 $ref: "#/definitions/ErrorResponse" 10799 503: 10800 description: "node is not part of a swarm" 10801 schema: 10802 $ref: "#/definitions/ErrorResponse" 10803 parameters: 10804 - name: "id" 10805 in: "path" 10806 description: "The ID of the node" 10807 type: "string" 10808 required: true 10809 - name: "body" 10810 in: "body" 10811 schema: 10812 $ref: "#/definitions/NodeSpec" 10813 - name: "version" 10814 in: "query" 10815 description: | 10816 The version number of the node object being updated. This is required 10817 to avoid conflicting writes. 10818 type: "integer" 10819 format: "int64" 10820 required: true 10821 tags: ["Node"] 10822 /swarm: 10823 get: 10824 summary: "Inspect swarm" 10825 operationId: "SwarmInspect" 10826 responses: 10827 200: 10828 description: "no error" 10829 schema: 10830 $ref: "#/definitions/Swarm" 10831 404: 10832 description: "no such swarm" 10833 schema: 10834 $ref: "#/definitions/ErrorResponse" 10835 500: 10836 description: "server error" 10837 schema: 10838 $ref: "#/definitions/ErrorResponse" 10839 503: 10840 description: "node is not part of a swarm" 10841 schema: 10842 $ref: "#/definitions/ErrorResponse" 10843 tags: ["Swarm"] 10844 /swarm/init: 10845 post: 10846 summary: "Initialize a new swarm" 10847 operationId: "SwarmInit" 10848 produces: 10849 - "application/json" 10850 - "text/plain" 10851 responses: 10852 200: 10853 description: "no error" 10854 schema: 10855 description: "The node ID" 10856 type: "string" 10857 example: "7v2t30z9blmxuhnyo6s4cpenp" 10858 400: 10859 description: "bad parameter" 10860 schema: 10861 $ref: "#/definitions/ErrorResponse" 10862 500: 10863 description: "server error" 10864 schema: 10865 $ref: "#/definitions/ErrorResponse" 10866 503: 10867 description: "node is already part of a swarm" 10868 schema: 10869 $ref: "#/definitions/ErrorResponse" 10870 parameters: 10871 - name: "body" 10872 in: "body" 10873 required: true 10874 schema: 10875 type: "object" 10876 title: "SwarmInitRequest" 10877 properties: 10878 ListenAddr: 10879 description: | 10880 Listen address used for inter-manager communication, as well 10881 as determining the networking interface used for the VXLAN 10882 Tunnel Endpoint (VTEP). This can either be an address/port 10883 combination in the form `192.168.1.1:4567`, or an interface 10884 followed by a port number, like `eth0:4567`. If the port number 10885 is omitted, the default swarm listening port is used. 10886 type: "string" 10887 AdvertiseAddr: 10888 description: | 10889 Externally reachable address advertised to other nodes. This 10890 can either be an address/port combination in the form 10891 `192.168.1.1:4567`, or an interface followed by a port number, 10892 like `eth0:4567`. If the port number is omitted, the port 10893 number from the listen address is used. If `AdvertiseAddr` is 10894 not specified, it will be automatically detected when possible. 10895 type: "string" 10896 DataPathAddr: 10897 description: | 10898 Address or interface to use for data path traffic (format: 10899 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10900 like `eth0`. If `DataPathAddr` is unspecified, the same address 10901 as `AdvertiseAddr` is used. 10902 10903 The `DataPathAddr` specifies the address that global scope 10904 network drivers will publish towards other nodes in order to 10905 reach the containers running on this node. Using this parameter 10906 it is possible to separate the container data traffic from the 10907 management traffic of the cluster. 10908 type: "string" 10909 DataPathPort: 10910 description: | 10911 DataPathPort specifies the data path port number for data traffic. 10912 Acceptable port range is 1024 to 49151. 10913 if no port is set or is set to 0, default port 4789 will be used. 10914 type: "integer" 10915 format: "uint32" 10916 DefaultAddrPool: 10917 description: | 10918 Default Address Pool specifies default subnet pools for global 10919 scope networks. 10920 type: "array" 10921 items: 10922 type: "string" 10923 example: ["10.10.0.0/16", "20.20.0.0/16"] 10924 ForceNewCluster: 10925 description: "Force creation of a new swarm." 10926 type: "boolean" 10927 SubnetSize: 10928 description: | 10929 SubnetSize specifies the subnet size of the networks created 10930 from the default subnet pool. 10931 type: "integer" 10932 format: "uint32" 10933 Spec: 10934 $ref: "#/definitions/SwarmSpec" 10935 example: 10936 ListenAddr: "0.0.0.0:2377" 10937 AdvertiseAddr: "192.168.1.1:2377" 10938 DataPathPort: 4789 10939 DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] 10940 SubnetSize: 24 10941 ForceNewCluster: false 10942 Spec: 10943 Orchestration: {} 10944 Raft: {} 10945 Dispatcher: {} 10946 CAConfig: {} 10947 EncryptionConfig: 10948 AutoLockManagers: false 10949 tags: ["Swarm"] 10950 /swarm/join: 10951 post: 10952 summary: "Join an existing swarm" 10953 operationId: "SwarmJoin" 10954 responses: 10955 200: 10956 description: "no error" 10957 400: 10958 description: "bad parameter" 10959 schema: 10960 $ref: "#/definitions/ErrorResponse" 10961 500: 10962 description: "server error" 10963 schema: 10964 $ref: "#/definitions/ErrorResponse" 10965 503: 10966 description: "node is already part of a swarm" 10967 schema: 10968 $ref: "#/definitions/ErrorResponse" 10969 parameters: 10970 - name: "body" 10971 in: "body" 10972 required: true 10973 schema: 10974 type: "object" 10975 title: "SwarmJoinRequest" 10976 properties: 10977 ListenAddr: 10978 description: | 10979 Listen address used for inter-manager communication if the node 10980 gets promoted to manager, as well as determining the networking 10981 interface used for the VXLAN Tunnel Endpoint (VTEP). 10982 type: "string" 10983 AdvertiseAddr: 10984 description: | 10985 Externally reachable address advertised to other nodes. This 10986 can either be an address/port combination in the form 10987 `192.168.1.1:4567`, or an interface followed by a port number, 10988 like `eth0:4567`. If the port number is omitted, the port 10989 number from the listen address is used. If `AdvertiseAddr` is 10990 not specified, it will be automatically detected when possible. 10991 type: "string" 10992 DataPathAddr: 10993 description: | 10994 Address or interface to use for data path traffic (format: 10995 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10996 like `eth0`. If `DataPathAddr` is unspecified, the same address 10997 as `AdvertiseAddr` is used. 10998 10999 The `DataPathAddr` specifies the address that global scope 11000 network drivers will publish towards other nodes in order to 11001 reach the containers running on this node. Using this parameter 11002 it is possible to separate the container data traffic from the 11003 management traffic of the cluster. 11004 11005 type: "string" 11006 RemoteAddrs: 11007 description: | 11008 Addresses of manager nodes already participating in the swarm. 11009 type: "array" 11010 items: 11011 type: "string" 11012 JoinToken: 11013 description: "Secret token for joining this swarm." 11014 type: "string" 11015 example: 11016 ListenAddr: "0.0.0.0:2377" 11017 AdvertiseAddr: "192.168.1.1:2377" 11018 RemoteAddrs: 11019 - "node1:2377" 11020 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 11021 tags: ["Swarm"] 11022 /swarm/leave: 11023 post: 11024 summary: "Leave a swarm" 11025 operationId: "SwarmLeave" 11026 responses: 11027 200: 11028 description: "no error" 11029 500: 11030 description: "server error" 11031 schema: 11032 $ref: "#/definitions/ErrorResponse" 11033 503: 11034 description: "node is not part of a swarm" 11035 schema: 11036 $ref: "#/definitions/ErrorResponse" 11037 parameters: 11038 - name: "force" 11039 description: | 11040 Force leave swarm, even if this is the last manager or that it will 11041 break the cluster. 11042 in: "query" 11043 type: "boolean" 11044 default: false 11045 tags: ["Swarm"] 11046 /swarm/update: 11047 post: 11048 summary: "Update a swarm" 11049 operationId: "SwarmUpdate" 11050 responses: 11051 200: 11052 description: "no error" 11053 400: 11054 description: "bad parameter" 11055 schema: 11056 $ref: "#/definitions/ErrorResponse" 11057 500: 11058 description: "server error" 11059 schema: 11060 $ref: "#/definitions/ErrorResponse" 11061 503: 11062 description: "node is not part of a swarm" 11063 schema: 11064 $ref: "#/definitions/ErrorResponse" 11065 parameters: 11066 - name: "body" 11067 in: "body" 11068 required: true 11069 schema: 11070 $ref: "#/definitions/SwarmSpec" 11071 - name: "version" 11072 in: "query" 11073 description: | 11074 The version number of the swarm object being updated. This is 11075 required to avoid conflicting writes. 11076 type: "integer" 11077 format: "int64" 11078 required: true 11079 - name: "rotateWorkerToken" 11080 in: "query" 11081 description: "Rotate the worker join token." 11082 type: "boolean" 11083 default: false 11084 - name: "rotateManagerToken" 11085 in: "query" 11086 description: "Rotate the manager join token." 11087 type: "boolean" 11088 default: false 11089 - name: "rotateManagerUnlockKey" 11090 in: "query" 11091 description: "Rotate the manager unlock key." 11092 type: "boolean" 11093 default: false 11094 tags: ["Swarm"] 11095 /swarm/unlockkey: 11096 get: 11097 summary: "Get the unlock key" 11098 operationId: "SwarmUnlockkey" 11099 consumes: 11100 - "application/json" 11101 responses: 11102 200: 11103 description: "no error" 11104 schema: 11105 type: "object" 11106 title: "UnlockKeyResponse" 11107 properties: 11108 UnlockKey: 11109 description: "The swarm's unlock key." 11110 type: "string" 11111 example: 11112 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 11113 500: 11114 description: "server error" 11115 schema: 11116 $ref: "#/definitions/ErrorResponse" 11117 503: 11118 description: "node is not part of a swarm" 11119 schema: 11120 $ref: "#/definitions/ErrorResponse" 11121 tags: ["Swarm"] 11122 /swarm/unlock: 11123 post: 11124 summary: "Unlock a locked manager" 11125 operationId: "SwarmUnlock" 11126 consumes: 11127 - "application/json" 11128 produces: 11129 - "application/json" 11130 parameters: 11131 - name: "body" 11132 in: "body" 11133 required: true 11134 schema: 11135 type: "object" 11136 title: "SwarmUnlockRequest" 11137 properties: 11138 UnlockKey: 11139 description: "The swarm's unlock key." 11140 type: "string" 11141 example: 11142 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 11143 responses: 11144 200: 11145 description: "no error" 11146 500: 11147 description: "server error" 11148 schema: 11149 $ref: "#/definitions/ErrorResponse" 11150 503: 11151 description: "node is not part of a swarm" 11152 schema: 11153 $ref: "#/definitions/ErrorResponse" 11154 tags: ["Swarm"] 11155 /services: 11156 get: 11157 summary: "List services" 11158 operationId: "ServiceList" 11159 responses: 11160 200: 11161 description: "no error" 11162 schema: 11163 type: "array" 11164 items: 11165 $ref: "#/definitions/Service" 11166 500: 11167 description: "server error" 11168 schema: 11169 $ref: "#/definitions/ErrorResponse" 11170 503: 11171 description: "node is not part of a swarm" 11172 schema: 11173 $ref: "#/definitions/ErrorResponse" 11174 parameters: 11175 - name: "filters" 11176 in: "query" 11177 type: "string" 11178 description: | 11179 A JSON encoded value of the filters (a `map[string][]string`) to 11180 process on the services list. 11181 11182 Available filters: 11183 11184 - `id=<service id>` 11185 - `label=<service label>` 11186 - `mode=["replicated"|"global"]` 11187 - `name=<service name>` 11188 - name: "status" 11189 in: "query" 11190 type: "boolean" 11191 description: | 11192 Include service status, with count of running and desired tasks. 11193 tags: ["Service"] 11194 /services/create: 11195 post: 11196 summary: "Create a service" 11197 operationId: "ServiceCreate" 11198 consumes: 11199 - "application/json" 11200 produces: 11201 - "application/json" 11202 responses: 11203 201: 11204 description: "no error" 11205 schema: 11206 $ref: "#/definitions/ServiceCreateResponse" 11207 400: 11208 description: "bad parameter" 11209 schema: 11210 $ref: "#/definitions/ErrorResponse" 11211 403: 11212 description: "network is not eligible for services" 11213 schema: 11214 $ref: "#/definitions/ErrorResponse" 11215 409: 11216 description: "name conflicts with an existing service" 11217 schema: 11218 $ref: "#/definitions/ErrorResponse" 11219 500: 11220 description: "server error" 11221 schema: 11222 $ref: "#/definitions/ErrorResponse" 11223 503: 11224 description: "node is not part of a swarm" 11225 schema: 11226 $ref: "#/definitions/ErrorResponse" 11227 parameters: 11228 - name: "body" 11229 in: "body" 11230 required: true 11231 schema: 11232 allOf: 11233 - $ref: "#/definitions/ServiceSpec" 11234 - type: "object" 11235 example: 11236 Name: "web" 11237 TaskTemplate: 11238 ContainerSpec: 11239 Image: "nginx:alpine" 11240 Mounts: 11241 - 11242 ReadOnly: true 11243 Source: "web-data" 11244 Target: "/usr/share/nginx/html" 11245 Type: "volume" 11246 VolumeOptions: 11247 DriverConfig: {} 11248 Labels: 11249 com.example.something: "something-value" 11250 Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] 11251 User: "33" 11252 DNSConfig: 11253 Nameservers: ["8.8.8.8"] 11254 Search: ["example.org"] 11255 Options: ["timeout:3"] 11256 Secrets: 11257 - 11258 File: 11259 Name: "www.example.org.key" 11260 UID: "33" 11261 GID: "33" 11262 Mode: 384 11263 SecretID: "fpjqlhnwb19zds35k8wn80lq9" 11264 SecretName: "example_org_domain_key" 11265 LogDriver: 11266 Name: "json-file" 11267 Options: 11268 max-file: "3" 11269 max-size: "10M" 11270 Placement: {} 11271 Resources: 11272 Limits: 11273 MemoryBytes: 104857600 11274 Reservations: {} 11275 RestartPolicy: 11276 Condition: "on-failure" 11277 Delay: 10000000000 11278 MaxAttempts: 10 11279 Mode: 11280 Replicated: 11281 Replicas: 4 11282 UpdateConfig: 11283 Parallelism: 2 11284 Delay: 1000000000 11285 FailureAction: "pause" 11286 Monitor: 15000000000 11287 MaxFailureRatio: 0.15 11288 RollbackConfig: 11289 Parallelism: 1 11290 Delay: 1000000000 11291 FailureAction: "pause" 11292 Monitor: 15000000000 11293 MaxFailureRatio: 0.15 11294 EndpointSpec: 11295 Ports: 11296 - 11297 Protocol: "tcp" 11298 PublishedPort: 8080 11299 TargetPort: 80 11300 Labels: 11301 foo: "bar" 11302 - name: "X-Registry-Auth" 11303 in: "header" 11304 description: | 11305 A base64url-encoded auth configuration for pulling from private 11306 registries. 11307 11308 Refer to the [authentication section](#section/Authentication) for 11309 details. 11310 type: "string" 11311 tags: ["Service"] 11312 /services/{id}: 11313 get: 11314 summary: "Inspect a service" 11315 operationId: "ServiceInspect" 11316 responses: 11317 200: 11318 description: "no error" 11319 schema: 11320 $ref: "#/definitions/Service" 11321 404: 11322 description: "no such service" 11323 schema: 11324 $ref: "#/definitions/ErrorResponse" 11325 500: 11326 description: "server error" 11327 schema: 11328 $ref: "#/definitions/ErrorResponse" 11329 503: 11330 description: "node is not part of a swarm" 11331 schema: 11332 $ref: "#/definitions/ErrorResponse" 11333 parameters: 11334 - name: "id" 11335 in: "path" 11336 description: "ID or name of service." 11337 required: true 11338 type: "string" 11339 - name: "insertDefaults" 11340 in: "query" 11341 description: "Fill empty fields with default values." 11342 type: "boolean" 11343 default: false 11344 tags: ["Service"] 11345 delete: 11346 summary: "Delete a service" 11347 operationId: "ServiceDelete" 11348 responses: 11349 200: 11350 description: "no error" 11351 404: 11352 description: "no such service" 11353 schema: 11354 $ref: "#/definitions/ErrorResponse" 11355 500: 11356 description: "server error" 11357 schema: 11358 $ref: "#/definitions/ErrorResponse" 11359 503: 11360 description: "node is not part of a swarm" 11361 schema: 11362 $ref: "#/definitions/ErrorResponse" 11363 parameters: 11364 - name: "id" 11365 in: "path" 11366 description: "ID or name of service." 11367 required: true 11368 type: "string" 11369 tags: ["Service"] 11370 /services/{id}/update: 11371 post: 11372 summary: "Update a service" 11373 operationId: "ServiceUpdate" 11374 consumes: ["application/json"] 11375 produces: ["application/json"] 11376 responses: 11377 200: 11378 description: "no error" 11379 schema: 11380 $ref: "#/definitions/ServiceUpdateResponse" 11381 400: 11382 description: "bad parameter" 11383 schema: 11384 $ref: "#/definitions/ErrorResponse" 11385 404: 11386 description: "no such service" 11387 schema: 11388 $ref: "#/definitions/ErrorResponse" 11389 500: 11390 description: "server error" 11391 schema: 11392 $ref: "#/definitions/ErrorResponse" 11393 503: 11394 description: "node is not part of a swarm" 11395 schema: 11396 $ref: "#/definitions/ErrorResponse" 11397 parameters: 11398 - name: "id" 11399 in: "path" 11400 description: "ID or name of service." 11401 required: true 11402 type: "string" 11403 - name: "body" 11404 in: "body" 11405 required: true 11406 schema: 11407 allOf: 11408 - $ref: "#/definitions/ServiceSpec" 11409 - type: "object" 11410 example: 11411 Name: "top" 11412 TaskTemplate: 11413 ContainerSpec: 11414 Image: "busybox" 11415 Args: 11416 - "top" 11417 Resources: 11418 Limits: {} 11419 Reservations: {} 11420 RestartPolicy: 11421 Condition: "any" 11422 MaxAttempts: 0 11423 Placement: {} 11424 ForceUpdate: 0 11425 Mode: 11426 Replicated: 11427 Replicas: 1 11428 UpdateConfig: 11429 Parallelism: 2 11430 Delay: 1000000000 11431 FailureAction: "pause" 11432 Monitor: 15000000000 11433 MaxFailureRatio: 0.15 11434 RollbackConfig: 11435 Parallelism: 1 11436 Delay: 1000000000 11437 FailureAction: "pause" 11438 Monitor: 15000000000 11439 MaxFailureRatio: 0.15 11440 EndpointSpec: 11441 Mode: "vip" 11442 11443 - name: "version" 11444 in: "query" 11445 description: | 11446 The version number of the service object being updated. This is 11447 required to avoid conflicting writes. 11448 This version number should be the value as currently set on the 11449 service *before* the update. You can find the current version by 11450 calling `GET /services/{id}` 11451 required: true 11452 type: "integer" 11453 - name: "registryAuthFrom" 11454 in: "query" 11455 description: | 11456 If the `X-Registry-Auth` header is not specified, this parameter 11457 indicates where to find registry authorization credentials. 11458 type: "string" 11459 enum: ["spec", "previous-spec"] 11460 default: "spec" 11461 - name: "rollback" 11462 in: "query" 11463 description: | 11464 Set to this parameter to `previous` to cause a server-side rollback 11465 to the previous service spec. The supplied spec will be ignored in 11466 this case. 11467 type: "string" 11468 - name: "X-Registry-Auth" 11469 in: "header" 11470 description: | 11471 A base64url-encoded auth configuration for pulling from private 11472 registries. 11473 11474 Refer to the [authentication section](#section/Authentication) for 11475 details. 11476 type: "string" 11477 11478 tags: ["Service"] 11479 /services/{id}/logs: 11480 get: 11481 summary: "Get service logs" 11482 description: | 11483 Get `stdout` and `stderr` logs from a service. See also 11484 [`/containers/{id}/logs`](#operation/ContainerLogs). 11485 11486 **Note**: This endpoint works only for services with the `local`, 11487 `json-file` or `journald` logging drivers. 11488 produces: 11489 - "application/vnd.docker.raw-stream" 11490 - "application/vnd.docker.multiplexed-stream" 11491 operationId: "ServiceLogs" 11492 responses: 11493 200: 11494 description: "logs returned as a stream in response body" 11495 schema: 11496 type: "string" 11497 format: "binary" 11498 404: 11499 description: "no such service" 11500 schema: 11501 $ref: "#/definitions/ErrorResponse" 11502 examples: 11503 application/json: 11504 message: "No such service: c2ada9df5af8" 11505 500: 11506 description: "server error" 11507 schema: 11508 $ref: "#/definitions/ErrorResponse" 11509 503: 11510 description: "node is not part of a swarm" 11511 schema: 11512 $ref: "#/definitions/ErrorResponse" 11513 parameters: 11514 - name: "id" 11515 in: "path" 11516 required: true 11517 description: "ID or name of the service" 11518 type: "string" 11519 - name: "details" 11520 in: "query" 11521 description: "Show service context and extra details provided to logs." 11522 type: "boolean" 11523 default: false 11524 - name: "follow" 11525 in: "query" 11526 description: "Keep connection after returning logs." 11527 type: "boolean" 11528 default: false 11529 - name: "stdout" 11530 in: "query" 11531 description: "Return logs from `stdout`" 11532 type: "boolean" 11533 default: false 11534 - name: "stderr" 11535 in: "query" 11536 description: "Return logs from `stderr`" 11537 type: "boolean" 11538 default: false 11539 - name: "since" 11540 in: "query" 11541 description: "Only return logs since this time, as a UNIX timestamp" 11542 type: "integer" 11543 default: 0 11544 - name: "timestamps" 11545 in: "query" 11546 description: "Add timestamps to every log line" 11547 type: "boolean" 11548 default: false 11549 - name: "tail" 11550 in: "query" 11551 description: | 11552 Only return this number of log lines from the end of the logs. 11553 Specify as an integer or `all` to output all log lines. 11554 type: "string" 11555 default: "all" 11556 tags: ["Service"] 11557 /tasks: 11558 get: 11559 summary: "List tasks" 11560 operationId: "TaskList" 11561 produces: 11562 - "application/json" 11563 responses: 11564 200: 11565 description: "no error" 11566 schema: 11567 type: "array" 11568 items: 11569 $ref: "#/definitions/Task" 11570 example: 11571 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 11572 Version: 11573 Index: 71 11574 CreatedAt: "2016-06-07T21:07:31.171892745Z" 11575 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 11576 Spec: 11577 ContainerSpec: 11578 Image: "redis" 11579 Resources: 11580 Limits: {} 11581 Reservations: {} 11582 RestartPolicy: 11583 Condition: "any" 11584 MaxAttempts: 0 11585 Placement: {} 11586 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11587 Slot: 1 11588 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11589 Status: 11590 Timestamp: "2016-06-07T21:07:31.290032978Z" 11591 State: "running" 11592 Message: "started" 11593 ContainerStatus: 11594 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 11595 PID: 677 11596 DesiredState: "running" 11597 NetworksAttachments: 11598 - Network: 11599 ID: "4qvuz4ko70xaltuqbt8956gd1" 11600 Version: 11601 Index: 18 11602 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11603 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11604 Spec: 11605 Name: "ingress" 11606 Labels: 11607 com.docker.swarm.internal: "true" 11608 DriverConfiguration: {} 11609 IPAMOptions: 11610 Driver: {} 11611 Configs: 11612 - Subnet: "10.255.0.0/16" 11613 Gateway: "10.255.0.1" 11614 DriverState: 11615 Name: "overlay" 11616 Options: 11617 com.docker.network.driver.overlay.vxlanid_list: "256" 11618 IPAMOptions: 11619 Driver: 11620 Name: "default" 11621 Configs: 11622 - Subnet: "10.255.0.0/16" 11623 Gateway: "10.255.0.1" 11624 Addresses: 11625 - "10.255.0.10/16" 11626 - ID: "1yljwbmlr8er2waf8orvqpwms" 11627 Version: 11628 Index: 30 11629 CreatedAt: "2016-06-07T21:07:30.019104782Z" 11630 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 11631 Name: "hopeful_cori" 11632 Spec: 11633 ContainerSpec: 11634 Image: "redis" 11635 Resources: 11636 Limits: {} 11637 Reservations: {} 11638 RestartPolicy: 11639 Condition: "any" 11640 MaxAttempts: 0 11641 Placement: {} 11642 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11643 Slot: 1 11644 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11645 Status: 11646 Timestamp: "2016-06-07T21:07:30.202183143Z" 11647 State: "shutdown" 11648 Message: "shutdown" 11649 ContainerStatus: 11650 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 11651 DesiredState: "shutdown" 11652 NetworksAttachments: 11653 - Network: 11654 ID: "4qvuz4ko70xaltuqbt8956gd1" 11655 Version: 11656 Index: 18 11657 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11658 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11659 Spec: 11660 Name: "ingress" 11661 Labels: 11662 com.docker.swarm.internal: "true" 11663 DriverConfiguration: {} 11664 IPAMOptions: 11665 Driver: {} 11666 Configs: 11667 - Subnet: "10.255.0.0/16" 11668 Gateway: "10.255.0.1" 11669 DriverState: 11670 Name: "overlay" 11671 Options: 11672 com.docker.network.driver.overlay.vxlanid_list: "256" 11673 IPAMOptions: 11674 Driver: 11675 Name: "default" 11676 Configs: 11677 - Subnet: "10.255.0.0/16" 11678 Gateway: "10.255.0.1" 11679 Addresses: 11680 - "10.255.0.5/16" 11681 500: 11682 description: "server error" 11683 schema: 11684 $ref: "#/definitions/ErrorResponse" 11685 503: 11686 description: "node is not part of a swarm" 11687 schema: 11688 $ref: "#/definitions/ErrorResponse" 11689 parameters: 11690 - name: "filters" 11691 in: "query" 11692 type: "string" 11693 description: | 11694 A JSON encoded value of the filters (a `map[string][]string`) to 11695 process on the tasks list. 11696 11697 Available filters: 11698 11699 - `desired-state=(running | shutdown | accepted)` 11700 - `id=<task id>` 11701 - `label=key` or `label="key=value"` 11702 - `name=<task name>` 11703 - `node=<node id or name>` 11704 - `service=<service name>` 11705 tags: ["Task"] 11706 /tasks/{id}: 11707 get: 11708 summary: "Inspect a task" 11709 operationId: "TaskInspect" 11710 produces: 11711 - "application/json" 11712 responses: 11713 200: 11714 description: "no error" 11715 schema: 11716 $ref: "#/definitions/Task" 11717 404: 11718 description: "no such task" 11719 schema: 11720 $ref: "#/definitions/ErrorResponse" 11721 500: 11722 description: "server error" 11723 schema: 11724 $ref: "#/definitions/ErrorResponse" 11725 503: 11726 description: "node is not part of a swarm" 11727 schema: 11728 $ref: "#/definitions/ErrorResponse" 11729 parameters: 11730 - name: "id" 11731 in: "path" 11732 description: "ID of the task" 11733 required: true 11734 type: "string" 11735 tags: ["Task"] 11736 /tasks/{id}/logs: 11737 get: 11738 summary: "Get task logs" 11739 description: | 11740 Get `stdout` and `stderr` logs from a task. 11741 See also [`/containers/{id}/logs`](#operation/ContainerLogs). 11742 11743 **Note**: This endpoint works only for services with the `local`, 11744 `json-file` or `journald` logging drivers. 11745 operationId: "TaskLogs" 11746 produces: 11747 - "application/vnd.docker.raw-stream" 11748 - "application/vnd.docker.multiplexed-stream" 11749 responses: 11750 200: 11751 description: "logs returned as a stream in response body" 11752 schema: 11753 type: "string" 11754 format: "binary" 11755 404: 11756 description: "no such task" 11757 schema: 11758 $ref: "#/definitions/ErrorResponse" 11759 examples: 11760 application/json: 11761 message: "No such task: c2ada9df5af8" 11762 500: 11763 description: "server error" 11764 schema: 11765 $ref: "#/definitions/ErrorResponse" 11766 503: 11767 description: "node is not part of a swarm" 11768 schema: 11769 $ref: "#/definitions/ErrorResponse" 11770 parameters: 11771 - name: "id" 11772 in: "path" 11773 required: true 11774 description: "ID of the task" 11775 type: "string" 11776 - name: "details" 11777 in: "query" 11778 description: "Show task context and extra details provided to logs." 11779 type: "boolean" 11780 default: false 11781 - name: "follow" 11782 in: "query" 11783 description: "Keep connection after returning logs." 11784 type: "boolean" 11785 default: false 11786 - name: "stdout" 11787 in: "query" 11788 description: "Return logs from `stdout`" 11789 type: "boolean" 11790 default: false 11791 - name: "stderr" 11792 in: "query" 11793 description: "Return logs from `stderr`" 11794 type: "boolean" 11795 default: false 11796 - name: "since" 11797 in: "query" 11798 description: "Only return logs since this time, as a UNIX timestamp" 11799 type: "integer" 11800 default: 0 11801 - name: "timestamps" 11802 in: "query" 11803 description: "Add timestamps to every log line" 11804 type: "boolean" 11805 default: false 11806 - name: "tail" 11807 in: "query" 11808 description: | 11809 Only return this number of log lines from the end of the logs. 11810 Specify as an integer or `all` to output all log lines. 11811 type: "string" 11812 default: "all" 11813 tags: ["Task"] 11814 /secrets: 11815 get: 11816 summary: "List secrets" 11817 operationId: "SecretList" 11818 produces: 11819 - "application/json" 11820 responses: 11821 200: 11822 description: "no error" 11823 schema: 11824 type: "array" 11825 items: 11826 $ref: "#/definitions/Secret" 11827 example: 11828 - ID: "blt1owaxmitz71s9v5zh81zun" 11829 Version: 11830 Index: 85 11831 CreatedAt: "2017-07-20T13:55:28.678958722Z" 11832 UpdatedAt: "2017-07-20T13:55:28.678958722Z" 11833 Spec: 11834 Name: "mysql-passwd" 11835 Labels: 11836 some.label: "some.value" 11837 Driver: 11838 Name: "secret-bucket" 11839 Options: 11840 OptionA: "value for driver option A" 11841 OptionB: "value for driver option B" 11842 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 11843 Version: 11844 Index: 11 11845 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11846 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11847 Spec: 11848 Name: "app-dev.crt" 11849 Labels: 11850 foo: "bar" 11851 500: 11852 description: "server error" 11853 schema: 11854 $ref: "#/definitions/ErrorResponse" 11855 503: 11856 description: "node is not part of a swarm" 11857 schema: 11858 $ref: "#/definitions/ErrorResponse" 11859 parameters: 11860 - name: "filters" 11861 in: "query" 11862 type: "string" 11863 description: | 11864 A JSON encoded value of the filters (a `map[string][]string`) to 11865 process on the secrets list. 11866 11867 Available filters: 11868 11869 - `id=<secret id>` 11870 - `label=<key> or label=<key>=value` 11871 - `name=<secret name>` 11872 - `names=<secret name>` 11873 tags: ["Secret"] 11874 /secrets/create: 11875 post: 11876 summary: "Create a secret" 11877 operationId: "SecretCreate" 11878 consumes: 11879 - "application/json" 11880 produces: 11881 - "application/json" 11882 responses: 11883 201: 11884 description: "no error" 11885 schema: 11886 $ref: "#/definitions/IdResponse" 11887 409: 11888 description: "name conflicts with an existing object" 11889 schema: 11890 $ref: "#/definitions/ErrorResponse" 11891 500: 11892 description: "server error" 11893 schema: 11894 $ref: "#/definitions/ErrorResponse" 11895 503: 11896 description: "node is not part of a swarm" 11897 schema: 11898 $ref: "#/definitions/ErrorResponse" 11899 parameters: 11900 - name: "body" 11901 in: "body" 11902 schema: 11903 allOf: 11904 - $ref: "#/definitions/SecretSpec" 11905 - type: "object" 11906 example: 11907 Name: "app-key.crt" 11908 Labels: 11909 foo: "bar" 11910 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11911 Driver: 11912 Name: "secret-bucket" 11913 Options: 11914 OptionA: "value for driver option A" 11915 OptionB: "value for driver option B" 11916 tags: ["Secret"] 11917 /secrets/{id}: 11918 get: 11919 summary: "Inspect a secret" 11920 operationId: "SecretInspect" 11921 produces: 11922 - "application/json" 11923 responses: 11924 200: 11925 description: "no error" 11926 schema: 11927 $ref: "#/definitions/Secret" 11928 examples: 11929 application/json: 11930 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11931 Version: 11932 Index: 11 11933 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11934 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11935 Spec: 11936 Name: "app-dev.crt" 11937 Labels: 11938 foo: "bar" 11939 Driver: 11940 Name: "secret-bucket" 11941 Options: 11942 OptionA: "value for driver option A" 11943 OptionB: "value for driver option B" 11944 11945 404: 11946 description: "secret not found" 11947 schema: 11948 $ref: "#/definitions/ErrorResponse" 11949 500: 11950 description: "server error" 11951 schema: 11952 $ref: "#/definitions/ErrorResponse" 11953 503: 11954 description: "node is not part of a swarm" 11955 schema: 11956 $ref: "#/definitions/ErrorResponse" 11957 parameters: 11958 - name: "id" 11959 in: "path" 11960 required: true 11961 type: "string" 11962 description: "ID of the secret" 11963 tags: ["Secret"] 11964 delete: 11965 summary: "Delete a secret" 11966 operationId: "SecretDelete" 11967 produces: 11968 - "application/json" 11969 responses: 11970 204: 11971 description: "no error" 11972 404: 11973 description: "secret not found" 11974 schema: 11975 $ref: "#/definitions/ErrorResponse" 11976 500: 11977 description: "server error" 11978 schema: 11979 $ref: "#/definitions/ErrorResponse" 11980 503: 11981 description: "node is not part of a swarm" 11982 schema: 11983 $ref: "#/definitions/ErrorResponse" 11984 parameters: 11985 - name: "id" 11986 in: "path" 11987 required: true 11988 type: "string" 11989 description: "ID of the secret" 11990 tags: ["Secret"] 11991 /secrets/{id}/update: 11992 post: 11993 summary: "Update a Secret" 11994 operationId: "SecretUpdate" 11995 responses: 11996 200: 11997 description: "no error" 11998 400: 11999 description: "bad parameter" 12000 schema: 12001 $ref: "#/definitions/ErrorResponse" 12002 404: 12003 description: "no such secret" 12004 schema: 12005 $ref: "#/definitions/ErrorResponse" 12006 500: 12007 description: "server error" 12008 schema: 12009 $ref: "#/definitions/ErrorResponse" 12010 503: 12011 description: "node is not part of a swarm" 12012 schema: 12013 $ref: "#/definitions/ErrorResponse" 12014 parameters: 12015 - name: "id" 12016 in: "path" 12017 description: "The ID or name of the secret" 12018 type: "string" 12019 required: true 12020 - name: "body" 12021 in: "body" 12022 schema: 12023 $ref: "#/definitions/SecretSpec" 12024 description: | 12025 The spec of the secret to update. Currently, only the Labels field 12026 can be updated. All other fields must remain unchanged from the 12027 [SecretInspect endpoint](#operation/SecretInspect) response values. 12028 - name: "version" 12029 in: "query" 12030 description: | 12031 The version number of the secret object being updated. This is 12032 required to avoid conflicting writes. 12033 type: "integer" 12034 format: "int64" 12035 required: true 12036 tags: ["Secret"] 12037 /configs: 12038 get: 12039 summary: "List configs" 12040 operationId: "ConfigList" 12041 produces: 12042 - "application/json" 12043 responses: 12044 200: 12045 description: "no error" 12046 schema: 12047 type: "array" 12048 items: 12049 $ref: "#/definitions/Config" 12050 example: 12051 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 12052 Version: 12053 Index: 11 12054 CreatedAt: "2016-11-05T01:20:17.327670065Z" 12055 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 12056 Spec: 12057 Name: "server.conf" 12058 500: 12059 description: "server error" 12060 schema: 12061 $ref: "#/definitions/ErrorResponse" 12062 503: 12063 description: "node is not part of a swarm" 12064 schema: 12065 $ref: "#/definitions/ErrorResponse" 12066 parameters: 12067 - name: "filters" 12068 in: "query" 12069 type: "string" 12070 description: | 12071 A JSON encoded value of the filters (a `map[string][]string`) to 12072 process on the configs list. 12073 12074 Available filters: 12075 12076 - `id=<config id>` 12077 - `label=<key> or label=<key>=value` 12078 - `name=<config name>` 12079 - `names=<config name>` 12080 tags: ["Config"] 12081 /configs/create: 12082 post: 12083 summary: "Create a config" 12084 operationId: "ConfigCreate" 12085 consumes: 12086 - "application/json" 12087 produces: 12088 - "application/json" 12089 responses: 12090 201: 12091 description: "no error" 12092 schema: 12093 $ref: "#/definitions/IdResponse" 12094 409: 12095 description: "name conflicts with an existing object" 12096 schema: 12097 $ref: "#/definitions/ErrorResponse" 12098 500: 12099 description: "server error" 12100 schema: 12101 $ref: "#/definitions/ErrorResponse" 12102 503: 12103 description: "node is not part of a swarm" 12104 schema: 12105 $ref: "#/definitions/ErrorResponse" 12106 parameters: 12107 - name: "body" 12108 in: "body" 12109 schema: 12110 allOf: 12111 - $ref: "#/definitions/ConfigSpec" 12112 - type: "object" 12113 example: 12114 Name: "server.conf" 12115 Labels: 12116 foo: "bar" 12117 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 12118 tags: ["Config"] 12119 /configs/{id}: 12120 get: 12121 summary: "Inspect a config" 12122 operationId: "ConfigInspect" 12123 produces: 12124 - "application/json" 12125 responses: 12126 200: 12127 description: "no error" 12128 schema: 12129 $ref: "#/definitions/Config" 12130 examples: 12131 application/json: 12132 ID: "ktnbjxoalbkvbvedmg1urrz8h" 12133 Version: 12134 Index: 11 12135 CreatedAt: "2016-11-05T01:20:17.327670065Z" 12136 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 12137 Spec: 12138 Name: "app-dev.crt" 12139 404: 12140 description: "config not found" 12141 schema: 12142 $ref: "#/definitions/ErrorResponse" 12143 500: 12144 description: "server error" 12145 schema: 12146 $ref: "#/definitions/ErrorResponse" 12147 503: 12148 description: "node is not part of a swarm" 12149 schema: 12150 $ref: "#/definitions/ErrorResponse" 12151 parameters: 12152 - name: "id" 12153 in: "path" 12154 required: true 12155 type: "string" 12156 description: "ID of the config" 12157 tags: ["Config"] 12158 delete: 12159 summary: "Delete a config" 12160 operationId: "ConfigDelete" 12161 produces: 12162 - "application/json" 12163 responses: 12164 204: 12165 description: "no error" 12166 404: 12167 description: "config not found" 12168 schema: 12169 $ref: "#/definitions/ErrorResponse" 12170 500: 12171 description: "server error" 12172 schema: 12173 $ref: "#/definitions/ErrorResponse" 12174 503: 12175 description: "node is not part of a swarm" 12176 schema: 12177 $ref: "#/definitions/ErrorResponse" 12178 parameters: 12179 - name: "id" 12180 in: "path" 12181 required: true 12182 type: "string" 12183 description: "ID of the config" 12184 tags: ["Config"] 12185 /configs/{id}/update: 12186 post: 12187 summary: "Update a Config" 12188 operationId: "ConfigUpdate" 12189 responses: 12190 200: 12191 description: "no error" 12192 400: 12193 description: "bad parameter" 12194 schema: 12195 $ref: "#/definitions/ErrorResponse" 12196 404: 12197 description: "no such config" 12198 schema: 12199 $ref: "#/definitions/ErrorResponse" 12200 500: 12201 description: "server error" 12202 schema: 12203 $ref: "#/definitions/ErrorResponse" 12204 503: 12205 description: "node is not part of a swarm" 12206 schema: 12207 $ref: "#/definitions/ErrorResponse" 12208 parameters: 12209 - name: "id" 12210 in: "path" 12211 description: "The ID or name of the config" 12212 type: "string" 12213 required: true 12214 - name: "body" 12215 in: "body" 12216 schema: 12217 $ref: "#/definitions/ConfigSpec" 12218 description: | 12219 The spec of the config to update. Currently, only the Labels field 12220 can be updated. All other fields must remain unchanged from the 12221 [ConfigInspect endpoint](#operation/ConfigInspect) response values. 12222 - name: "version" 12223 in: "query" 12224 description: | 12225 The version number of the config object being updated. This is 12226 required to avoid conflicting writes. 12227 type: "integer" 12228 format: "int64" 12229 required: true 12230 tags: ["Config"] 12231 /distribution/{name}/json: 12232 get: 12233 summary: "Get image information from the registry" 12234 description: | 12235 Return image digest and platform information by contacting the registry. 12236 operationId: "DistributionInspect" 12237 produces: 12238 - "application/json" 12239 responses: 12240 200: 12241 description: "descriptor and platform information" 12242 schema: 12243 $ref: "#/definitions/DistributionInspect" 12244 401: 12245 description: "Failed authentication or no image found" 12246 schema: 12247 $ref: "#/definitions/ErrorResponse" 12248 examples: 12249 application/json: 12250 message: "No such image: someimage (tag: latest)" 12251 500: 12252 description: "Server error" 12253 schema: 12254 $ref: "#/definitions/ErrorResponse" 12255 parameters: 12256 - name: "name" 12257 in: "path" 12258 description: "Image name or id" 12259 type: "string" 12260 required: true 12261 tags: ["Distribution"] 12262 /session: 12263 post: 12264 summary: "Initialize interactive session" 12265 description: | 12266 Start a new interactive session with a server. Session allows server to 12267 call back to the client for advanced capabilities. 12268 12269 ### Hijacking 12270 12271 This endpoint hijacks the HTTP connection to HTTP2 transport that allows 12272 the client to expose gPRC services on that connection. 12273 12274 For example, the client sends this request to upgrade the connection: 12275 12276 ``` 12277 POST /session HTTP/1.1 12278 Upgrade: h2c 12279 Connection: Upgrade 12280 ``` 12281 12282 The Docker daemon responds with a `101 UPGRADED` response follow with 12283 the raw stream: 12284 12285 ``` 12286 HTTP/1.1 101 UPGRADED 12287 Connection: Upgrade 12288 Upgrade: h2c 12289 ``` 12290 operationId: "Session" 12291 produces: 12292 - "application/vnd.docker.raw-stream" 12293 responses: 12294 101: 12295 description: "no error, hijacking successful" 12296 400: 12297 description: "bad parameter" 12298 schema: 12299 $ref: "#/definitions/ErrorResponse" 12300 500: 12301 description: "server error" 12302 schema: 12303 $ref: "#/definitions/ErrorResponse" 12304 tags: ["Session"]