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