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