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