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