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