github.com/adityamillind98/moby@v23.0.0-rc.4+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: "logentries" 2966 - Type: "Log" 2967 Name: "splunk" 2968 - Type: "Log" 2969 Name: "syslog" 2970 - Type: "Network" 2971 Name: "bridge" 2972 - Type: "Network" 2973 Name: "host" 2974 - Type: "Network" 2975 Name: "ipvlan" 2976 - Type: "Network" 2977 Name: "macvlan" 2978 - Type: "Network" 2979 Name: "null" 2980 - Type: "Network" 2981 Name: "overlay" 2982 - Type: "Volume" 2983 Name: "local" 2984 - Type: "Volume" 2985 Name: "localhost:5000/vieux/sshfs:latest" 2986 - Type: "Volume" 2987 Name: "vieux/sshfs:latest" 2988 2989 TLSInfo: 2990 description: | 2991 Information about the issuer of leaf TLS certificates and the trusted root 2992 CA certificate. 2993 type: "object" 2994 properties: 2995 TrustRoot: 2996 description: | 2997 The root CA certificate(s) that are used to validate leaf TLS 2998 certificates. 2999 type: "string" 3000 CertIssuerSubject: 3001 description: 3002 The base64-url-safe-encoded raw subject bytes of the issuer. 3003 type: "string" 3004 CertIssuerPublicKey: 3005 description: | 3006 The base64-url-safe-encoded raw public key bytes of the issuer. 3007 type: "string" 3008 example: 3009 TrustRoot: | 3010 -----BEGIN CERTIFICATE----- 3011 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 3012 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 3013 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 3014 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 3015 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 3016 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 3017 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 3018 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 3019 -----END CERTIFICATE----- 3020 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 3021 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 3022 3023 NodeStatus: 3024 description: | 3025 NodeStatus represents the status of a node. 3026 3027 It provides the current status of the node, as seen by the manager. 3028 type: "object" 3029 properties: 3030 State: 3031 $ref: "#/definitions/NodeState" 3032 Message: 3033 type: "string" 3034 example: "" 3035 Addr: 3036 description: "IP address of the node." 3037 type: "string" 3038 example: "172.17.0.2" 3039 3040 NodeState: 3041 description: "NodeState represents the state of a node." 3042 type: "string" 3043 enum: 3044 - "unknown" 3045 - "down" 3046 - "ready" 3047 - "disconnected" 3048 example: "ready" 3049 3050 ManagerStatus: 3051 description: | 3052 ManagerStatus represents the status of a manager. 3053 3054 It provides the current status of a node's manager component, if the node 3055 is a manager. 3056 x-nullable: true 3057 type: "object" 3058 properties: 3059 Leader: 3060 type: "boolean" 3061 default: false 3062 example: true 3063 Reachability: 3064 $ref: "#/definitions/Reachability" 3065 Addr: 3066 description: | 3067 The IP address and port at which the manager is reachable. 3068 type: "string" 3069 example: "10.0.0.46:2377" 3070 3071 Reachability: 3072 description: "Reachability represents the reachability of a node." 3073 type: "string" 3074 enum: 3075 - "unknown" 3076 - "unreachable" 3077 - "reachable" 3078 example: "reachable" 3079 3080 SwarmSpec: 3081 description: "User modifiable swarm configuration." 3082 type: "object" 3083 properties: 3084 Name: 3085 description: "Name of the swarm." 3086 type: "string" 3087 example: "default" 3088 Labels: 3089 description: "User-defined key/value metadata." 3090 type: "object" 3091 additionalProperties: 3092 type: "string" 3093 example: 3094 com.example.corp.type: "production" 3095 com.example.corp.department: "engineering" 3096 Orchestration: 3097 description: "Orchestration configuration." 3098 type: "object" 3099 x-nullable: true 3100 properties: 3101 TaskHistoryRetentionLimit: 3102 description: | 3103 The number of historic tasks to keep per instance or node. If 3104 negative, never remove completed or failed tasks. 3105 type: "integer" 3106 format: "int64" 3107 example: 10 3108 Raft: 3109 description: "Raft configuration." 3110 type: "object" 3111 properties: 3112 SnapshotInterval: 3113 description: "The number of log entries between snapshots." 3114 type: "integer" 3115 format: "uint64" 3116 example: 10000 3117 KeepOldSnapshots: 3118 description: | 3119 The number of snapshots to keep beyond the current snapshot. 3120 type: "integer" 3121 format: "uint64" 3122 LogEntriesForSlowFollowers: 3123 description: | 3124 The number of log entries to keep around to sync up slow followers 3125 after a snapshot is created. 3126 type: "integer" 3127 format: "uint64" 3128 example: 500 3129 ElectionTick: 3130 description: | 3131 The number of ticks that a follower will wait for a message from 3132 the leader before becoming a candidate and starting an election. 3133 `ElectionTick` must be greater than `HeartbeatTick`. 3134 3135 A tick currently defaults to one second, so these translate 3136 directly to seconds currently, but this is NOT guaranteed. 3137 type: "integer" 3138 example: 3 3139 HeartbeatTick: 3140 description: | 3141 The number of ticks between heartbeats. Every HeartbeatTick ticks, 3142 the leader will send a heartbeat to the followers. 3143 3144 A tick currently defaults to one second, so these translate 3145 directly to seconds currently, but this is NOT guaranteed. 3146 type: "integer" 3147 example: 1 3148 Dispatcher: 3149 description: "Dispatcher configuration." 3150 type: "object" 3151 x-nullable: true 3152 properties: 3153 HeartbeatPeriod: 3154 description: | 3155 The delay for an agent to send a heartbeat to the dispatcher. 3156 type: "integer" 3157 format: "int64" 3158 example: 5000000000 3159 CAConfig: 3160 description: "CA configuration." 3161 type: "object" 3162 x-nullable: true 3163 properties: 3164 NodeCertExpiry: 3165 description: "The duration node certificates are issued for." 3166 type: "integer" 3167 format: "int64" 3168 example: 7776000000000000 3169 ExternalCAs: 3170 description: | 3171 Configuration for forwarding signing requests to an external 3172 certificate authority. 3173 type: "array" 3174 items: 3175 type: "object" 3176 properties: 3177 Protocol: 3178 description: | 3179 Protocol for communication with the external CA (currently 3180 only `cfssl` is supported). 3181 type: "string" 3182 enum: 3183 - "cfssl" 3184 default: "cfssl" 3185 URL: 3186 description: | 3187 URL where certificate signing requests should be sent. 3188 type: "string" 3189 Options: 3190 description: | 3191 An object with key/value pairs that are interpreted as 3192 protocol-specific options for the external CA driver. 3193 type: "object" 3194 additionalProperties: 3195 type: "string" 3196 CACert: 3197 description: | 3198 The root CA certificate (in PEM format) this external CA uses 3199 to issue TLS certificates (assumed to be to the current swarm 3200 root CA certificate if not provided). 3201 type: "string" 3202 SigningCACert: 3203 description: | 3204 The desired signing CA certificate for all swarm node TLS leaf 3205 certificates, in PEM format. 3206 type: "string" 3207 SigningCAKey: 3208 description: | 3209 The desired signing CA key for all swarm node TLS leaf certificates, 3210 in PEM format. 3211 type: "string" 3212 ForceRotate: 3213 description: | 3214 An integer whose purpose is to force swarm to generate a new 3215 signing CA certificate and key, if none have been specified in 3216 `SigningCACert` and `SigningCAKey` 3217 format: "uint64" 3218 type: "integer" 3219 EncryptionConfig: 3220 description: "Parameters related to encryption-at-rest." 3221 type: "object" 3222 properties: 3223 AutoLockManagers: 3224 description: | 3225 If set, generate a key and use it to lock data stored on the 3226 managers. 3227 type: "boolean" 3228 example: false 3229 TaskDefaults: 3230 description: "Defaults for creating tasks in this cluster." 3231 type: "object" 3232 properties: 3233 LogDriver: 3234 description: | 3235 The log driver to use for tasks created in the orchestrator if 3236 unspecified by a service. 3237 3238 Updating this value only affects new tasks. Existing tasks continue 3239 to use their previously configured log driver until recreated. 3240 type: "object" 3241 properties: 3242 Name: 3243 description: | 3244 The log driver to use as a default for new tasks. 3245 type: "string" 3246 example: "json-file" 3247 Options: 3248 description: | 3249 Driver-specific options for the selectd log driver, specified 3250 as key/value pairs. 3251 type: "object" 3252 additionalProperties: 3253 type: "string" 3254 example: 3255 "max-file": "10" 3256 "max-size": "100m" 3257 3258 # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but 3259 # without `JoinTokens`. 3260 ClusterInfo: 3261 description: | 3262 ClusterInfo represents information about the swarm as is returned by the 3263 "/info" endpoint. Join-tokens are not included. 3264 x-nullable: true 3265 type: "object" 3266 properties: 3267 ID: 3268 description: "The ID of the swarm." 3269 type: "string" 3270 example: "abajmipo7b4xz5ip2nrla6b11" 3271 Version: 3272 $ref: "#/definitions/ObjectVersion" 3273 CreatedAt: 3274 description: | 3275 Date and time at which the swarm was initialised in 3276 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 3277 type: "string" 3278 format: "dateTime" 3279 example: "2016-08-18T10:44:24.496525531Z" 3280 UpdatedAt: 3281 description: | 3282 Date and time at which the swarm was last updated in 3283 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 3284 type: "string" 3285 format: "dateTime" 3286 example: "2017-08-09T07:09:37.632105588Z" 3287 Spec: 3288 $ref: "#/definitions/SwarmSpec" 3289 TLSInfo: 3290 $ref: "#/definitions/TLSInfo" 3291 RootRotationInProgress: 3292 description: | 3293 Whether there is currently a root CA rotation in progress for the swarm 3294 type: "boolean" 3295 example: false 3296 DataPathPort: 3297 description: | 3298 DataPathPort specifies the data path port number for data traffic. 3299 Acceptable port range is 1024 to 49151. 3300 If no port is set or is set to 0, the default port (4789) is used. 3301 type: "integer" 3302 format: "uint32" 3303 default: 4789 3304 example: 4789 3305 DefaultAddrPool: 3306 description: | 3307 Default Address Pool specifies default subnet pools for global scope 3308 networks. 3309 type: "array" 3310 items: 3311 type: "string" 3312 format: "CIDR" 3313 example: ["10.10.0.0/16", "20.20.0.0/16"] 3314 SubnetSize: 3315 description: | 3316 SubnetSize specifies the subnet size of the networks created from the 3317 default subnet pool. 3318 type: "integer" 3319 format: "uint32" 3320 maximum: 29 3321 default: 24 3322 example: 24 3323 3324 JoinTokens: 3325 description: | 3326 JoinTokens contains the tokens workers and managers need to join the swarm. 3327 type: "object" 3328 properties: 3329 Worker: 3330 description: | 3331 The token workers can use to join the swarm. 3332 type: "string" 3333 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" 3334 Manager: 3335 description: | 3336 The token managers can use to join the swarm. 3337 type: "string" 3338 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 3339 3340 Swarm: 3341 type: "object" 3342 allOf: 3343 - $ref: "#/definitions/ClusterInfo" 3344 - type: "object" 3345 properties: 3346 JoinTokens: 3347 $ref: "#/definitions/JoinTokens" 3348 3349 TaskSpec: 3350 description: "User modifiable task configuration." 3351 type: "object" 3352 properties: 3353 PluginSpec: 3354 type: "object" 3355 description: | 3356 Plugin spec for the service. *(Experimental release only.)* 3357 3358 <p><br /></p> 3359 3360 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3361 > mutually exclusive. PluginSpec is only used when the Runtime field 3362 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3363 > field is set to `attachment`. 3364 properties: 3365 Name: 3366 description: "The name or 'alias' to use for the plugin." 3367 type: "string" 3368 Remote: 3369 description: "The plugin image reference to use." 3370 type: "string" 3371 Disabled: 3372 description: "Disable the plugin once scheduled." 3373 type: "boolean" 3374 PluginPrivilege: 3375 type: "array" 3376 items: 3377 $ref: "#/definitions/PluginPrivilege" 3378 ContainerSpec: 3379 type: "object" 3380 description: | 3381 Container spec for the service. 3382 3383 <p><br /></p> 3384 3385 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3386 > mutually exclusive. PluginSpec is only used when the Runtime field 3387 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3388 > field is set to `attachment`. 3389 properties: 3390 Image: 3391 description: "The image name to use for the container" 3392 type: "string" 3393 Labels: 3394 description: "User-defined key/value data." 3395 type: "object" 3396 additionalProperties: 3397 type: "string" 3398 Command: 3399 description: "The command to be run in the image." 3400 type: "array" 3401 items: 3402 type: "string" 3403 Args: 3404 description: "Arguments to the command." 3405 type: "array" 3406 items: 3407 type: "string" 3408 Hostname: 3409 description: | 3410 The hostname to use for the container, as a valid 3411 [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. 3412 type: "string" 3413 Env: 3414 description: | 3415 A list of environment variables in the form `VAR=value`. 3416 type: "array" 3417 items: 3418 type: "string" 3419 Dir: 3420 description: "The working directory for commands to run in." 3421 type: "string" 3422 User: 3423 description: "The user inside the container." 3424 type: "string" 3425 Groups: 3426 type: "array" 3427 description: | 3428 A list of additional groups that the container process will run as. 3429 items: 3430 type: "string" 3431 Privileges: 3432 type: "object" 3433 description: "Security options for the container" 3434 properties: 3435 CredentialSpec: 3436 type: "object" 3437 description: "CredentialSpec for managed service account (Windows only)" 3438 properties: 3439 Config: 3440 type: "string" 3441 example: "0bt9dmxjvjiqermk6xrop3ekq" 3442 description: | 3443 Load credential spec from a Swarm Config with the given ID. 3444 The specified config must also be present in the Configs 3445 field with the Runtime property set. 3446 3447 <p><br /></p> 3448 3449 3450 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3451 > and `CredentialSpec.Config` are mutually exclusive. 3452 File: 3453 type: "string" 3454 example: "spec.json" 3455 description: | 3456 Load credential spec from this file. The file is read by 3457 the daemon, and must be present in the `CredentialSpecs` 3458 subdirectory in the docker data directory, which defaults 3459 to `C:\ProgramData\Docker\` on Windows. 3460 3461 For example, specifying `spec.json` loads 3462 `C:\ProgramData\Docker\CredentialSpecs\spec.json`. 3463 3464 <p><br /></p> 3465 3466 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3467 > and `CredentialSpec.Config` are mutually exclusive. 3468 Registry: 3469 type: "string" 3470 description: | 3471 Load credential spec from this value in the Windows 3472 registry. The specified registry value must be located in: 3473 3474 `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` 3475 3476 <p><br /></p> 3477 3478 3479 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3480 > and `CredentialSpec.Config` are mutually exclusive. 3481 SELinuxContext: 3482 type: "object" 3483 description: "SELinux labels of the container" 3484 properties: 3485 Disable: 3486 type: "boolean" 3487 description: "Disable SELinux" 3488 User: 3489 type: "string" 3490 description: "SELinux user label" 3491 Role: 3492 type: "string" 3493 description: "SELinux role label" 3494 Type: 3495 type: "string" 3496 description: "SELinux type label" 3497 Level: 3498 type: "string" 3499 description: "SELinux level label" 3500 TTY: 3501 description: "Whether a pseudo-TTY should be allocated." 3502 type: "boolean" 3503 OpenStdin: 3504 description: "Open `stdin`" 3505 type: "boolean" 3506 ReadOnly: 3507 description: "Mount the container's root filesystem as read only." 3508 type: "boolean" 3509 Mounts: 3510 description: | 3511 Specification for mounts to be added to containers created as part 3512 of the service. 3513 type: "array" 3514 items: 3515 $ref: "#/definitions/Mount" 3516 StopSignal: 3517 description: "Signal to stop the container." 3518 type: "string" 3519 StopGracePeriod: 3520 description: | 3521 Amount of time to wait for the container to terminate before 3522 forcefully killing it. 3523 type: "integer" 3524 format: "int64" 3525 HealthCheck: 3526 $ref: "#/definitions/HealthConfig" 3527 Hosts: 3528 type: "array" 3529 description: | 3530 A list of hostname/IP mappings to add to the container's `hosts` 3531 file. The format of extra hosts is specified in the 3532 [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) 3533 man page: 3534 3535 IP_address canonical_hostname [aliases...] 3536 items: 3537 type: "string" 3538 DNSConfig: 3539 description: | 3540 Specification for DNS related configurations in resolver configuration 3541 file (`resolv.conf`). 3542 type: "object" 3543 properties: 3544 Nameservers: 3545 description: "The IP addresses of the name servers." 3546 type: "array" 3547 items: 3548 type: "string" 3549 Search: 3550 description: "A search list for host-name lookup." 3551 type: "array" 3552 items: 3553 type: "string" 3554 Options: 3555 description: | 3556 A list of internal resolver variables to be modified (e.g., 3557 `debug`, `ndots:3`, etc.). 3558 type: "array" 3559 items: 3560 type: "string" 3561 Secrets: 3562 description: | 3563 Secrets contains references to zero or more secrets that will be 3564 exposed to the service. 3565 type: "array" 3566 items: 3567 type: "object" 3568 properties: 3569 File: 3570 description: | 3571 File represents a specific target that is backed by a file. 3572 type: "object" 3573 properties: 3574 Name: 3575 description: | 3576 Name represents the final filename in the filesystem. 3577 type: "string" 3578 UID: 3579 description: "UID represents the file UID." 3580 type: "string" 3581 GID: 3582 description: "GID represents the file GID." 3583 type: "string" 3584 Mode: 3585 description: "Mode represents the FileMode of the file." 3586 type: "integer" 3587 format: "uint32" 3588 SecretID: 3589 description: | 3590 SecretID represents the ID of the specific secret that we're 3591 referencing. 3592 type: "string" 3593 SecretName: 3594 description: | 3595 SecretName is the name of the secret that this references, 3596 but this is just provided for lookup/display purposes. The 3597 secret in the reference will be identified by its ID. 3598 type: "string" 3599 Configs: 3600 description: | 3601 Configs contains references to zero or more configs that will be 3602 exposed to the service. 3603 type: "array" 3604 items: 3605 type: "object" 3606 properties: 3607 File: 3608 description: | 3609 File represents a specific target that is backed by a file. 3610 3611 <p><br /><p> 3612 3613 > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive 3614 type: "object" 3615 properties: 3616 Name: 3617 description: | 3618 Name represents the final filename in the filesystem. 3619 type: "string" 3620 UID: 3621 description: "UID represents the file UID." 3622 type: "string" 3623 GID: 3624 description: "GID represents the file GID." 3625 type: "string" 3626 Mode: 3627 description: "Mode represents the FileMode of the file." 3628 type: "integer" 3629 format: "uint32" 3630 Runtime: 3631 description: | 3632 Runtime represents a target that is not mounted into the 3633 container but is used by the task 3634 3635 <p><br /><p> 3636 3637 > **Note**: `Configs.File` and `Configs.Runtime` are mutually 3638 > exclusive 3639 type: "object" 3640 ConfigID: 3641 description: | 3642 ConfigID represents the ID of the specific config that we're 3643 referencing. 3644 type: "string" 3645 ConfigName: 3646 description: | 3647 ConfigName is the name of the config that this references, 3648 but this is just provided for lookup/display purposes. The 3649 config in the reference will be identified by its ID. 3650 type: "string" 3651 Isolation: 3652 type: "string" 3653 description: | 3654 Isolation technology of the containers running the service. 3655 (Windows only) 3656 enum: 3657 - "default" 3658 - "process" 3659 - "hyperv" 3660 Init: 3661 description: | 3662 Run an init inside the container that forwards signals and reaps 3663 processes. This field is omitted if empty, and the default (as 3664 configured on the daemon) is used. 3665 type: "boolean" 3666 x-nullable: true 3667 Sysctls: 3668 description: | 3669 Set kernel namedspaced parameters (sysctls) in the container. 3670 The Sysctls option on services accepts the same sysctls as the 3671 are supported on containers. Note that while the same sysctls are 3672 supported, no guarantees or checks are made about their 3673 suitability for a clustered environment, and it's up to the user 3674 to determine whether a given sysctl will work properly in a 3675 Service. 3676 type: "object" 3677 additionalProperties: 3678 type: "string" 3679 # This option is not used by Windows containers 3680 CapabilityAdd: 3681 type: "array" 3682 description: | 3683 A list of kernel capabilities to add to the default set 3684 for the container. 3685 items: 3686 type: "string" 3687 example: 3688 - "CAP_NET_RAW" 3689 - "CAP_SYS_ADMIN" 3690 - "CAP_SYS_CHROOT" 3691 - "CAP_SYSLOG" 3692 CapabilityDrop: 3693 type: "array" 3694 description: | 3695 A list of kernel capabilities to drop from the default set 3696 for the container. 3697 items: 3698 type: "string" 3699 example: 3700 - "CAP_NET_RAW" 3701 Ulimits: 3702 description: | 3703 A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" 3704 type: "array" 3705 items: 3706 type: "object" 3707 properties: 3708 Name: 3709 description: "Name of ulimit" 3710 type: "string" 3711 Soft: 3712 description: "Soft limit" 3713 type: "integer" 3714 Hard: 3715 description: "Hard limit" 3716 type: "integer" 3717 NetworkAttachmentSpec: 3718 description: | 3719 Read-only spec type for non-swarm containers attached to swarm overlay 3720 networks. 3721 3722 <p><br /></p> 3723 3724 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3725 > mutually exclusive. PluginSpec is only used when the Runtime field 3726 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3727 > field is set to `attachment`. 3728 type: "object" 3729 properties: 3730 ContainerID: 3731 description: "ID of the container represented by this task" 3732 type: "string" 3733 Resources: 3734 description: | 3735 Resource requirements which apply to each individual container created 3736 as part of the service. 3737 type: "object" 3738 properties: 3739 Limits: 3740 description: "Define resources limits." 3741 $ref: "#/definitions/Limit" 3742 Reservations: 3743 description: "Define resources reservation." 3744 $ref: "#/definitions/ResourceObject" 3745 RestartPolicy: 3746 description: | 3747 Specification for the restart policy which applies to containers 3748 created as part of this service. 3749 type: "object" 3750 properties: 3751 Condition: 3752 description: "Condition for restart." 3753 type: "string" 3754 enum: 3755 - "none" 3756 - "on-failure" 3757 - "any" 3758 Delay: 3759 description: "Delay between restart attempts." 3760 type: "integer" 3761 format: "int64" 3762 MaxAttempts: 3763 description: | 3764 Maximum attempts to restart a given container before giving up 3765 (default value is 0, which is ignored). 3766 type: "integer" 3767 format: "int64" 3768 default: 0 3769 Window: 3770 description: | 3771 Windows is the time window used to evaluate the restart policy 3772 (default value is 0, which is unbounded). 3773 type: "integer" 3774 format: "int64" 3775 default: 0 3776 Placement: 3777 type: "object" 3778 properties: 3779 Constraints: 3780 description: | 3781 An array of constraint expressions to limit the set of nodes where 3782 a task can be scheduled. Constraint expressions can either use a 3783 _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find 3784 nodes that satisfy every expression (AND match). Constraints can 3785 match node or Docker Engine labels as follows: 3786 3787 node attribute | matches | example 3788 ---------------------|--------------------------------|----------------------------------------------- 3789 `node.id` | Node ID | `node.id==2ivku8v2gvtg4` 3790 `node.hostname` | Node hostname | `node.hostname!=node-2` 3791 `node.role` | Node role (`manager`/`worker`) | `node.role==manager` 3792 `node.platform.os` | Node operating system | `node.platform.os==windows` 3793 `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` 3794 `node.labels` | User-defined node labels | `node.labels.security==high` 3795 `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` 3796 3797 `engine.labels` apply to Docker Engine labels like operating system, 3798 drivers, etc. Swarm administrators add `node.labels` for operational 3799 purposes by using the [`node update endpoint`](#operation/NodeUpdate). 3800 3801 type: "array" 3802 items: 3803 type: "string" 3804 example: 3805 - "node.hostname!=node3.corp.example.com" 3806 - "node.role!=manager" 3807 - "node.labels.type==production" 3808 - "node.platform.os==linux" 3809 - "node.platform.arch==x86_64" 3810 Preferences: 3811 description: | 3812 Preferences provide a way to make the scheduler aware of factors 3813 such as topology. They are provided in order from highest to 3814 lowest precedence. 3815 type: "array" 3816 items: 3817 type: "object" 3818 properties: 3819 Spread: 3820 type: "object" 3821 properties: 3822 SpreadDescriptor: 3823 description: | 3824 label descriptor, such as `engine.labels.az`. 3825 type: "string" 3826 example: 3827 - Spread: 3828 SpreadDescriptor: "node.labels.datacenter" 3829 - Spread: 3830 SpreadDescriptor: "node.labels.rack" 3831 MaxReplicas: 3832 description: | 3833 Maximum number of replicas for per node (default value is 0, which 3834 is unlimited) 3835 type: "integer" 3836 format: "int64" 3837 default: 0 3838 Platforms: 3839 description: | 3840 Platforms stores all the platforms that the service's image can 3841 run on. This field is used in the platform filter for scheduling. 3842 If empty, then the platform filter is off, meaning there are no 3843 scheduling restrictions. 3844 type: "array" 3845 items: 3846 $ref: "#/definitions/Platform" 3847 ForceUpdate: 3848 description: | 3849 A counter that triggers an update even if no relevant parameters have 3850 been changed. 3851 type: "integer" 3852 Runtime: 3853 description: | 3854 Runtime is the type of runtime specified for the task executor. 3855 type: "string" 3856 Networks: 3857 description: "Specifies which networks the service should attach to." 3858 type: "array" 3859 items: 3860 $ref: "#/definitions/NetworkAttachmentConfig" 3861 LogDriver: 3862 description: | 3863 Specifies the log driver to use for tasks created from this spec. If 3864 not present, the default one for the swarm will be used, finally 3865 falling back to the engine default if not specified. 3866 type: "object" 3867 properties: 3868 Name: 3869 type: "string" 3870 Options: 3871 type: "object" 3872 additionalProperties: 3873 type: "string" 3874 3875 TaskState: 3876 type: "string" 3877 enum: 3878 - "new" 3879 - "allocated" 3880 - "pending" 3881 - "assigned" 3882 - "accepted" 3883 - "preparing" 3884 - "ready" 3885 - "starting" 3886 - "running" 3887 - "complete" 3888 - "shutdown" 3889 - "failed" 3890 - "rejected" 3891 - "remove" 3892 - "orphaned" 3893 3894 Task: 3895 type: "object" 3896 properties: 3897 ID: 3898 description: "The ID of the task." 3899 type: "string" 3900 Version: 3901 $ref: "#/definitions/ObjectVersion" 3902 CreatedAt: 3903 type: "string" 3904 format: "dateTime" 3905 UpdatedAt: 3906 type: "string" 3907 format: "dateTime" 3908 Name: 3909 description: "Name of the task." 3910 type: "string" 3911 Labels: 3912 description: "User-defined key/value metadata." 3913 type: "object" 3914 additionalProperties: 3915 type: "string" 3916 Spec: 3917 $ref: "#/definitions/TaskSpec" 3918 ServiceID: 3919 description: "The ID of the service this task is part of." 3920 type: "string" 3921 Slot: 3922 type: "integer" 3923 NodeID: 3924 description: "The ID of the node that this task is on." 3925 type: "string" 3926 AssignedGenericResources: 3927 $ref: "#/definitions/GenericResources" 3928 Status: 3929 type: "object" 3930 properties: 3931 Timestamp: 3932 type: "string" 3933 format: "dateTime" 3934 State: 3935 $ref: "#/definitions/TaskState" 3936 Message: 3937 type: "string" 3938 Err: 3939 type: "string" 3940 ContainerStatus: 3941 type: "object" 3942 properties: 3943 ContainerID: 3944 type: "string" 3945 PID: 3946 type: "integer" 3947 ExitCode: 3948 type: "integer" 3949 DesiredState: 3950 $ref: "#/definitions/TaskState" 3951 JobIteration: 3952 description: | 3953 If the Service this Task belongs to is a job-mode service, contains 3954 the JobIteration of the Service this Task was created for. Absent if 3955 the Task was created for a Replicated or Global Service. 3956 $ref: "#/definitions/ObjectVersion" 3957 example: 3958 ID: "0kzzo1i0y4jz6027t0k7aezc7" 3959 Version: 3960 Index: 71 3961 CreatedAt: "2016-06-07T21:07:31.171892745Z" 3962 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 3963 Spec: 3964 ContainerSpec: 3965 Image: "redis" 3966 Resources: 3967 Limits: {} 3968 Reservations: {} 3969 RestartPolicy: 3970 Condition: "any" 3971 MaxAttempts: 0 3972 Placement: {} 3973 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 3974 Slot: 1 3975 NodeID: "60gvrl6tm78dmak4yl7srz94v" 3976 Status: 3977 Timestamp: "2016-06-07T21:07:31.290032978Z" 3978 State: "running" 3979 Message: "started" 3980 ContainerStatus: 3981 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 3982 PID: 677 3983 DesiredState: "running" 3984 NetworksAttachments: 3985 - Network: 3986 ID: "4qvuz4ko70xaltuqbt8956gd1" 3987 Version: 3988 Index: 18 3989 CreatedAt: "2016-06-07T20:31:11.912919752Z" 3990 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 3991 Spec: 3992 Name: "ingress" 3993 Labels: 3994 com.docker.swarm.internal: "true" 3995 DriverConfiguration: {} 3996 IPAMOptions: 3997 Driver: {} 3998 Configs: 3999 - Subnet: "10.255.0.0/16" 4000 Gateway: "10.255.0.1" 4001 DriverState: 4002 Name: "overlay" 4003 Options: 4004 com.docker.network.driver.overlay.vxlanid_list: "256" 4005 IPAMOptions: 4006 Driver: 4007 Name: "default" 4008 Configs: 4009 - Subnet: "10.255.0.0/16" 4010 Gateway: "10.255.0.1" 4011 Addresses: 4012 - "10.255.0.10/16" 4013 AssignedGenericResources: 4014 - DiscreteResourceSpec: 4015 Kind: "SSD" 4016 Value: 3 4017 - NamedResourceSpec: 4018 Kind: "GPU" 4019 Value: "UUID1" 4020 - NamedResourceSpec: 4021 Kind: "GPU" 4022 Value: "UUID2" 4023 4024 ServiceSpec: 4025 description: "User modifiable configuration for a service." 4026 type: object 4027 properties: 4028 Name: 4029 description: "Name of the service." 4030 type: "string" 4031 Labels: 4032 description: "User-defined key/value metadata." 4033 type: "object" 4034 additionalProperties: 4035 type: "string" 4036 TaskTemplate: 4037 $ref: "#/definitions/TaskSpec" 4038 Mode: 4039 description: "Scheduling mode for the service." 4040 type: "object" 4041 properties: 4042 Replicated: 4043 type: "object" 4044 properties: 4045 Replicas: 4046 type: "integer" 4047 format: "int64" 4048 Global: 4049 type: "object" 4050 ReplicatedJob: 4051 description: | 4052 The mode used for services with a finite number of tasks that run 4053 to a completed state. 4054 type: "object" 4055 properties: 4056 MaxConcurrent: 4057 description: | 4058 The maximum number of replicas to run simultaneously. 4059 type: "integer" 4060 format: "int64" 4061 default: 1 4062 TotalCompletions: 4063 description: | 4064 The total number of replicas desired to reach the Completed 4065 state. If unset, will default to the value of `MaxConcurrent` 4066 type: "integer" 4067 format: "int64" 4068 GlobalJob: 4069 description: | 4070 The mode used for services which run a task to the completed state 4071 on each valid node. 4072 type: "object" 4073 UpdateConfig: 4074 description: "Specification for the update strategy of the service." 4075 type: "object" 4076 properties: 4077 Parallelism: 4078 description: | 4079 Maximum number of tasks to be updated in one iteration (0 means 4080 unlimited parallelism). 4081 type: "integer" 4082 format: "int64" 4083 Delay: 4084 description: "Amount of time between updates, in nanoseconds." 4085 type: "integer" 4086 format: "int64" 4087 FailureAction: 4088 description: | 4089 Action to take if an updated task fails to run, or stops running 4090 during the update. 4091 type: "string" 4092 enum: 4093 - "continue" 4094 - "pause" 4095 - "rollback" 4096 Monitor: 4097 description: | 4098 Amount of time to monitor each updated task for failures, in 4099 nanoseconds. 4100 type: "integer" 4101 format: "int64" 4102 MaxFailureRatio: 4103 description: | 4104 The fraction of tasks that may fail during an update before the 4105 failure action is invoked, specified as a floating point number 4106 between 0 and 1. 4107 type: "number" 4108 default: 0 4109 Order: 4110 description: | 4111 The order of operations when rolling out an updated task. Either 4112 the old task is shut down before the new task is started, or the 4113 new task is started before the old task is shut down. 4114 type: "string" 4115 enum: 4116 - "stop-first" 4117 - "start-first" 4118 RollbackConfig: 4119 description: "Specification for the rollback strategy of the service." 4120 type: "object" 4121 properties: 4122 Parallelism: 4123 description: | 4124 Maximum number of tasks to be rolled back in one iteration (0 means 4125 unlimited parallelism). 4126 type: "integer" 4127 format: "int64" 4128 Delay: 4129 description: | 4130 Amount of time between rollback iterations, in nanoseconds. 4131 type: "integer" 4132 format: "int64" 4133 FailureAction: 4134 description: | 4135 Action to take if an rolled back task fails to run, or stops 4136 running during the rollback. 4137 type: "string" 4138 enum: 4139 - "continue" 4140 - "pause" 4141 Monitor: 4142 description: | 4143 Amount of time to monitor each rolled back task for failures, in 4144 nanoseconds. 4145 type: "integer" 4146 format: "int64" 4147 MaxFailureRatio: 4148 description: | 4149 The fraction of tasks that may fail during a rollback before the 4150 failure action is invoked, specified as a floating point number 4151 between 0 and 1. 4152 type: "number" 4153 default: 0 4154 Order: 4155 description: | 4156 The order of operations when rolling back a task. Either the old 4157 task is shut down before the new task is started, or the new task 4158 is started before the old task is shut down. 4159 type: "string" 4160 enum: 4161 - "stop-first" 4162 - "start-first" 4163 Networks: 4164 description: "Specifies which networks the service should attach to." 4165 type: "array" 4166 items: 4167 $ref: "#/definitions/NetworkAttachmentConfig" 4168 4169 EndpointSpec: 4170 $ref: "#/definitions/EndpointSpec" 4171 4172 EndpointPortConfig: 4173 type: "object" 4174 properties: 4175 Name: 4176 type: "string" 4177 Protocol: 4178 type: "string" 4179 enum: 4180 - "tcp" 4181 - "udp" 4182 - "sctp" 4183 TargetPort: 4184 description: "The port inside the container." 4185 type: "integer" 4186 PublishedPort: 4187 description: "The port on the swarm hosts." 4188 type: "integer" 4189 PublishMode: 4190 description: | 4191 The mode in which port is published. 4192 4193 <p><br /></p> 4194 4195 - "ingress" makes the target port accessible on every node, 4196 regardless of whether there is a task for the service running on 4197 that node or not. 4198 - "host" bypasses the routing mesh and publish the port directly on 4199 the swarm node where that service is running. 4200 4201 type: "string" 4202 enum: 4203 - "ingress" 4204 - "host" 4205 default: "ingress" 4206 example: "ingress" 4207 4208 EndpointSpec: 4209 description: "Properties that can be configured to access and load balance a service." 4210 type: "object" 4211 properties: 4212 Mode: 4213 description: | 4214 The mode of resolution to use for internal load balancing between tasks. 4215 type: "string" 4216 enum: 4217 - "vip" 4218 - "dnsrr" 4219 default: "vip" 4220 Ports: 4221 description: | 4222 List of exposed ports that this service is accessible on from the 4223 outside. Ports can only be provided if `vip` resolution mode is used. 4224 type: "array" 4225 items: 4226 $ref: "#/definitions/EndpointPortConfig" 4227 4228 Service: 4229 type: "object" 4230 properties: 4231 ID: 4232 type: "string" 4233 Version: 4234 $ref: "#/definitions/ObjectVersion" 4235 CreatedAt: 4236 type: "string" 4237 format: "dateTime" 4238 UpdatedAt: 4239 type: "string" 4240 format: "dateTime" 4241 Spec: 4242 $ref: "#/definitions/ServiceSpec" 4243 Endpoint: 4244 type: "object" 4245 properties: 4246 Spec: 4247 $ref: "#/definitions/EndpointSpec" 4248 Ports: 4249 type: "array" 4250 items: 4251 $ref: "#/definitions/EndpointPortConfig" 4252 VirtualIPs: 4253 type: "array" 4254 items: 4255 type: "object" 4256 properties: 4257 NetworkID: 4258 type: "string" 4259 Addr: 4260 type: "string" 4261 UpdateStatus: 4262 description: "The status of a service update." 4263 type: "object" 4264 properties: 4265 State: 4266 type: "string" 4267 enum: 4268 - "updating" 4269 - "paused" 4270 - "completed" 4271 StartedAt: 4272 type: "string" 4273 format: "dateTime" 4274 CompletedAt: 4275 type: "string" 4276 format: "dateTime" 4277 Message: 4278 type: "string" 4279 ServiceStatus: 4280 description: | 4281 The status of the service's tasks. Provided only when requested as 4282 part of a ServiceList operation. 4283 type: "object" 4284 properties: 4285 RunningTasks: 4286 description: | 4287 The number of tasks for the service currently in the Running state. 4288 type: "integer" 4289 format: "uint64" 4290 example: 7 4291 DesiredTasks: 4292 description: | 4293 The number of tasks for the service desired to be running. 4294 For replicated services, this is the replica count from the 4295 service spec. For global services, this is computed by taking 4296 count of all tasks for the service with a Desired State other 4297 than Shutdown. 4298 type: "integer" 4299 format: "uint64" 4300 example: 10 4301 CompletedTasks: 4302 description: | 4303 The number of tasks for a job that are in the Completed state. 4304 This field must be cross-referenced with the service type, as the 4305 value of 0 may mean the service is not in a job mode, or it may 4306 mean the job-mode service has no tasks yet Completed. 4307 type: "integer" 4308 format: "uint64" 4309 JobStatus: 4310 description: | 4311 The status of the service when it is in one of ReplicatedJob or 4312 GlobalJob modes. Absent on Replicated and Global mode services. The 4313 JobIteration is an ObjectVersion, but unlike the Service's version, 4314 does not need to be sent with an update request. 4315 type: "object" 4316 properties: 4317 JobIteration: 4318 description: | 4319 JobIteration is a value increased each time a Job is executed, 4320 successfully or otherwise. "Executed", in this case, means the 4321 job as a whole has been started, not that an individual Task has 4322 been launched. A job is "Executed" when its ServiceSpec is 4323 updated. JobIteration can be used to disambiguate Tasks belonging 4324 to different executions of a job. Though JobIteration will 4325 increase with each subsequent execution, it may not necessarily 4326 increase by 1, and so JobIteration should not be used to 4327 $ref: "#/definitions/ObjectVersion" 4328 LastExecution: 4329 description: | 4330 The last time, as observed by the server, that this job was 4331 started. 4332 type: "string" 4333 format: "dateTime" 4334 example: 4335 ID: "9mnpnzenvg8p8tdbtq4wvbkcz" 4336 Version: 4337 Index: 19 4338 CreatedAt: "2016-06-07T21:05:51.880065305Z" 4339 UpdatedAt: "2016-06-07T21:07:29.962229872Z" 4340 Spec: 4341 Name: "hopeful_cori" 4342 TaskTemplate: 4343 ContainerSpec: 4344 Image: "redis" 4345 Resources: 4346 Limits: {} 4347 Reservations: {} 4348 RestartPolicy: 4349 Condition: "any" 4350 MaxAttempts: 0 4351 Placement: {} 4352 ForceUpdate: 0 4353 Mode: 4354 Replicated: 4355 Replicas: 1 4356 UpdateConfig: 4357 Parallelism: 1 4358 Delay: 1000000000 4359 FailureAction: "pause" 4360 Monitor: 15000000000 4361 MaxFailureRatio: 0.15 4362 RollbackConfig: 4363 Parallelism: 1 4364 Delay: 1000000000 4365 FailureAction: "pause" 4366 Monitor: 15000000000 4367 MaxFailureRatio: 0.15 4368 EndpointSpec: 4369 Mode: "vip" 4370 Ports: 4371 - 4372 Protocol: "tcp" 4373 TargetPort: 6379 4374 PublishedPort: 30001 4375 Endpoint: 4376 Spec: 4377 Mode: "vip" 4378 Ports: 4379 - 4380 Protocol: "tcp" 4381 TargetPort: 6379 4382 PublishedPort: 30001 4383 Ports: 4384 - 4385 Protocol: "tcp" 4386 TargetPort: 6379 4387 PublishedPort: 30001 4388 VirtualIPs: 4389 - 4390 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 4391 Addr: "10.255.0.2/16" 4392 - 4393 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 4394 Addr: "10.255.0.3/16" 4395 4396 ImageDeleteResponseItem: 4397 type: "object" 4398 properties: 4399 Untagged: 4400 description: "The image ID of an image that was untagged" 4401 type: "string" 4402 Deleted: 4403 description: "The image ID of an image that was deleted" 4404 type: "string" 4405 4406 ServiceUpdateResponse: 4407 type: "object" 4408 properties: 4409 Warnings: 4410 description: "Optional warning messages" 4411 type: "array" 4412 items: 4413 type: "string" 4414 example: 4415 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 4416 4417 ContainerSummary: 4418 type: "object" 4419 properties: 4420 Id: 4421 description: "The ID of this container" 4422 type: "string" 4423 x-go-name: "ID" 4424 Names: 4425 description: "The names that this container has been given" 4426 type: "array" 4427 items: 4428 type: "string" 4429 Image: 4430 description: "The name of the image used when creating this container" 4431 type: "string" 4432 ImageID: 4433 description: "The ID of the image that this container was created from" 4434 type: "string" 4435 Command: 4436 description: "Command to run when starting the container" 4437 type: "string" 4438 Created: 4439 description: "When the container was created" 4440 type: "integer" 4441 format: "int64" 4442 Ports: 4443 description: "The ports exposed by this container" 4444 type: "array" 4445 items: 4446 $ref: "#/definitions/Port" 4447 SizeRw: 4448 description: "The size of files that have been created or changed by this container" 4449 type: "integer" 4450 format: "int64" 4451 SizeRootFs: 4452 description: "The total size of all the files in this container" 4453 type: "integer" 4454 format: "int64" 4455 Labels: 4456 description: "User-defined key/value metadata." 4457 type: "object" 4458 additionalProperties: 4459 type: "string" 4460 State: 4461 description: "The state of this container (e.g. `Exited`)" 4462 type: "string" 4463 Status: 4464 description: "Additional human-readable status of this container (e.g. `Exit 0`)" 4465 type: "string" 4466 HostConfig: 4467 type: "object" 4468 properties: 4469 NetworkMode: 4470 type: "string" 4471 NetworkSettings: 4472 description: "A summary of the container's network settings" 4473 type: "object" 4474 properties: 4475 Networks: 4476 type: "object" 4477 additionalProperties: 4478 $ref: "#/definitions/EndpointSettings" 4479 Mounts: 4480 type: "array" 4481 items: 4482 $ref: "#/definitions/MountPoint" 4483 4484 Driver: 4485 description: "Driver represents a driver (network, logging, secrets)." 4486 type: "object" 4487 required: [Name] 4488 properties: 4489 Name: 4490 description: "Name of the driver." 4491 type: "string" 4492 x-nullable: false 4493 example: "some-driver" 4494 Options: 4495 description: "Key/value map of driver-specific options." 4496 type: "object" 4497 x-nullable: false 4498 additionalProperties: 4499 type: "string" 4500 example: 4501 OptionA: "value for driver-specific option A" 4502 OptionB: "value for driver-specific option B" 4503 4504 SecretSpec: 4505 type: "object" 4506 properties: 4507 Name: 4508 description: "User-defined name of the secret." 4509 type: "string" 4510 Labels: 4511 description: "User-defined key/value metadata." 4512 type: "object" 4513 additionalProperties: 4514 type: "string" 4515 example: 4516 com.example.some-label: "some-value" 4517 com.example.some-other-label: "some-other-value" 4518 Data: 4519 description: | 4520 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4521 data to store as secret. 4522 4523 This field is only used to _create_ a secret, and is not returned by 4524 other endpoints. 4525 type: "string" 4526 example: "" 4527 Driver: 4528 description: | 4529 Name of the secrets driver used to fetch the secret's value from an 4530 external secret store. 4531 $ref: "#/definitions/Driver" 4532 Templating: 4533 description: | 4534 Templating driver, if applicable 4535 4536 Templating controls whether and how to evaluate the config payload as 4537 a template. If no driver is set, no templating is used. 4538 $ref: "#/definitions/Driver" 4539 4540 Secret: 4541 type: "object" 4542 properties: 4543 ID: 4544 type: "string" 4545 example: "blt1owaxmitz71s9v5zh81zun" 4546 Version: 4547 $ref: "#/definitions/ObjectVersion" 4548 CreatedAt: 4549 type: "string" 4550 format: "dateTime" 4551 example: "2017-07-20T13:55:28.678958722Z" 4552 UpdatedAt: 4553 type: "string" 4554 format: "dateTime" 4555 example: "2017-07-20T13:55:28.678958722Z" 4556 Spec: 4557 $ref: "#/definitions/SecretSpec" 4558 4559 ConfigSpec: 4560 type: "object" 4561 properties: 4562 Name: 4563 description: "User-defined name of the config." 4564 type: "string" 4565 Labels: 4566 description: "User-defined key/value metadata." 4567 type: "object" 4568 additionalProperties: 4569 type: "string" 4570 Data: 4571 description: | 4572 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4573 config data. 4574 type: "string" 4575 Templating: 4576 description: | 4577 Templating driver, if applicable 4578 4579 Templating controls whether and how to evaluate the config payload as 4580 a template. If no driver is set, no templating is used. 4581 $ref: "#/definitions/Driver" 4582 4583 Config: 4584 type: "object" 4585 properties: 4586 ID: 4587 type: "string" 4588 Version: 4589 $ref: "#/definitions/ObjectVersion" 4590 CreatedAt: 4591 type: "string" 4592 format: "dateTime" 4593 UpdatedAt: 4594 type: "string" 4595 format: "dateTime" 4596 Spec: 4597 $ref: "#/definitions/ConfigSpec" 4598 4599 ContainerState: 4600 description: | 4601 ContainerState stores container's running state. It's part of ContainerJSONBase 4602 and will be returned by the "inspect" command. 4603 type: "object" 4604 x-nullable: true 4605 properties: 4606 Status: 4607 description: | 4608 String representation of the container state. Can be one of "created", 4609 "running", "paused", "restarting", "removing", "exited", or "dead". 4610 type: "string" 4611 enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] 4612 example: "running" 4613 Running: 4614 description: | 4615 Whether this container is running. 4616 4617 Note that a running container can be _paused_. The `Running` and `Paused` 4618 booleans are not mutually exclusive: 4619 4620 When pausing a container (on Linux), the freezer cgroup is used to suspend 4621 all processes in the container. Freezing the process requires the process to 4622 be running. As a result, paused containers are both `Running` _and_ `Paused`. 4623 4624 Use the `Status` field instead to determine if a container's state is "running". 4625 type: "boolean" 4626 example: true 4627 Paused: 4628 description: "Whether this container is paused." 4629 type: "boolean" 4630 example: false 4631 Restarting: 4632 description: "Whether this container is restarting." 4633 type: "boolean" 4634 example: false 4635 OOMKilled: 4636 description: | 4637 Whether this container has been killed because it ran out of memory. 4638 type: "boolean" 4639 example: false 4640 Dead: 4641 type: "boolean" 4642 example: false 4643 Pid: 4644 description: "The process ID of this container" 4645 type: "integer" 4646 example: 1234 4647 ExitCode: 4648 description: "The last exit code of this container" 4649 type: "integer" 4650 example: 0 4651 Error: 4652 type: "string" 4653 StartedAt: 4654 description: "The time when this container was last started." 4655 type: "string" 4656 example: "2020-01-06T09:06:59.461876391Z" 4657 FinishedAt: 4658 description: "The time when this container last exited." 4659 type: "string" 4660 example: "2020-01-06T09:07:59.461876391Z" 4661 Health: 4662 $ref: "#/definitions/Health" 4663 4664 ContainerWaitResponse: 4665 description: "OK response to ContainerWait operation" 4666 type: "object" 4667 x-go-name: "ContainerWaitOKBody" 4668 title: "ContainerWaitResponse" 4669 required: [StatusCode] 4670 properties: 4671 StatusCode: 4672 description: "Exit code of the container" 4673 type: "integer" 4674 format: "int64" 4675 x-nullable: false 4676 Error: 4677 $ref: "#/definitions/ContainerWaitExitError" 4678 4679 ContainerWaitExitError: 4680 description: "container waiting error, if any" 4681 type: "object" 4682 x-go-name: "ContainerWaitOKBodyError" 4683 properties: 4684 Message: 4685 description: "Details of an error" 4686 type: "string" 4687 4688 SystemVersion: 4689 type: "object" 4690 description: | 4691 Response of Engine API: GET "/version" 4692 properties: 4693 Platform: 4694 type: "object" 4695 required: [Name] 4696 properties: 4697 Name: 4698 type: "string" 4699 Components: 4700 type: "array" 4701 description: | 4702 Information about system components 4703 items: 4704 type: "object" 4705 x-go-name: ComponentVersion 4706 required: [Name, Version] 4707 properties: 4708 Name: 4709 description: | 4710 Name of the component 4711 type: "string" 4712 example: "Engine" 4713 Version: 4714 description: | 4715 Version of the component 4716 type: "string" 4717 x-nullable: false 4718 example: "19.03.12" 4719 Details: 4720 description: | 4721 Key/value pairs of strings with additional information about the 4722 component. These values are intended for informational purposes 4723 only, and their content is not defined, and not part of the API 4724 specification. 4725 4726 These messages can be printed by the client as information to the user. 4727 type: "object" 4728 x-nullable: true 4729 Version: 4730 description: "The version of the daemon" 4731 type: "string" 4732 example: "19.03.12" 4733 ApiVersion: 4734 description: | 4735 The default (and highest) API version that is supported by the daemon 4736 type: "string" 4737 example: "1.40" 4738 MinAPIVersion: 4739 description: | 4740 The minimum API version that is supported by the daemon 4741 type: "string" 4742 example: "1.12" 4743 GitCommit: 4744 description: | 4745 The Git commit of the source code that was used to build the daemon 4746 type: "string" 4747 example: "48a66213fe" 4748 GoVersion: 4749 description: | 4750 The version Go used to compile the daemon, and the version of the Go 4751 runtime in use. 4752 type: "string" 4753 example: "go1.13.14" 4754 Os: 4755 description: | 4756 The operating system that the daemon is running on ("linux" or "windows") 4757 type: "string" 4758 example: "linux" 4759 Arch: 4760 description: | 4761 The architecture that the daemon is running on 4762 type: "string" 4763 example: "amd64" 4764 KernelVersion: 4765 description: | 4766 The kernel version (`uname -r`) that the daemon is running on. 4767 4768 This field is omitted when empty. 4769 type: "string" 4770 example: "4.19.76-linuxkit" 4771 Experimental: 4772 description: | 4773 Indicates if the daemon is started with experimental features enabled. 4774 4775 This field is omitted when empty / false. 4776 type: "boolean" 4777 example: true 4778 BuildTime: 4779 description: | 4780 The date and time that the daemon was compiled. 4781 type: "string" 4782 example: "2020-06-22T15:49:27.000000000+00:00" 4783 4784 SystemInfo: 4785 type: "object" 4786 properties: 4787 ID: 4788 description: | 4789 Unique identifier of the daemon. 4790 4791 <p><br /></p> 4792 4793 > **Note**: The format of the ID itself is not part of the API, and 4794 > should not be considered stable. 4795 type: "string" 4796 example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" 4797 Containers: 4798 description: "Total number of containers on the host." 4799 type: "integer" 4800 example: 14 4801 ContainersRunning: 4802 description: | 4803 Number of containers with status `"running"`. 4804 type: "integer" 4805 example: 3 4806 ContainersPaused: 4807 description: | 4808 Number of containers with status `"paused"`. 4809 type: "integer" 4810 example: 1 4811 ContainersStopped: 4812 description: | 4813 Number of containers with status `"stopped"`. 4814 type: "integer" 4815 example: 10 4816 Images: 4817 description: | 4818 Total number of images on the host. 4819 4820 Both _tagged_ and _untagged_ (dangling) images are counted. 4821 type: "integer" 4822 example: 508 4823 Driver: 4824 description: "Name of the storage driver in use." 4825 type: "string" 4826 example: "overlay2" 4827 DriverStatus: 4828 description: | 4829 Information specific to the storage driver, provided as 4830 "label" / "value" pairs. 4831 4832 This information is provided by the storage driver, and formatted 4833 in a way consistent with the output of `docker info` on the command 4834 line. 4835 4836 <p><br /></p> 4837 4838 > **Note**: The information returned in this field, including the 4839 > formatting of values and labels, should not be considered stable, 4840 > and may change without notice. 4841 type: "array" 4842 items: 4843 type: "array" 4844 items: 4845 type: "string" 4846 example: 4847 - ["Backing Filesystem", "extfs"] 4848 - ["Supports d_type", "true"] 4849 - ["Native Overlay Diff", "true"] 4850 DockerRootDir: 4851 description: | 4852 Root directory of persistent Docker state. 4853 4854 Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` 4855 on Windows. 4856 type: "string" 4857 example: "/var/lib/docker" 4858 Plugins: 4859 $ref: "#/definitions/PluginsInfo" 4860 MemoryLimit: 4861 description: "Indicates if the host has memory limit support enabled." 4862 type: "boolean" 4863 example: true 4864 SwapLimit: 4865 description: "Indicates if the host has memory swap limit support enabled." 4866 type: "boolean" 4867 example: true 4868 KernelMemory: 4869 description: | 4870 Indicates if the host has kernel memory limit support enabled. 4871 4872 <p><br /></p> 4873 4874 > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated 4875 > `kmem.limit_in_bytes`. 4876 type: "boolean" 4877 example: true 4878 KernelMemoryTCP: 4879 description: | 4880 Indicates if the host has kernel memory TCP limit support enabled. 4881 4882 Kernel memory TCP limits are not supported when using cgroups v2, which 4883 does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. 4884 type: "boolean" 4885 example: true 4886 CpuCfsPeriod: 4887 description: | 4888 Indicates if CPU CFS(Completely Fair Scheduler) period is supported by 4889 the host. 4890 type: "boolean" 4891 example: true 4892 CpuCfsQuota: 4893 description: | 4894 Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by 4895 the host. 4896 type: "boolean" 4897 example: true 4898 CPUShares: 4899 description: | 4900 Indicates if CPU Shares limiting is supported by the host. 4901 type: "boolean" 4902 example: true 4903 CPUSet: 4904 description: | 4905 Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. 4906 4907 See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) 4908 type: "boolean" 4909 example: true 4910 PidsLimit: 4911 description: "Indicates if the host kernel has PID limit support enabled." 4912 type: "boolean" 4913 example: true 4914 OomKillDisable: 4915 description: "Indicates if OOM killer disable is supported on the host." 4916 type: "boolean" 4917 IPv4Forwarding: 4918 description: "Indicates IPv4 forwarding is enabled." 4919 type: "boolean" 4920 example: true 4921 BridgeNfIptables: 4922 description: "Indicates if `bridge-nf-call-iptables` is available on the host." 4923 type: "boolean" 4924 example: true 4925 BridgeNfIp6tables: 4926 description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." 4927 type: "boolean" 4928 example: true 4929 Debug: 4930 description: | 4931 Indicates if the daemon is running in debug-mode / with debug-level 4932 logging enabled. 4933 type: "boolean" 4934 example: true 4935 NFd: 4936 description: | 4937 The total number of file Descriptors in use by the daemon process. 4938 4939 This information is only returned if debug-mode is enabled. 4940 type: "integer" 4941 example: 64 4942 NGoroutines: 4943 description: | 4944 The number of goroutines that currently exist. 4945 4946 This information is only returned if debug-mode is enabled. 4947 type: "integer" 4948 example: 174 4949 SystemTime: 4950 description: | 4951 Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) 4952 format with nano-seconds. 4953 type: "string" 4954 example: "2017-08-08T20:28:29.06202363Z" 4955 LoggingDriver: 4956 description: | 4957 The logging driver to use as a default for new containers. 4958 type: "string" 4959 CgroupDriver: 4960 description: | 4961 The driver to use for managing cgroups. 4962 type: "string" 4963 enum: ["cgroupfs", "systemd", "none"] 4964 default: "cgroupfs" 4965 example: "cgroupfs" 4966 CgroupVersion: 4967 description: | 4968 The version of the cgroup. 4969 type: "string" 4970 enum: ["1", "2"] 4971 default: "1" 4972 example: "1" 4973 NEventsListener: 4974 description: "Number of event listeners subscribed." 4975 type: "integer" 4976 example: 30 4977 KernelVersion: 4978 description: | 4979 Kernel version of the host. 4980 4981 On Linux, this information obtained from `uname`. On Windows this 4982 information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd> 4983 registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. 4984 type: "string" 4985 example: "4.9.38-moby" 4986 OperatingSystem: 4987 description: | 4988 Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" 4989 or "Windows Server 2016 Datacenter" 4990 type: "string" 4991 example: "Alpine Linux v3.5" 4992 OSVersion: 4993 description: | 4994 Version of the host's operating system 4995 4996 <p><br /></p> 4997 4998 > **Note**: The information returned in this field, including its 4999 > very existence, and the formatting of values, should not be considered 5000 > stable, and may change without notice. 5001 type: "string" 5002 example: "16.04" 5003 OSType: 5004 description: | 5005 Generic type of the operating system of the host, as returned by the 5006 Go runtime (`GOOS`). 5007 5008 Currently returned values are "linux" and "windows". A full list of 5009 possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). 5010 type: "string" 5011 example: "linux" 5012 Architecture: 5013 description: | 5014 Hardware architecture of the host, as returned by the Go runtime 5015 (`GOARCH`). 5016 5017 A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). 5018 type: "string" 5019 example: "x86_64" 5020 NCPU: 5021 description: | 5022 The number of logical CPUs usable by the daemon. 5023 5024 The number of available CPUs is checked by querying the operating 5025 system when the daemon starts. Changes to operating system CPU 5026 allocation after the daemon is started are not reflected. 5027 type: "integer" 5028 example: 4 5029 MemTotal: 5030 description: | 5031 Total amount of physical memory available on the host, in bytes. 5032 type: "integer" 5033 format: "int64" 5034 example: 2095882240 5035 5036 IndexServerAddress: 5037 description: | 5038 Address / URL of the index server that is used for image search, 5039 and as a default for user authentication for Docker Hub and Docker Cloud. 5040 default: "https://index.docker.io/v1/" 5041 type: "string" 5042 example: "https://index.docker.io/v1/" 5043 RegistryConfig: 5044 $ref: "#/definitions/RegistryServiceConfig" 5045 GenericResources: 5046 $ref: "#/definitions/GenericResources" 5047 HttpProxy: 5048 description: | 5049 HTTP-proxy configured for the daemon. This value is obtained from the 5050 [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 5051 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 5052 are masked in the API response. 5053 5054 Containers do not automatically inherit this configuration. 5055 type: "string" 5056 example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" 5057 HttpsProxy: 5058 description: | 5059 HTTPS-proxy configured for the daemon. This value is obtained from the 5060 [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 5061 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 5062 are masked in the API response. 5063 5064 Containers do not automatically inherit this configuration. 5065 type: "string" 5066 example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" 5067 NoProxy: 5068 description: | 5069 Comma-separated list of domain extensions for which no proxy should be 5070 used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) 5071 environment variable. 5072 5073 Containers do not automatically inherit this configuration. 5074 type: "string" 5075 example: "*.local, 169.254/16" 5076 Name: 5077 description: "Hostname of the host." 5078 type: "string" 5079 example: "node5.corp.example.com" 5080 Labels: 5081 description: | 5082 User-defined labels (key/value metadata) as set on the daemon. 5083 5084 <p><br /></p> 5085 5086 > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, 5087 > set through the daemon configuration, and _node_ labels, set from a 5088 > manager node in the Swarm. Node labels are not included in this 5089 > field. Node labels can be retrieved using the `/nodes/(id)` endpoint 5090 > on a manager node in the Swarm. 5091 type: "array" 5092 items: 5093 type: "string" 5094 example: ["storage=ssd", "production"] 5095 ExperimentalBuild: 5096 description: | 5097 Indicates if experimental features are enabled on the daemon. 5098 type: "boolean" 5099 example: true 5100 ServerVersion: 5101 description: | 5102 Version string of the daemon. 5103 5104 > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) 5105 > returns the Swarm version instead of the daemon version, for example 5106 > `swarm/1.2.8`. 5107 type: "string" 5108 example: "17.06.0-ce" 5109 ClusterStore: 5110 description: | 5111 URL of the distributed storage backend. 5112 5113 5114 The storage backend is used for multihost networking (to store 5115 network and endpoint information) and by the node discovery mechanism. 5116 5117 <p><br /></p> 5118 5119 > **Deprecated**: This field is only propagated when using standalone Swarm 5120 > mode, and overlay networking using an external k/v store. Overlay 5121 > networks with Swarm mode enabled use the built-in raft store, and 5122 > this field will be empty. 5123 type: "string" 5124 example: "consul://consul.corp.example.com:8600/some/path" 5125 ClusterAdvertise: 5126 description: | 5127 The network endpoint that the Engine advertises for the purpose of 5128 node discovery. ClusterAdvertise is a `host:port` combination on which 5129 the daemon is reachable by other hosts. 5130 5131 <p><br /></p> 5132 5133 > **Deprecated**: This field is only propagated when using standalone Swarm 5134 > mode, and overlay networking using an external k/v store. Overlay 5135 > networks with Swarm mode enabled use the built-in raft store, and 5136 > this field will be empty. 5137 type: "string" 5138 example: "node5.corp.example.com:8000" 5139 Runtimes: 5140 description: | 5141 List of [OCI compliant](https://github.com/opencontainers/runtime-spec) 5142 runtimes configured on the daemon. Keys hold the "name" used to 5143 reference the runtime. 5144 5145 The Docker daemon relies on an OCI compliant runtime (invoked via the 5146 `containerd` daemon) as its interface to the Linux kernel namespaces, 5147 cgroups, and SELinux. 5148 5149 The default runtime is `runc`, and automatically configured. Additional 5150 runtimes can be configured by the user and will be listed here. 5151 type: "object" 5152 additionalProperties: 5153 $ref: "#/definitions/Runtime" 5154 default: 5155 runc: 5156 path: "runc" 5157 example: 5158 runc: 5159 path: "runc" 5160 runc-master: 5161 path: "/go/bin/runc" 5162 custom: 5163 path: "/usr/local/bin/my-oci-runtime" 5164 runtimeArgs: ["--debug", "--systemd-cgroup=false"] 5165 DefaultRuntime: 5166 description: | 5167 Name of the default OCI runtime that is used when starting containers. 5168 5169 The default can be overridden per-container at create time. 5170 type: "string" 5171 default: "runc" 5172 example: "runc" 5173 Swarm: 5174 $ref: "#/definitions/SwarmInfo" 5175 LiveRestoreEnabled: 5176 description: | 5177 Indicates if live restore is enabled. 5178 5179 If enabled, containers are kept running when the daemon is shutdown 5180 or upon daemon start if running containers are detected. 5181 type: "boolean" 5182 default: false 5183 example: false 5184 Isolation: 5185 description: | 5186 Represents the isolation technology to use as a default for containers. 5187 The supported values are platform-specific. 5188 5189 If no isolation value is specified on daemon start, on Windows client, 5190 the default is `hyperv`, and on Windows server, the default is `process`. 5191 5192 This option is currently not used on other platforms. 5193 default: "default" 5194 type: "string" 5195 enum: 5196 - "default" 5197 - "hyperv" 5198 - "process" 5199 InitBinary: 5200 description: | 5201 Name and, optional, path of the `docker-init` binary. 5202 5203 If the path is omitted, the daemon searches the host's `$PATH` for the 5204 binary and uses the first result. 5205 type: "string" 5206 example: "docker-init" 5207 ContainerdCommit: 5208 $ref: "#/definitions/Commit" 5209 RuncCommit: 5210 $ref: "#/definitions/Commit" 5211 InitCommit: 5212 $ref: "#/definitions/Commit" 5213 SecurityOptions: 5214 description: | 5215 List of security features that are enabled on the daemon, such as 5216 apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. 5217 5218 Additional configuration options for each security feature may 5219 be present, and are included as a comma-separated list of key/value 5220 pairs. 5221 type: "array" 5222 items: 5223 type: "string" 5224 example: 5225 - "name=apparmor" 5226 - "name=seccomp,profile=default" 5227 - "name=selinux" 5228 - "name=userns" 5229 - "name=rootless" 5230 ProductLicense: 5231 description: | 5232 Reports a summary of the product license on the daemon. 5233 5234 If a commercial license has been applied to the daemon, information 5235 such as number of nodes, and expiration are included. 5236 type: "string" 5237 example: "Community Engine" 5238 DefaultAddressPools: 5239 description: | 5240 List of custom default address pools for local networks, which can be 5241 specified in the daemon.json file or dockerd option. 5242 5243 Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 5244 10.10.[0-255].0/24 address pools. 5245 type: "array" 5246 items: 5247 type: "object" 5248 properties: 5249 Base: 5250 description: "The network address in CIDR format" 5251 type: "string" 5252 example: "10.10.0.0/16" 5253 Size: 5254 description: "The network pool size" 5255 type: "integer" 5256 example: "24" 5257 Warnings: 5258 description: | 5259 List of warnings / informational messages about missing features, or 5260 issues related to the daemon configuration. 5261 5262 These messages can be printed by the client as information to the user. 5263 type: "array" 5264 items: 5265 type: "string" 5266 example: 5267 - "WARNING: No memory limit support" 5268 - "WARNING: bridge-nf-call-iptables is disabled" 5269 - "WARNING: bridge-nf-call-ip6tables is disabled" 5270 5271 5272 # PluginsInfo is a temp struct holding Plugins name 5273 # registered with docker daemon. It is used by Info struct 5274 PluginsInfo: 5275 description: | 5276 Available plugins per type. 5277 5278 <p><br /></p> 5279 5280 > **Note**: Only unmanaged (V1) plugins are included in this list. 5281 > V1 plugins are "lazily" loaded, and are not returned in this list 5282 > if there is no resource using the plugin. 5283 type: "object" 5284 properties: 5285 Volume: 5286 description: "Names of available volume-drivers, and network-driver plugins." 5287 type: "array" 5288 items: 5289 type: "string" 5290 example: ["local"] 5291 Network: 5292 description: "Names of available network-drivers, and network-driver plugins." 5293 type: "array" 5294 items: 5295 type: "string" 5296 example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] 5297 Authorization: 5298 description: "Names of available authorization plugins." 5299 type: "array" 5300 items: 5301 type: "string" 5302 example: ["img-authz-plugin", "hbm"] 5303 Log: 5304 description: "Names of available logging-drivers, and logging-driver plugins." 5305 type: "array" 5306 items: 5307 type: "string" 5308 example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] 5309 5310 5311 RegistryServiceConfig: 5312 description: | 5313 RegistryServiceConfig stores daemon registry services configuration. 5314 type: "object" 5315 x-nullable: true 5316 properties: 5317 AllowNondistributableArtifactsCIDRs: 5318 description: | 5319 List of IP ranges to which nondistributable artifacts can be pushed, 5320 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). 5321 5322 Some images (for example, Windows base images) contain artifacts 5323 whose distribution is restricted by license. When these images are 5324 pushed to a registry, restricted artifacts are not included. 5325 5326 This configuration override this behavior, and enables the daemon to 5327 push nondistributable artifacts to all registries whose resolved IP 5328 address is within the subnet described by the CIDR syntax. 5329 5330 This option is useful when pushing images containing 5331 nondistributable artifacts to a registry on an air-gapped network so 5332 hosts on that network can pull the images without connecting to 5333 another server. 5334 5335 > **Warning**: Nondistributable artifacts typically have restrictions 5336 > on how and where they can be distributed and shared. Only use this 5337 > feature to push artifacts to private registries and ensure that you 5338 > are in compliance with any terms that cover redistributing 5339 > nondistributable artifacts. 5340 5341 type: "array" 5342 items: 5343 type: "string" 5344 example: ["::1/128", "127.0.0.0/8"] 5345 AllowNondistributableArtifactsHostnames: 5346 description: | 5347 List of registry hostnames to which nondistributable artifacts can be 5348 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. 5349 5350 Some images (for example, Windows base images) contain artifacts 5351 whose distribution is restricted by license. When these images are 5352 pushed to a registry, restricted artifacts are not included. 5353 5354 This configuration override this behavior for the specified 5355 registries. 5356 5357 This option is useful when pushing images containing 5358 nondistributable artifacts to a registry on an air-gapped network so 5359 hosts on that network can pull the images without connecting to 5360 another server. 5361 5362 > **Warning**: Nondistributable artifacts typically have restrictions 5363 > on how and where they can be distributed and shared. Only use this 5364 > feature to push artifacts to private registries and ensure that you 5365 > are in compliance with any terms that cover redistributing 5366 > nondistributable artifacts. 5367 type: "array" 5368 items: 5369 type: "string" 5370 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] 5371 InsecureRegistryCIDRs: 5372 description: | 5373 List of IP ranges of insecure registries, using the CIDR syntax 5374 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries 5375 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates 5376 from unknown CAs) communication. 5377 5378 By default, local registries (`127.0.0.0/8`) are configured as 5379 insecure. All other registries are secure. Communicating with an 5380 insecure registry is not possible if the daemon assumes that registry 5381 is secure. 5382 5383 This configuration override this behavior, insecure communication with 5384 registries whose resolved IP address is within the subnet described by 5385 the CIDR syntax. 5386 5387 Registries can also be marked insecure by hostname. Those registries 5388 are listed under `IndexConfigs` and have their `Secure` field set to 5389 `false`. 5390 5391 > **Warning**: Using this option can be useful when running a local 5392 > registry, but introduces security vulnerabilities. This option 5393 > should therefore ONLY be used for testing purposes. For increased 5394 > security, users should add their CA to their system's list of trusted 5395 > CAs instead of enabling this option. 5396 type: "array" 5397 items: 5398 type: "string" 5399 example: ["::1/128", "127.0.0.0/8"] 5400 IndexConfigs: 5401 type: "object" 5402 additionalProperties: 5403 $ref: "#/definitions/IndexInfo" 5404 example: 5405 "127.0.0.1:5000": 5406 "Name": "127.0.0.1:5000" 5407 "Mirrors": [] 5408 "Secure": false 5409 "Official": false 5410 "[2001:db8:a0b:12f0::1]:80": 5411 "Name": "[2001:db8:a0b:12f0::1]:80" 5412 "Mirrors": [] 5413 "Secure": false 5414 "Official": false 5415 "docker.io": 5416 Name: "docker.io" 5417 Mirrors: ["https://hub-mirror.corp.example.com:5000/"] 5418 Secure: true 5419 Official: true 5420 "registry.internal.corp.example.com:3000": 5421 Name: "registry.internal.corp.example.com:3000" 5422 Mirrors: [] 5423 Secure: false 5424 Official: false 5425 Mirrors: 5426 description: | 5427 List of registry URLs that act as a mirror for the official 5428 (`docker.io`) registry. 5429 5430 type: "array" 5431 items: 5432 type: "string" 5433 example: 5434 - "https://hub-mirror.corp.example.com:5000/" 5435 - "https://[2001:db8:a0b:12f0::1]/" 5436 5437 IndexInfo: 5438 description: 5439 IndexInfo contains information about a registry. 5440 type: "object" 5441 x-nullable: true 5442 properties: 5443 Name: 5444 description: | 5445 Name of the registry, such as "docker.io". 5446 type: "string" 5447 example: "docker.io" 5448 Mirrors: 5449 description: | 5450 List of mirrors, expressed as URIs. 5451 type: "array" 5452 items: 5453 type: "string" 5454 example: 5455 - "https://hub-mirror.corp.example.com:5000/" 5456 - "https://registry-2.docker.io/" 5457 - "https://registry-3.docker.io/" 5458 Secure: 5459 description: | 5460 Indicates if the registry is part of the list of insecure 5461 registries. 5462 5463 If `false`, the registry is insecure. Insecure registries accept 5464 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from 5465 unknown CAs) communication. 5466 5467 > **Warning**: Insecure registries can be useful when running a local 5468 > registry. However, because its use creates security vulnerabilities 5469 > it should ONLY be enabled for testing purposes. For increased 5470 > security, users should add their CA to their system's list of 5471 > trusted CAs instead of enabling this option. 5472 type: "boolean" 5473 example: true 5474 Official: 5475 description: | 5476 Indicates whether this is an official registry (i.e., Docker Hub / docker.io) 5477 type: "boolean" 5478 example: true 5479 5480 Runtime: 5481 description: | 5482 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) 5483 runtime. 5484 5485 The runtime is invoked by the daemon via the `containerd` daemon. OCI 5486 runtimes act as an interface to the Linux kernel namespaces, cgroups, 5487 and SELinux. 5488 type: "object" 5489 properties: 5490 path: 5491 description: | 5492 Name and, optional, path, of the OCI executable binary. 5493 5494 If the path is omitted, the daemon searches the host's `$PATH` for the 5495 binary and uses the first result. 5496 type: "string" 5497 example: "/usr/local/bin/my-oci-runtime" 5498 runtimeArgs: 5499 description: | 5500 List of command-line arguments to pass to the runtime when invoked. 5501 type: "array" 5502 x-nullable: true 5503 items: 5504 type: "string" 5505 example: ["--debug", "--systemd-cgroup=false"] 5506 5507 Commit: 5508 description: | 5509 Commit holds the Git-commit (SHA1) that a binary was built from, as 5510 reported in the version-string of external tools, such as `containerd`, 5511 or `runC`. 5512 type: "object" 5513 properties: 5514 ID: 5515 description: "Actual commit ID of external tool." 5516 type: "string" 5517 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" 5518 Expected: 5519 description: | 5520 Commit ID of external tool expected by dockerd as set at build time. 5521 type: "string" 5522 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" 5523 5524 SwarmInfo: 5525 description: | 5526 Represents generic information about swarm. 5527 type: "object" 5528 properties: 5529 NodeID: 5530 description: "Unique identifier of for this node in the swarm." 5531 type: "string" 5532 default: "" 5533 example: "k67qz4598weg5unwwffg6z1m1" 5534 NodeAddr: 5535 description: | 5536 IP address at which this node can be reached by other nodes in the 5537 swarm. 5538 type: "string" 5539 default: "" 5540 example: "10.0.0.46" 5541 LocalNodeState: 5542 $ref: "#/definitions/LocalNodeState" 5543 ControlAvailable: 5544 type: "boolean" 5545 default: false 5546 example: true 5547 Error: 5548 type: "string" 5549 default: "" 5550 RemoteManagers: 5551 description: | 5552 List of ID's and addresses of other managers in the swarm. 5553 type: "array" 5554 default: null 5555 x-nullable: true 5556 items: 5557 $ref: "#/definitions/PeerNode" 5558 example: 5559 - NodeID: "71izy0goik036k48jg985xnds" 5560 Addr: "10.0.0.158:2377" 5561 - NodeID: "79y6h1o4gv8n120drcprv5nmc" 5562 Addr: "10.0.0.159:2377" 5563 - NodeID: "k67qz4598weg5unwwffg6z1m1" 5564 Addr: "10.0.0.46:2377" 5565 Nodes: 5566 description: "Total number of nodes in the swarm." 5567 type: "integer" 5568 x-nullable: true 5569 example: 4 5570 Managers: 5571 description: "Total number of managers in the swarm." 5572 type: "integer" 5573 x-nullable: true 5574 example: 3 5575 Cluster: 5576 $ref: "#/definitions/ClusterInfo" 5577 5578 LocalNodeState: 5579 description: "Current local status of this node." 5580 type: "string" 5581 default: "" 5582 enum: 5583 - "" 5584 - "inactive" 5585 - "pending" 5586 - "active" 5587 - "error" 5588 - "locked" 5589 example: "active" 5590 5591 PeerNode: 5592 description: "Represents a peer-node in the swarm" 5593 type: "object" 5594 properties: 5595 NodeID: 5596 description: "Unique identifier of for this node in the swarm." 5597 type: "string" 5598 Addr: 5599 description: | 5600 IP address and ports at which this node can be reached. 5601 type: "string" 5602 5603 NetworkAttachmentConfig: 5604 description: | 5605 Specifies how a service should be attached to a particular network. 5606 type: "object" 5607 properties: 5608 Target: 5609 description: | 5610 The target network for attachment. Must be a network name or ID. 5611 type: "string" 5612 Aliases: 5613 description: | 5614 Discoverable alternate names for the service on this network. 5615 type: "array" 5616 items: 5617 type: "string" 5618 DriverOpts: 5619 description: | 5620 Driver attachment options for the network target. 5621 type: "object" 5622 additionalProperties: 5623 type: "string" 5624 5625 EventActor: 5626 description: | 5627 Actor describes something that generates events, like a container, network, 5628 or a volume. 5629 type: "object" 5630 properties: 5631 ID: 5632 description: "The ID of the object emitting the event" 5633 type: "string" 5634 example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 5635 Attributes: 5636 description: | 5637 Various key/value attributes of the object, depending on its type. 5638 type: "object" 5639 additionalProperties: 5640 type: "string" 5641 example: 5642 com.example.some-label: "some-label-value" 5643 image: "alpine:latest" 5644 name: "my-container" 5645 5646 EventMessage: 5647 description: | 5648 EventMessage represents the information an event contains. 5649 type: "object" 5650 title: "SystemEventsResponse" 5651 properties: 5652 Type: 5653 description: "The type of object emitting the event" 5654 type: "string" 5655 enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] 5656 example: "container" 5657 Action: 5658 description: "The type of event" 5659 type: "string" 5660 example: "create" 5661 Actor: 5662 $ref: "#/definitions/EventActor" 5663 scope: 5664 description: | 5665 Scope of the event. Engine events are `local` scope. Cluster (Swarm) 5666 events are `swarm` scope. 5667 type: "string" 5668 enum: ["local", "swarm"] 5669 time: 5670 description: "Timestamp of event" 5671 type: "integer" 5672 format: "int64" 5673 example: 1629574695 5674 timeNano: 5675 description: "Timestamp of event, with nanosecond accuracy" 5676 type: "integer" 5677 format: "int64" 5678 example: 1629574695515050031 5679 5680 OCIDescriptor: 5681 type: "object" 5682 x-go-name: Descriptor 5683 description: | 5684 A descriptor struct containing digest, media type, and size, as defined in 5685 the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). 5686 properties: 5687 mediaType: 5688 description: | 5689 The media type of the object this schema refers to. 5690 type: "string" 5691 example: "application/vnd.docker.distribution.manifest.v2+json" 5692 digest: 5693 description: | 5694 The digest of the targeted content. 5695 type: "string" 5696 example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" 5697 size: 5698 description: | 5699 The size in bytes of the blob. 5700 type: "integer" 5701 format: "int64" 5702 example: 3987495 5703 # TODO Not yet including these fields for now, as they are nil / omitted in our response. 5704 # urls: 5705 # description: | 5706 # List of URLs from which this object MAY be downloaded. 5707 # type: "array" 5708 # items: 5709 # type: "string" 5710 # format: "uri" 5711 # annotations: 5712 # description: | 5713 # Arbitrary metadata relating to the targeted content. 5714 # type: "object" 5715 # additionalProperties: 5716 # type: "string" 5717 # platform: 5718 # $ref: "#/definitions/OCIPlatform" 5719 5720 OCIPlatform: 5721 type: "object" 5722 x-go-name: Platform 5723 description: | 5724 Describes the platform which the image in the manifest runs on, as defined 5725 in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). 5726 properties: 5727 architecture: 5728 description: | 5729 The CPU architecture, for example `amd64` or `ppc64`. 5730 type: "string" 5731 example: "arm" 5732 os: 5733 description: | 5734 The operating system, for example `linux` or `windows`. 5735 type: "string" 5736 example: "windows" 5737 os.version: 5738 description: | 5739 Optional field specifying the operating system version, for example on 5740 Windows `10.0.19041.1165`. 5741 type: "string" 5742 example: "10.0.19041.1165" 5743 os.features: 5744 description: | 5745 Optional field specifying an array of strings, each listing a required 5746 OS feature (for example on Windows `win32k`). 5747 type: "array" 5748 items: 5749 type: "string" 5750 example: 5751 - "win32k" 5752 variant: 5753 description: | 5754 Optional field specifying a variant of the CPU, for example `v7` to 5755 specify ARMv7 when architecture is `arm`. 5756 type: "string" 5757 example: "v7" 5758 5759 DistributionInspect: 5760 type: "object" 5761 x-go-name: DistributionInspect 5762 title: "DistributionInspectResponse" 5763 required: [Descriptor, Platforms] 5764 description: | 5765 Describes the result obtained from contacting the registry to retrieve 5766 image metadata. 5767 properties: 5768 Descriptor: 5769 $ref: "#/definitions/OCIDescriptor" 5770 Platforms: 5771 type: "array" 5772 description: | 5773 An array containing all platforms supported by the image. 5774 items: 5775 $ref: "#/definitions/OCIPlatform" 5776 5777 paths: 5778 /containers/json: 5779 get: 5780 summary: "List containers" 5781 description: | 5782 Returns a list of containers. For details on the format, see the 5783 [inspect endpoint](#operation/ContainerInspect). 5784 5785 Note that it uses a different, smaller representation of a container 5786 than inspecting a single container. For example, the list of linked 5787 containers is not propagated . 5788 operationId: "ContainerList" 5789 produces: 5790 - "application/json" 5791 parameters: 5792 - name: "all" 5793 in: "query" 5794 description: | 5795 Return all containers. By default, only running containers are shown. 5796 type: "boolean" 5797 default: false 5798 - name: "limit" 5799 in: "query" 5800 description: | 5801 Return this number of most recently created containers, including 5802 non-running ones. 5803 type: "integer" 5804 - name: "size" 5805 in: "query" 5806 description: | 5807 Return the size of container as fields `SizeRw` and `SizeRootFs`. 5808 type: "boolean" 5809 default: false 5810 - name: "filters" 5811 in: "query" 5812 description: | 5813 Filters to process on the container list, encoded as JSON (a 5814 `map[string][]string`). For example, `{"status": ["paused"]}` will 5815 only return paused containers. 5816 5817 Available filters: 5818 5819 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 5820 - `before`=(`<container id>` or `<container name>`) 5821 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5822 - `exited=<int>` containers with exit code of `<int>` 5823 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 5824 - `id=<ID>` a container's ID 5825 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 5826 - `is-task=`(`true`|`false`) 5827 - `label=key` or `label="key=value"` of a container label 5828 - `name=<name>` a container's name 5829 - `network`=(`<network id>` or `<network name>`) 5830 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5831 - `since`=(`<container id>` or `<container name>`) 5832 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 5833 - `volume`=(`<volume name>` or `<mount point destination>`) 5834 type: "string" 5835 responses: 5836 200: 5837 description: "no error" 5838 schema: 5839 type: "array" 5840 items: 5841 $ref: "#/definitions/ContainerSummary" 5842 examples: 5843 application/json: 5844 - Id: "8dfafdbc3a40" 5845 Names: 5846 - "/boring_feynman" 5847 Image: "ubuntu:latest" 5848 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5849 Command: "echo 1" 5850 Created: 1367854155 5851 State: "Exited" 5852 Status: "Exit 0" 5853 Ports: 5854 - PrivatePort: 2222 5855 PublicPort: 3333 5856 Type: "tcp" 5857 Labels: 5858 com.example.vendor: "Acme" 5859 com.example.license: "GPL" 5860 com.example.version: "1.0" 5861 SizeRw: 12288 5862 SizeRootFs: 0 5863 HostConfig: 5864 NetworkMode: "default" 5865 NetworkSettings: 5866 Networks: 5867 bridge: 5868 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5869 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 5870 Gateway: "172.17.0.1" 5871 IPAddress: "172.17.0.2" 5872 IPPrefixLen: 16 5873 IPv6Gateway: "" 5874 GlobalIPv6Address: "" 5875 GlobalIPv6PrefixLen: 0 5876 MacAddress: "02:42:ac:11:00:02" 5877 Mounts: 5878 - Name: "fac362...80535" 5879 Source: "/data" 5880 Destination: "/data" 5881 Driver: "local" 5882 Mode: "ro,Z" 5883 RW: false 5884 Propagation: "" 5885 - Id: "9cd87474be90" 5886 Names: 5887 - "/coolName" 5888 Image: "ubuntu:latest" 5889 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5890 Command: "echo 222222" 5891 Created: 1367854155 5892 State: "Exited" 5893 Status: "Exit 0" 5894 Ports: [] 5895 Labels: {} 5896 SizeRw: 12288 5897 SizeRootFs: 0 5898 HostConfig: 5899 NetworkMode: "default" 5900 NetworkSettings: 5901 Networks: 5902 bridge: 5903 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5904 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 5905 Gateway: "172.17.0.1" 5906 IPAddress: "172.17.0.8" 5907 IPPrefixLen: 16 5908 IPv6Gateway: "" 5909 GlobalIPv6Address: "" 5910 GlobalIPv6PrefixLen: 0 5911 MacAddress: "02:42:ac:11:00:08" 5912 Mounts: [] 5913 - Id: "3176a2479c92" 5914 Names: 5915 - "/sleepy_dog" 5916 Image: "ubuntu:latest" 5917 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5918 Command: "echo 3333333333333333" 5919 Created: 1367854154 5920 State: "Exited" 5921 Status: "Exit 0" 5922 Ports: [] 5923 Labels: {} 5924 SizeRw: 12288 5925 SizeRootFs: 0 5926 HostConfig: 5927 NetworkMode: "default" 5928 NetworkSettings: 5929 Networks: 5930 bridge: 5931 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5932 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 5933 Gateway: "172.17.0.1" 5934 IPAddress: "172.17.0.6" 5935 IPPrefixLen: 16 5936 IPv6Gateway: "" 5937 GlobalIPv6Address: "" 5938 GlobalIPv6PrefixLen: 0 5939 MacAddress: "02:42:ac:11:00:06" 5940 Mounts: [] 5941 - Id: "4cb07b47f9fb" 5942 Names: 5943 - "/running_cat" 5944 Image: "ubuntu:latest" 5945 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5946 Command: "echo 444444444444444444444444444444444" 5947 Created: 1367854152 5948 State: "Exited" 5949 Status: "Exit 0" 5950 Ports: [] 5951 Labels: {} 5952 SizeRw: 12288 5953 SizeRootFs: 0 5954 HostConfig: 5955 NetworkMode: "default" 5956 NetworkSettings: 5957 Networks: 5958 bridge: 5959 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5960 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 5961 Gateway: "172.17.0.1" 5962 IPAddress: "172.17.0.5" 5963 IPPrefixLen: 16 5964 IPv6Gateway: "" 5965 GlobalIPv6Address: "" 5966 GlobalIPv6PrefixLen: 0 5967 MacAddress: "02:42:ac:11:00:05" 5968 Mounts: [] 5969 400: 5970 description: "bad parameter" 5971 schema: 5972 $ref: "#/definitions/ErrorResponse" 5973 500: 5974 description: "server error" 5975 schema: 5976 $ref: "#/definitions/ErrorResponse" 5977 tags: ["Container"] 5978 /containers/create: 5979 post: 5980 summary: "Create a container" 5981 operationId: "ContainerCreate" 5982 consumes: 5983 - "application/json" 5984 - "application/octet-stream" 5985 produces: 5986 - "application/json" 5987 parameters: 5988 - name: "name" 5989 in: "query" 5990 description: | 5991 Assign the specified name to the container. Must match 5992 `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. 5993 type: "string" 5994 pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" 5995 - name: "platform" 5996 in: "query" 5997 description: | 5998 Platform in the format `os[/arch[/variant]]` used for image lookup. 5999 6000 When specified, the daemon checks if the requested image is present 6001 in the local image cache with the given OS and Architecture, and 6002 otherwise returns a `404` status. 6003 6004 If the option is not set, the host's native OS and Architecture are 6005 used to look up the image in the image cache. However, if no platform 6006 is passed and the given image does exist in the local image cache, 6007 but its OS or architecture does not match, the container is created 6008 with the available image, and a warning is added to the `Warnings` 6009 field in the response, for example; 6010 6011 WARNING: The requested image's platform (linux/arm64/v8) does not 6012 match the detected host platform (linux/amd64) and no 6013 specific platform was requested 6014 6015 type: "string" 6016 default: "" 6017 - name: "body" 6018 in: "body" 6019 description: "Container to create" 6020 schema: 6021 allOf: 6022 - $ref: "#/definitions/ContainerConfig" 6023 - type: "object" 6024 properties: 6025 HostConfig: 6026 $ref: "#/definitions/HostConfig" 6027 NetworkingConfig: 6028 $ref: "#/definitions/NetworkingConfig" 6029 example: 6030 Hostname: "" 6031 Domainname: "" 6032 User: "" 6033 AttachStdin: false 6034 AttachStdout: true 6035 AttachStderr: true 6036 Tty: false 6037 OpenStdin: false 6038 StdinOnce: false 6039 Env: 6040 - "FOO=bar" 6041 - "BAZ=quux" 6042 Cmd: 6043 - "date" 6044 Entrypoint: "" 6045 Image: "ubuntu" 6046 Labels: 6047 com.example.vendor: "Acme" 6048 com.example.license: "GPL" 6049 com.example.version: "1.0" 6050 Volumes: 6051 /volumes/data: {} 6052 WorkingDir: "" 6053 NetworkDisabled: false 6054 MacAddress: "12:34:56:78:9a:bc" 6055 ExposedPorts: 6056 22/tcp: {} 6057 StopSignal: "SIGTERM" 6058 StopTimeout: 10 6059 HostConfig: 6060 Binds: 6061 - "/tmp:/tmp" 6062 Links: 6063 - "redis3:redis" 6064 Memory: 0 6065 MemorySwap: 0 6066 MemoryReservation: 0 6067 KernelMemory: 0 6068 NanoCpus: 500000 6069 CpuPercent: 80 6070 CpuShares: 512 6071 CpuPeriod: 100000 6072 CpuRealtimePeriod: 1000000 6073 CpuRealtimeRuntime: 10000 6074 CpuQuota: 50000 6075 CpusetCpus: "0,1" 6076 CpusetMems: "0,1" 6077 MaximumIOps: 0 6078 MaximumIOBps: 0 6079 BlkioWeight: 300 6080 BlkioWeightDevice: 6081 - {} 6082 BlkioDeviceReadBps: 6083 - {} 6084 BlkioDeviceReadIOps: 6085 - {} 6086 BlkioDeviceWriteBps: 6087 - {} 6088 BlkioDeviceWriteIOps: 6089 - {} 6090 DeviceRequests: 6091 - Driver: "nvidia" 6092 Count: -1 6093 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6094 Capabilities: [["gpu", "nvidia", "compute"]] 6095 Options: 6096 property1: "string" 6097 property2: "string" 6098 MemorySwappiness: 60 6099 OomKillDisable: false 6100 OomScoreAdj: 500 6101 PidMode: "" 6102 PidsLimit: 0 6103 PortBindings: 6104 22/tcp: 6105 - HostPort: "11022" 6106 PublishAllPorts: false 6107 Privileged: false 6108 ReadonlyRootfs: false 6109 Dns: 6110 - "8.8.8.8" 6111 DnsOptions: 6112 - "" 6113 DnsSearch: 6114 - "" 6115 VolumesFrom: 6116 - "parent" 6117 - "other:ro" 6118 CapAdd: 6119 - "NET_ADMIN" 6120 CapDrop: 6121 - "MKNOD" 6122 GroupAdd: 6123 - "newgroup" 6124 RestartPolicy: 6125 Name: "" 6126 MaximumRetryCount: 0 6127 AutoRemove: true 6128 NetworkMode: "bridge" 6129 Devices: [] 6130 Ulimits: 6131 - {} 6132 LogConfig: 6133 Type: "json-file" 6134 Config: {} 6135 SecurityOpt: [] 6136 StorageOpt: {} 6137 CgroupParent: "" 6138 VolumeDriver: "" 6139 ShmSize: 67108864 6140 NetworkingConfig: 6141 EndpointsConfig: 6142 isolated_nw: 6143 IPAMConfig: 6144 IPv4Address: "172.20.30.33" 6145 IPv6Address: "2001:db8:abcd::3033" 6146 LinkLocalIPs: 6147 - "169.254.34.68" 6148 - "fe80::3468" 6149 Links: 6150 - "container_1" 6151 - "container_2" 6152 Aliases: 6153 - "server_x" 6154 - "server_y" 6155 6156 required: true 6157 responses: 6158 201: 6159 description: "Container created successfully" 6160 schema: 6161 type: "object" 6162 title: "ContainerCreateResponse" 6163 description: "OK response to ContainerCreate operation" 6164 required: [Id, Warnings] 6165 properties: 6166 Id: 6167 description: "The ID of the created container" 6168 type: "string" 6169 x-nullable: false 6170 Warnings: 6171 description: "Warnings encountered when creating the container" 6172 type: "array" 6173 x-nullable: false 6174 items: 6175 type: "string" 6176 examples: 6177 application/json: 6178 Id: "e90e34656806" 6179 Warnings: [] 6180 400: 6181 description: "bad parameter" 6182 schema: 6183 $ref: "#/definitions/ErrorResponse" 6184 404: 6185 description: "no such image" 6186 schema: 6187 $ref: "#/definitions/ErrorResponse" 6188 examples: 6189 application/json: 6190 message: "No such image: c2ada9df5af8" 6191 409: 6192 description: "conflict" 6193 schema: 6194 $ref: "#/definitions/ErrorResponse" 6195 500: 6196 description: "server error" 6197 schema: 6198 $ref: "#/definitions/ErrorResponse" 6199 tags: ["Container"] 6200 /containers/{id}/json: 6201 get: 6202 summary: "Inspect a container" 6203 description: "Return low-level information about a container." 6204 operationId: "ContainerInspect" 6205 produces: 6206 - "application/json" 6207 responses: 6208 200: 6209 description: "no error" 6210 schema: 6211 type: "object" 6212 title: "ContainerInspectResponse" 6213 properties: 6214 Id: 6215 description: "The ID of the container" 6216 type: "string" 6217 Created: 6218 description: "The time the container was created" 6219 type: "string" 6220 Path: 6221 description: "The path to the command being run" 6222 type: "string" 6223 Args: 6224 description: "The arguments to the command being run" 6225 type: "array" 6226 items: 6227 type: "string" 6228 State: 6229 $ref: "#/definitions/ContainerState" 6230 Image: 6231 description: "The container's image ID" 6232 type: "string" 6233 ResolvConfPath: 6234 type: "string" 6235 HostnamePath: 6236 type: "string" 6237 HostsPath: 6238 type: "string" 6239 LogPath: 6240 type: "string" 6241 Name: 6242 type: "string" 6243 RestartCount: 6244 type: "integer" 6245 Driver: 6246 type: "string" 6247 Platform: 6248 type: "string" 6249 MountLabel: 6250 type: "string" 6251 ProcessLabel: 6252 type: "string" 6253 AppArmorProfile: 6254 type: "string" 6255 ExecIDs: 6256 description: "IDs of exec instances that are running in the container." 6257 type: "array" 6258 items: 6259 type: "string" 6260 x-nullable: true 6261 HostConfig: 6262 $ref: "#/definitions/HostConfig" 6263 GraphDriver: 6264 $ref: "#/definitions/GraphDriverData" 6265 SizeRw: 6266 description: | 6267 The size of files that have been created or changed by this 6268 container. 6269 type: "integer" 6270 format: "int64" 6271 SizeRootFs: 6272 description: "The total size of all the files in this container." 6273 type: "integer" 6274 format: "int64" 6275 Mounts: 6276 type: "array" 6277 items: 6278 $ref: "#/definitions/MountPoint" 6279 Config: 6280 $ref: "#/definitions/ContainerConfig" 6281 NetworkSettings: 6282 $ref: "#/definitions/NetworkSettings" 6283 examples: 6284 application/json: 6285 AppArmorProfile: "" 6286 Args: 6287 - "-c" 6288 - "exit 9" 6289 Config: 6290 AttachStderr: true 6291 AttachStdin: false 6292 AttachStdout: true 6293 Cmd: 6294 - "/bin/sh" 6295 - "-c" 6296 - "exit 9" 6297 Domainname: "" 6298 Env: 6299 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 6300 Healthcheck: 6301 Test: ["CMD-SHELL", "exit 0"] 6302 Hostname: "ba033ac44011" 6303 Image: "ubuntu" 6304 Labels: 6305 com.example.vendor: "Acme" 6306 com.example.license: "GPL" 6307 com.example.version: "1.0" 6308 MacAddress: "" 6309 NetworkDisabled: false 6310 OpenStdin: false 6311 StdinOnce: false 6312 Tty: false 6313 User: "" 6314 Volumes: 6315 /volumes/data: {} 6316 WorkingDir: "" 6317 StopSignal: "SIGTERM" 6318 StopTimeout: 10 6319 Created: "2015-01-06T15:47:31.485331387Z" 6320 Driver: "devicemapper" 6321 ExecIDs: 6322 - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" 6323 - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" 6324 HostConfig: 6325 MaximumIOps: 0 6326 MaximumIOBps: 0 6327 BlkioWeight: 0 6328 BlkioWeightDevice: 6329 - {} 6330 BlkioDeviceReadBps: 6331 - {} 6332 BlkioDeviceWriteBps: 6333 - {} 6334 BlkioDeviceReadIOps: 6335 - {} 6336 BlkioDeviceWriteIOps: 6337 - {} 6338 ContainerIDFile: "" 6339 CpusetCpus: "" 6340 CpusetMems: "" 6341 CpuPercent: 80 6342 CpuShares: 0 6343 CpuPeriod: 100000 6344 CpuRealtimePeriod: 1000000 6345 CpuRealtimeRuntime: 10000 6346 Devices: [] 6347 DeviceRequests: 6348 - Driver: "nvidia" 6349 Count: -1 6350 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6351 Capabilities: [["gpu", "nvidia", "compute"]] 6352 Options: 6353 property1: "string" 6354 property2: "string" 6355 IpcMode: "" 6356 Memory: 0 6357 MemorySwap: 0 6358 MemoryReservation: 0 6359 KernelMemory: 0 6360 OomKillDisable: false 6361 OomScoreAdj: 500 6362 NetworkMode: "bridge" 6363 PidMode: "" 6364 PortBindings: {} 6365 Privileged: false 6366 ReadonlyRootfs: false 6367 PublishAllPorts: false 6368 RestartPolicy: 6369 MaximumRetryCount: 2 6370 Name: "on-failure" 6371 LogConfig: 6372 Type: "json-file" 6373 Sysctls: 6374 net.ipv4.ip_forward: "1" 6375 Ulimits: 6376 - {} 6377 VolumeDriver: "" 6378 ShmSize: 67108864 6379 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 6380 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 6381 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 6382 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 6383 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 6384 MountLabel: "" 6385 Name: "/boring_euclid" 6386 NetworkSettings: 6387 Bridge: "" 6388 SandboxID: "" 6389 HairpinMode: false 6390 LinkLocalIPv6Address: "" 6391 LinkLocalIPv6PrefixLen: 0 6392 SandboxKey: "" 6393 EndpointID: "" 6394 Gateway: "" 6395 GlobalIPv6Address: "" 6396 GlobalIPv6PrefixLen: 0 6397 IPAddress: "" 6398 IPPrefixLen: 0 6399 IPv6Gateway: "" 6400 MacAddress: "" 6401 Networks: 6402 bridge: 6403 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6404 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 6405 Gateway: "172.17.0.1" 6406 IPAddress: "172.17.0.2" 6407 IPPrefixLen: 16 6408 IPv6Gateway: "" 6409 GlobalIPv6Address: "" 6410 GlobalIPv6PrefixLen: 0 6411 MacAddress: "02:42:ac:12:00:02" 6412 Path: "/bin/sh" 6413 ProcessLabel: "" 6414 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 6415 RestartCount: 1 6416 State: 6417 Error: "" 6418 ExitCode: 9 6419 FinishedAt: "2015-01-06T15:47:32.080254511Z" 6420 Health: 6421 Status: "healthy" 6422 FailingStreak: 0 6423 Log: 6424 - Start: "2019-12-22T10:59:05.6385933Z" 6425 End: "2019-12-22T10:59:05.8078452Z" 6426 ExitCode: 0 6427 Output: "" 6428 OOMKilled: false 6429 Dead: false 6430 Paused: false 6431 Pid: 0 6432 Restarting: false 6433 Running: true 6434 StartedAt: "2015-01-06T15:47:32.072697474Z" 6435 Status: "running" 6436 Mounts: 6437 - Name: "fac362...80535" 6438 Source: "/data" 6439 Destination: "/data" 6440 Driver: "local" 6441 Mode: "ro,Z" 6442 RW: false 6443 Propagation: "" 6444 404: 6445 description: "no such container" 6446 schema: 6447 $ref: "#/definitions/ErrorResponse" 6448 examples: 6449 application/json: 6450 message: "No such container: c2ada9df5af8" 6451 500: 6452 description: "server error" 6453 schema: 6454 $ref: "#/definitions/ErrorResponse" 6455 parameters: 6456 - name: "id" 6457 in: "path" 6458 required: true 6459 description: "ID or name of the container" 6460 type: "string" 6461 - name: "size" 6462 in: "query" 6463 type: "boolean" 6464 default: false 6465 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 6466 tags: ["Container"] 6467 /containers/{id}/top: 6468 get: 6469 summary: "List processes running inside a container" 6470 description: | 6471 On Unix systems, this is done by running the `ps` command. This endpoint 6472 is not supported on Windows. 6473 operationId: "ContainerTop" 6474 responses: 6475 200: 6476 description: "no error" 6477 schema: 6478 type: "object" 6479 title: "ContainerTopResponse" 6480 description: "OK response to ContainerTop operation" 6481 properties: 6482 Titles: 6483 description: "The ps column titles" 6484 type: "array" 6485 items: 6486 type: "string" 6487 Processes: 6488 description: | 6489 Each process running in the container, where each is process 6490 is an array of values corresponding to the titles. 6491 type: "array" 6492 items: 6493 type: "array" 6494 items: 6495 type: "string" 6496 examples: 6497 application/json: 6498 Titles: 6499 - "UID" 6500 - "PID" 6501 - "PPID" 6502 - "C" 6503 - "STIME" 6504 - "TTY" 6505 - "TIME" 6506 - "CMD" 6507 Processes: 6508 - 6509 - "root" 6510 - "13642" 6511 - "882" 6512 - "0" 6513 - "17:03" 6514 - "pts/0" 6515 - "00:00:00" 6516 - "/bin/bash" 6517 - 6518 - "root" 6519 - "13735" 6520 - "13642" 6521 - "0" 6522 - "17:06" 6523 - "pts/0" 6524 - "00:00:00" 6525 - "sleep 10" 6526 404: 6527 description: "no such container" 6528 schema: 6529 $ref: "#/definitions/ErrorResponse" 6530 examples: 6531 application/json: 6532 message: "No such container: c2ada9df5af8" 6533 500: 6534 description: "server error" 6535 schema: 6536 $ref: "#/definitions/ErrorResponse" 6537 parameters: 6538 - name: "id" 6539 in: "path" 6540 required: true 6541 description: "ID or name of the container" 6542 type: "string" 6543 - name: "ps_args" 6544 in: "query" 6545 description: "The arguments to pass to `ps`. For example, `aux`" 6546 type: "string" 6547 default: "-ef" 6548 tags: ["Container"] 6549 /containers/{id}/logs: 6550 get: 6551 summary: "Get container logs" 6552 description: | 6553 Get `stdout` and `stderr` logs from a container. 6554 6555 Note: This endpoint works only for containers with the `json-file` or 6556 `journald` logging driver. 6557 operationId: "ContainerLogs" 6558 responses: 6559 200: 6560 description: | 6561 logs returned as a stream in response body. 6562 For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 6563 Note that unlike the attach endpoint, the logs endpoint does not 6564 upgrade the connection and does not set Content-Type. 6565 schema: 6566 type: "string" 6567 format: "binary" 6568 404: 6569 description: "no such container" 6570 schema: 6571 $ref: "#/definitions/ErrorResponse" 6572 examples: 6573 application/json: 6574 message: "No such container: c2ada9df5af8" 6575 500: 6576 description: "server error" 6577 schema: 6578 $ref: "#/definitions/ErrorResponse" 6579 parameters: 6580 - name: "id" 6581 in: "path" 6582 required: true 6583 description: "ID or name of the container" 6584 type: "string" 6585 - name: "follow" 6586 in: "query" 6587 description: "Keep connection after returning logs." 6588 type: "boolean" 6589 default: false 6590 - name: "stdout" 6591 in: "query" 6592 description: "Return logs from `stdout`" 6593 type: "boolean" 6594 default: false 6595 - name: "stderr" 6596 in: "query" 6597 description: "Return logs from `stderr`" 6598 type: "boolean" 6599 default: false 6600 - name: "since" 6601 in: "query" 6602 description: "Only return logs since this time, as a UNIX timestamp" 6603 type: "integer" 6604 default: 0 6605 - name: "until" 6606 in: "query" 6607 description: "Only return logs before this time, as a UNIX timestamp" 6608 type: "integer" 6609 default: 0 6610 - name: "timestamps" 6611 in: "query" 6612 description: "Add timestamps to every log line" 6613 type: "boolean" 6614 default: false 6615 - name: "tail" 6616 in: "query" 6617 description: | 6618 Only return this number of log lines from the end of the logs. 6619 Specify as an integer or `all` to output all log lines. 6620 type: "string" 6621 default: "all" 6622 tags: ["Container"] 6623 /containers/{id}/changes: 6624 get: 6625 summary: "Get changes on a container’s filesystem" 6626 description: | 6627 Returns which files in a container's filesystem have been added, deleted, 6628 or modified. The `Kind` of modification can be one of: 6629 6630 - `0`: Modified 6631 - `1`: Added 6632 - `2`: Deleted 6633 operationId: "ContainerChanges" 6634 produces: ["application/json"] 6635 responses: 6636 200: 6637 description: "The list of changes" 6638 schema: 6639 type: "array" 6640 items: 6641 type: "object" 6642 x-go-name: "ContainerChangeResponseItem" 6643 title: "ContainerChangeResponseItem" 6644 description: "change item in response to ContainerChanges operation" 6645 required: [Path, Kind] 6646 properties: 6647 Path: 6648 description: "Path to file that has changed" 6649 type: "string" 6650 x-nullable: false 6651 Kind: 6652 description: "Kind of change" 6653 type: "integer" 6654 format: "uint8" 6655 enum: [0, 1, 2] 6656 x-nullable: false 6657 examples: 6658 application/json: 6659 - Path: "/dev" 6660 Kind: 0 6661 - Path: "/dev/kmsg" 6662 Kind: 1 6663 - Path: "/test" 6664 Kind: 1 6665 404: 6666 description: "no such container" 6667 schema: 6668 $ref: "#/definitions/ErrorResponse" 6669 examples: 6670 application/json: 6671 message: "No such container: c2ada9df5af8" 6672 500: 6673 description: "server error" 6674 schema: 6675 $ref: "#/definitions/ErrorResponse" 6676 parameters: 6677 - name: "id" 6678 in: "path" 6679 required: true 6680 description: "ID or name of the container" 6681 type: "string" 6682 tags: ["Container"] 6683 /containers/{id}/export: 6684 get: 6685 summary: "Export a container" 6686 description: "Export the contents of a container as a tarball." 6687 operationId: "ContainerExport" 6688 produces: 6689 - "application/octet-stream" 6690 responses: 6691 200: 6692 description: "no error" 6693 404: 6694 description: "no such container" 6695 schema: 6696 $ref: "#/definitions/ErrorResponse" 6697 examples: 6698 application/json: 6699 message: "No such container: c2ada9df5af8" 6700 500: 6701 description: "server error" 6702 schema: 6703 $ref: "#/definitions/ErrorResponse" 6704 parameters: 6705 - name: "id" 6706 in: "path" 6707 required: true 6708 description: "ID or name of the container" 6709 type: "string" 6710 tags: ["Container"] 6711 /containers/{id}/stats: 6712 get: 6713 summary: "Get container stats based on resource usage" 6714 description: | 6715 This endpoint returns a live stream of a container’s resource usage 6716 statistics. 6717 6718 The `precpu_stats` is the CPU statistic of the *previous* read, and is 6719 used to calculate the CPU usage percentage. It is not an exact copy 6720 of the `cpu_stats` field. 6721 6722 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 6723 nil then for compatibility with older daemons the length of the 6724 corresponding `cpu_usage.percpu_usage` array should be used. 6725 6726 On a cgroup v2 host, the following fields are not set 6727 * `blkio_stats`: all fields other than `io_service_bytes_recursive` 6728 * `cpu_stats`: `cpu_usage.percpu_usage` 6729 * `memory_stats`: `max_usage` and `failcnt` 6730 Also, `memory_stats.stats` fields are incompatible with cgroup v1. 6731 6732 To calculate the values shown by the `stats` command of the docker cli tool 6733 the following formulas can be used: 6734 * used_memory = `memory_stats.usage - memory_stats.stats.cache` 6735 * available_memory = `memory_stats.limit` 6736 * Memory usage % = `(used_memory / available_memory) * 100.0` 6737 * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` 6738 * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` 6739 * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` 6740 * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` 6741 operationId: "ContainerStats" 6742 produces: ["application/json"] 6743 responses: 6744 200: 6745 description: "no error" 6746 schema: 6747 type: "object" 6748 examples: 6749 application/json: 6750 read: "2015-01-08T22:57:31.547920715Z" 6751 pids_stats: 6752 current: 3 6753 networks: 6754 eth0: 6755 rx_bytes: 5338 6756 rx_dropped: 0 6757 rx_errors: 0 6758 rx_packets: 36 6759 tx_bytes: 648 6760 tx_dropped: 0 6761 tx_errors: 0 6762 tx_packets: 8 6763 eth5: 6764 rx_bytes: 4641 6765 rx_dropped: 0 6766 rx_errors: 0 6767 rx_packets: 26 6768 tx_bytes: 690 6769 tx_dropped: 0 6770 tx_errors: 0 6771 tx_packets: 9 6772 memory_stats: 6773 stats: 6774 total_pgmajfault: 0 6775 cache: 0 6776 mapped_file: 0 6777 total_inactive_file: 0 6778 pgpgout: 414 6779 rss: 6537216 6780 total_mapped_file: 0 6781 writeback: 0 6782 unevictable: 0 6783 pgpgin: 477 6784 total_unevictable: 0 6785 pgmajfault: 0 6786 total_rss: 6537216 6787 total_rss_huge: 6291456 6788 total_writeback: 0 6789 total_inactive_anon: 0 6790 rss_huge: 6291456 6791 hierarchical_memory_limit: 67108864 6792 total_pgfault: 964 6793 total_active_file: 0 6794 active_anon: 6537216 6795 total_active_anon: 6537216 6796 total_pgpgout: 414 6797 total_cache: 0 6798 inactive_anon: 0 6799 active_file: 0 6800 pgfault: 964 6801 inactive_file: 0 6802 total_pgpgin: 477 6803 max_usage: 6651904 6804 usage: 6537216 6805 failcnt: 0 6806 limit: 67108864 6807 blkio_stats: {} 6808 cpu_stats: 6809 cpu_usage: 6810 percpu_usage: 6811 - 8646879 6812 - 24472255 6813 - 36438778 6814 - 30657443 6815 usage_in_usermode: 50000000 6816 total_usage: 100215355 6817 usage_in_kernelmode: 30000000 6818 system_cpu_usage: 739306590000000 6819 online_cpus: 4 6820 throttling_data: 6821 periods: 0 6822 throttled_periods: 0 6823 throttled_time: 0 6824 precpu_stats: 6825 cpu_usage: 6826 percpu_usage: 6827 - 8646879 6828 - 24350896 6829 - 36438778 6830 - 30657443 6831 usage_in_usermode: 50000000 6832 total_usage: 100093996 6833 usage_in_kernelmode: 30000000 6834 system_cpu_usage: 9492140000000 6835 online_cpus: 4 6836 throttling_data: 6837 periods: 0 6838 throttled_periods: 0 6839 throttled_time: 0 6840 404: 6841 description: "no such container" 6842 schema: 6843 $ref: "#/definitions/ErrorResponse" 6844 examples: 6845 application/json: 6846 message: "No such container: c2ada9df5af8" 6847 500: 6848 description: "server error" 6849 schema: 6850 $ref: "#/definitions/ErrorResponse" 6851 parameters: 6852 - name: "id" 6853 in: "path" 6854 required: true 6855 description: "ID or name of the container" 6856 type: "string" 6857 - name: "stream" 6858 in: "query" 6859 description: | 6860 Stream the output. If false, the stats will be output once and then 6861 it will disconnect. 6862 type: "boolean" 6863 default: true 6864 - name: "one-shot" 6865 in: "query" 6866 description: | 6867 Only get a single stat instead of waiting for 2 cycles. Must be used 6868 with `stream=false`. 6869 type: "boolean" 6870 default: false 6871 tags: ["Container"] 6872 /containers/{id}/resize: 6873 post: 6874 summary: "Resize a container TTY" 6875 description: "Resize the TTY for a container." 6876 operationId: "ContainerResize" 6877 consumes: 6878 - "application/octet-stream" 6879 produces: 6880 - "text/plain" 6881 responses: 6882 200: 6883 description: "no error" 6884 404: 6885 description: "no such container" 6886 schema: 6887 $ref: "#/definitions/ErrorResponse" 6888 examples: 6889 application/json: 6890 message: "No such container: c2ada9df5af8" 6891 500: 6892 description: "cannot resize container" 6893 schema: 6894 $ref: "#/definitions/ErrorResponse" 6895 parameters: 6896 - name: "id" 6897 in: "path" 6898 required: true 6899 description: "ID or name of the container" 6900 type: "string" 6901 - name: "h" 6902 in: "query" 6903 description: "Height of the TTY session in characters" 6904 type: "integer" 6905 - name: "w" 6906 in: "query" 6907 description: "Width of the TTY session in characters" 6908 type: "integer" 6909 tags: ["Container"] 6910 /containers/{id}/start: 6911 post: 6912 summary: "Start a container" 6913 operationId: "ContainerStart" 6914 responses: 6915 204: 6916 description: "no error" 6917 304: 6918 description: "container already started" 6919 404: 6920 description: "no such container" 6921 schema: 6922 $ref: "#/definitions/ErrorResponse" 6923 examples: 6924 application/json: 6925 message: "No such container: c2ada9df5af8" 6926 500: 6927 description: "server error" 6928 schema: 6929 $ref: "#/definitions/ErrorResponse" 6930 parameters: 6931 - name: "id" 6932 in: "path" 6933 required: true 6934 description: "ID or name of the container" 6935 type: "string" 6936 - name: "detachKeys" 6937 in: "query" 6938 description: | 6939 Override the key sequence for detaching a container. Format is a 6940 single character `[a-Z]` or `ctrl-<value>` where `<value>` is one 6941 of: `a-z`, `@`, `^`, `[`, `,` or `_`. 6942 type: "string" 6943 tags: ["Container"] 6944 /containers/{id}/stop: 6945 post: 6946 summary: "Stop a container" 6947 operationId: "ContainerStop" 6948 responses: 6949 204: 6950 description: "no error" 6951 304: 6952 description: "container already stopped" 6953 404: 6954 description: "no such container" 6955 schema: 6956 $ref: "#/definitions/ErrorResponse" 6957 examples: 6958 application/json: 6959 message: "No such container: c2ada9df5af8" 6960 500: 6961 description: "server error" 6962 schema: 6963 $ref: "#/definitions/ErrorResponse" 6964 parameters: 6965 - name: "id" 6966 in: "path" 6967 required: true 6968 description: "ID or name of the container" 6969 type: "string" 6970 - name: "t" 6971 in: "query" 6972 description: "Number of seconds to wait before killing the container" 6973 type: "integer" 6974 tags: ["Container"] 6975 /containers/{id}/restart: 6976 post: 6977 summary: "Restart a container" 6978 operationId: "ContainerRestart" 6979 responses: 6980 204: 6981 description: "no error" 6982 404: 6983 description: "no such container" 6984 schema: 6985 $ref: "#/definitions/ErrorResponse" 6986 examples: 6987 application/json: 6988 message: "No such container: c2ada9df5af8" 6989 500: 6990 description: "server error" 6991 schema: 6992 $ref: "#/definitions/ErrorResponse" 6993 parameters: 6994 - name: "id" 6995 in: "path" 6996 required: true 6997 description: "ID or name of the container" 6998 type: "string" 6999 - name: "t" 7000 in: "query" 7001 description: "Number of seconds to wait before killing the container" 7002 type: "integer" 7003 tags: ["Container"] 7004 /containers/{id}/kill: 7005 post: 7006 summary: "Kill a container" 7007 description: | 7008 Send a POSIX signal to a container, defaulting to killing to the 7009 container. 7010 operationId: "ContainerKill" 7011 responses: 7012 204: 7013 description: "no error" 7014 404: 7015 description: "no such container" 7016 schema: 7017 $ref: "#/definitions/ErrorResponse" 7018 examples: 7019 application/json: 7020 message: "No such container: c2ada9df5af8" 7021 409: 7022 description: "container is not running" 7023 schema: 7024 $ref: "#/definitions/ErrorResponse" 7025 examples: 7026 application/json: 7027 message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 7028 500: 7029 description: "server error" 7030 schema: 7031 $ref: "#/definitions/ErrorResponse" 7032 parameters: 7033 - name: "id" 7034 in: "path" 7035 required: true 7036 description: "ID or name of the container" 7037 type: "string" 7038 - name: "signal" 7039 in: "query" 7040 description: | 7041 Signal to send to the container as an integer or string (e.g. `SIGINT`). 7042 type: "string" 7043 default: "SIGKILL" 7044 tags: ["Container"] 7045 /containers/{id}/update: 7046 post: 7047 summary: "Update a container" 7048 description: | 7049 Change various configuration options of a container without having to 7050 recreate it. 7051 operationId: "ContainerUpdate" 7052 consumes: ["application/json"] 7053 produces: ["application/json"] 7054 responses: 7055 200: 7056 description: "The container has been updated." 7057 schema: 7058 type: "object" 7059 title: "ContainerUpdateResponse" 7060 description: "OK response to ContainerUpdate operation" 7061 properties: 7062 Warnings: 7063 type: "array" 7064 items: 7065 type: "string" 7066 404: 7067 description: "no such container" 7068 schema: 7069 $ref: "#/definitions/ErrorResponse" 7070 examples: 7071 application/json: 7072 message: "No such container: c2ada9df5af8" 7073 500: 7074 description: "server error" 7075 schema: 7076 $ref: "#/definitions/ErrorResponse" 7077 parameters: 7078 - name: "id" 7079 in: "path" 7080 required: true 7081 description: "ID or name of the container" 7082 type: "string" 7083 - name: "update" 7084 in: "body" 7085 required: true 7086 schema: 7087 allOf: 7088 - $ref: "#/definitions/Resources" 7089 - type: "object" 7090 properties: 7091 RestartPolicy: 7092 $ref: "#/definitions/RestartPolicy" 7093 example: 7094 BlkioWeight: 300 7095 CpuShares: 512 7096 CpuPeriod: 100000 7097 CpuQuota: 50000 7098 CpuRealtimePeriod: 1000000 7099 CpuRealtimeRuntime: 10000 7100 CpusetCpus: "0,1" 7101 CpusetMems: "0" 7102 Memory: 314572800 7103 MemorySwap: 514288000 7104 MemoryReservation: 209715200 7105 KernelMemory: 52428800 7106 RestartPolicy: 7107 MaximumRetryCount: 4 7108 Name: "on-failure" 7109 tags: ["Container"] 7110 /containers/{id}/rename: 7111 post: 7112 summary: "Rename a container" 7113 operationId: "ContainerRename" 7114 responses: 7115 204: 7116 description: "no error" 7117 404: 7118 description: "no such container" 7119 schema: 7120 $ref: "#/definitions/ErrorResponse" 7121 examples: 7122 application/json: 7123 message: "No such container: c2ada9df5af8" 7124 409: 7125 description: "name already in use" 7126 schema: 7127 $ref: "#/definitions/ErrorResponse" 7128 500: 7129 description: "server error" 7130 schema: 7131 $ref: "#/definitions/ErrorResponse" 7132 parameters: 7133 - name: "id" 7134 in: "path" 7135 required: true 7136 description: "ID or name of the container" 7137 type: "string" 7138 - name: "name" 7139 in: "query" 7140 required: true 7141 description: "New name for the container" 7142 type: "string" 7143 tags: ["Container"] 7144 /containers/{id}/pause: 7145 post: 7146 summary: "Pause a container" 7147 description: | 7148 Use the freezer cgroup to suspend all processes in a container. 7149 7150 Traditionally, when suspending a process the `SIGSTOP` signal is used, 7151 which is observable by the process being suspended. With the freezer 7152 cgroup the process is unaware, and unable to capture, that it is being 7153 suspended, and subsequently resumed. 7154 operationId: "ContainerPause" 7155 responses: 7156 204: 7157 description: "no error" 7158 404: 7159 description: "no such container" 7160 schema: 7161 $ref: "#/definitions/ErrorResponse" 7162 examples: 7163 application/json: 7164 message: "No such container: c2ada9df5af8" 7165 500: 7166 description: "server error" 7167 schema: 7168 $ref: "#/definitions/ErrorResponse" 7169 parameters: 7170 - name: "id" 7171 in: "path" 7172 required: true 7173 description: "ID or name of the container" 7174 type: "string" 7175 tags: ["Container"] 7176 /containers/{id}/unpause: 7177 post: 7178 summary: "Unpause a container" 7179 description: "Resume a container which has been paused." 7180 operationId: "ContainerUnpause" 7181 responses: 7182 204: 7183 description: "no error" 7184 404: 7185 description: "no such container" 7186 schema: 7187 $ref: "#/definitions/ErrorResponse" 7188 examples: 7189 application/json: 7190 message: "No such container: c2ada9df5af8" 7191 500: 7192 description: "server error" 7193 schema: 7194 $ref: "#/definitions/ErrorResponse" 7195 parameters: 7196 - name: "id" 7197 in: "path" 7198 required: true 7199 description: "ID or name of the container" 7200 type: "string" 7201 tags: ["Container"] 7202 /containers/{id}/attach: 7203 post: 7204 summary: "Attach to a container" 7205 description: | 7206 Attach to a container to read its output or send it input. You can attach 7207 to the same container multiple times and you can reattach to containers 7208 that have been detached. 7209 7210 Either the `stream` or `logs` parameter must be `true` for this endpoint 7211 to do anything. 7212 7213 See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) 7214 for more details. 7215 7216 ### Hijacking 7217 7218 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, 7219 and `stderr` on the same socket. 7220 7221 This is the response from the daemon for an attach request: 7222 7223 ``` 7224 HTTP/1.1 200 OK 7225 Content-Type: application/vnd.docker.raw-stream 7226 7227 [STREAM] 7228 ``` 7229 7230 After the headers and two new lines, the TCP connection can now be used 7231 for raw, bidirectional communication between the client and server. 7232 7233 To hint potential proxies about connection hijacking, the Docker client 7234 can also optionally send connection upgrade headers. 7235 7236 For example, the client sends this request to upgrade the connection: 7237 7238 ``` 7239 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 7240 Upgrade: tcp 7241 Connection: Upgrade 7242 ``` 7243 7244 The Docker daemon will respond with a `101 UPGRADED` response, and will 7245 similarly follow with the raw stream: 7246 7247 ``` 7248 HTTP/1.1 101 UPGRADED 7249 Content-Type: application/vnd.docker.raw-stream 7250 Connection: Upgrade 7251 Upgrade: tcp 7252 7253 [STREAM] 7254 ``` 7255 7256 ### Stream format 7257 7258 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), 7259 the stream over the hijacked connected is multiplexed to separate out 7260 `stdout` and `stderr`. The stream consists of a series of frames, each 7261 containing a header and a payload. 7262 7263 The header contains the information which the stream writes (`stdout` or 7264 `stderr`). It also contains the size of the associated frame encoded in 7265 the last four bytes (`uint32`). 7266 7267 It is encoded on the first eight bytes like this: 7268 7269 ```go 7270 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 7271 ``` 7272 7273 `STREAM_TYPE` can be: 7274 7275 - 0: `stdin` (is written on `stdout`) 7276 - 1: `stdout` 7277 - 2: `stderr` 7278 7279 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size 7280 encoded as big endian. 7281 7282 Following the header is the payload, which is the specified number of 7283 bytes of `STREAM_TYPE`. 7284 7285 The simplest way to implement this protocol is the following: 7286 7287 1. Read 8 bytes. 7288 2. Choose `stdout` or `stderr` depending on the first byte. 7289 3. Extract the frame size from the last four bytes. 7290 4. Read the extracted size and output it on the correct output. 7291 5. Goto 1. 7292 7293 ### Stream format when using a TTY 7294 7295 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), 7296 the stream is not multiplexed. The data exchanged over the hijacked 7297 connection is simply the raw data from the process PTY and client's 7298 `stdin`. 7299 7300 operationId: "ContainerAttach" 7301 produces: 7302 - "application/vnd.docker.raw-stream" 7303 responses: 7304 101: 7305 description: "no error, hints proxy about hijacking" 7306 200: 7307 description: "no error, no upgrade header found" 7308 400: 7309 description: "bad parameter" 7310 schema: 7311 $ref: "#/definitions/ErrorResponse" 7312 404: 7313 description: "no such container" 7314 schema: 7315 $ref: "#/definitions/ErrorResponse" 7316 examples: 7317 application/json: 7318 message: "No such container: c2ada9df5af8" 7319 500: 7320 description: "server error" 7321 schema: 7322 $ref: "#/definitions/ErrorResponse" 7323 parameters: 7324 - name: "id" 7325 in: "path" 7326 required: true 7327 description: "ID or name of the container" 7328 type: "string" 7329 - name: "detachKeys" 7330 in: "query" 7331 description: | 7332 Override the key sequence for detaching a container.Format is a single 7333 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7334 `@`, `^`, `[`, `,` or `_`. 7335 type: "string" 7336 - name: "logs" 7337 in: "query" 7338 description: | 7339 Replay previous logs from the container. 7340 7341 This is useful for attaching to a container that has started and you 7342 want to output everything since the container started. 7343 7344 If `stream` is also enabled, once all the previous output has been 7345 returned, it will seamlessly transition into streaming current 7346 output. 7347 type: "boolean" 7348 default: false 7349 - name: "stream" 7350 in: "query" 7351 description: | 7352 Stream attached streams from the time the request was made onwards. 7353 type: "boolean" 7354 default: false 7355 - name: "stdin" 7356 in: "query" 7357 description: "Attach to `stdin`" 7358 type: "boolean" 7359 default: false 7360 - name: "stdout" 7361 in: "query" 7362 description: "Attach to `stdout`" 7363 type: "boolean" 7364 default: false 7365 - name: "stderr" 7366 in: "query" 7367 description: "Attach to `stderr`" 7368 type: "boolean" 7369 default: false 7370 tags: ["Container"] 7371 /containers/{id}/attach/ws: 7372 get: 7373 summary: "Attach to a container via a websocket" 7374 operationId: "ContainerAttachWebsocket" 7375 responses: 7376 101: 7377 description: "no error, hints proxy about hijacking" 7378 200: 7379 description: "no error, no upgrade header found" 7380 400: 7381 description: "bad parameter" 7382 schema: 7383 $ref: "#/definitions/ErrorResponse" 7384 404: 7385 description: "no such container" 7386 schema: 7387 $ref: "#/definitions/ErrorResponse" 7388 examples: 7389 application/json: 7390 message: "No such container: c2ada9df5af8" 7391 500: 7392 description: "server error" 7393 schema: 7394 $ref: "#/definitions/ErrorResponse" 7395 parameters: 7396 - name: "id" 7397 in: "path" 7398 required: true 7399 description: "ID or name of the container" 7400 type: "string" 7401 - name: "detachKeys" 7402 in: "query" 7403 description: | 7404 Override the key sequence for detaching a container.Format is a single 7405 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7406 `@`, `^`, `[`, `,`, or `_`. 7407 type: "string" 7408 - name: "logs" 7409 in: "query" 7410 description: "Return logs" 7411 type: "boolean" 7412 default: false 7413 - name: "stream" 7414 in: "query" 7415 description: "Return stream" 7416 type: "boolean" 7417 default: false 7418 tags: ["Container"] 7419 /containers/{id}/wait: 7420 post: 7421 summary: "Wait for a container" 7422 description: "Block until a container stops, then returns the exit code." 7423 operationId: "ContainerWait" 7424 produces: ["application/json"] 7425 responses: 7426 200: 7427 description: "The container has exit." 7428 schema: 7429 $ref: "#/definitions/ContainerWaitResponse" 7430 400: 7431 description: "bad parameter" 7432 schema: 7433 $ref: "#/definitions/ErrorResponse" 7434 404: 7435 description: "no such container" 7436 schema: 7437 $ref: "#/definitions/ErrorResponse" 7438 examples: 7439 application/json: 7440 message: "No such container: c2ada9df5af8" 7441 500: 7442 description: "server error" 7443 schema: 7444 $ref: "#/definitions/ErrorResponse" 7445 parameters: 7446 - name: "id" 7447 in: "path" 7448 required: true 7449 description: "ID or name of the container" 7450 type: "string" 7451 - name: "condition" 7452 in: "query" 7453 description: | 7454 Wait until a container state reaches the given condition. 7455 7456 Defaults to `not-running` if omitted or empty. 7457 type: "string" 7458 enum: 7459 - "not-running" 7460 - "next-exit" 7461 - "removed" 7462 default: "not-running" 7463 tags: ["Container"] 7464 /containers/{id}: 7465 delete: 7466 summary: "Remove a container" 7467 operationId: "ContainerDelete" 7468 responses: 7469 204: 7470 description: "no error" 7471 400: 7472 description: "bad parameter" 7473 schema: 7474 $ref: "#/definitions/ErrorResponse" 7475 404: 7476 description: "no such container" 7477 schema: 7478 $ref: "#/definitions/ErrorResponse" 7479 examples: 7480 application/json: 7481 message: "No such container: c2ada9df5af8" 7482 409: 7483 description: "conflict" 7484 schema: 7485 $ref: "#/definitions/ErrorResponse" 7486 examples: 7487 application/json: 7488 message: | 7489 You cannot remove a running container: c2ada9df5af8. Stop the 7490 container before attempting removal or force remove 7491 500: 7492 description: "server error" 7493 schema: 7494 $ref: "#/definitions/ErrorResponse" 7495 parameters: 7496 - name: "id" 7497 in: "path" 7498 required: true 7499 description: "ID or name of the container" 7500 type: "string" 7501 - name: "v" 7502 in: "query" 7503 description: "Remove anonymous volumes associated with the container." 7504 type: "boolean" 7505 default: false 7506 - name: "force" 7507 in: "query" 7508 description: "If the container is running, kill it before removing it." 7509 type: "boolean" 7510 default: false 7511 - name: "link" 7512 in: "query" 7513 description: "Remove the specified link associated with the container." 7514 type: "boolean" 7515 default: false 7516 tags: ["Container"] 7517 /containers/{id}/archive: 7518 head: 7519 summary: "Get information about files in a container" 7520 description: | 7521 A response header `X-Docker-Container-Path-Stat` is returned, containing 7522 a base64 - encoded JSON object with some filesystem header information 7523 about the path. 7524 operationId: "ContainerArchiveInfo" 7525 responses: 7526 200: 7527 description: "no error" 7528 headers: 7529 X-Docker-Container-Path-Stat: 7530 type: "string" 7531 description: | 7532 A base64 - encoded JSON object with some filesystem header 7533 information about the path 7534 400: 7535 description: "Bad parameter" 7536 schema: 7537 $ref: "#/definitions/ErrorResponse" 7538 404: 7539 description: "Container or path does not exist" 7540 schema: 7541 $ref: "#/definitions/ErrorResponse" 7542 examples: 7543 application/json: 7544 message: "No such container: c2ada9df5af8" 7545 500: 7546 description: "Server error" 7547 schema: 7548 $ref: "#/definitions/ErrorResponse" 7549 parameters: 7550 - name: "id" 7551 in: "path" 7552 required: true 7553 description: "ID or name of the container" 7554 type: "string" 7555 - name: "path" 7556 in: "query" 7557 required: true 7558 description: "Resource in the container’s filesystem to archive." 7559 type: "string" 7560 tags: ["Container"] 7561 get: 7562 summary: "Get an archive of a filesystem resource in a container" 7563 description: "Get a tar archive of a resource in the filesystem of container id." 7564 operationId: "ContainerArchive" 7565 produces: ["application/x-tar"] 7566 responses: 7567 200: 7568 description: "no error" 7569 400: 7570 description: "Bad parameter" 7571 schema: 7572 $ref: "#/definitions/ErrorResponse" 7573 404: 7574 description: "Container or path does not exist" 7575 schema: 7576 $ref: "#/definitions/ErrorResponse" 7577 examples: 7578 application/json: 7579 message: "No such container: c2ada9df5af8" 7580 500: 7581 description: "server error" 7582 schema: 7583 $ref: "#/definitions/ErrorResponse" 7584 parameters: 7585 - name: "id" 7586 in: "path" 7587 required: true 7588 description: "ID or name of the container" 7589 type: "string" 7590 - name: "path" 7591 in: "query" 7592 required: true 7593 description: "Resource in the container’s filesystem to archive." 7594 type: "string" 7595 tags: ["Container"] 7596 put: 7597 summary: "Extract an archive of files or folders to a directory in a container" 7598 description: | 7599 Upload a tar archive to be extracted to a path in the filesystem of container id. 7600 `path` parameter is asserted to be a directory. If it exists as a file, 400 error 7601 will be returned with message "not a directory". 7602 operationId: "PutContainerArchive" 7603 consumes: ["application/x-tar", "application/octet-stream"] 7604 responses: 7605 200: 7606 description: "The content was extracted successfully" 7607 400: 7608 description: "Bad parameter" 7609 schema: 7610 $ref: "#/definitions/ErrorResponse" 7611 examples: 7612 application/json: 7613 message: "not a directory" 7614 403: 7615 description: "Permission denied, the volume or container rootfs is marked as read-only." 7616 schema: 7617 $ref: "#/definitions/ErrorResponse" 7618 404: 7619 description: "No such container or path does not exist inside the container" 7620 schema: 7621 $ref: "#/definitions/ErrorResponse" 7622 examples: 7623 application/json: 7624 message: "No such container: c2ada9df5af8" 7625 500: 7626 description: "Server error" 7627 schema: 7628 $ref: "#/definitions/ErrorResponse" 7629 parameters: 7630 - name: "id" 7631 in: "path" 7632 required: true 7633 description: "ID or name of the container" 7634 type: "string" 7635 - name: "path" 7636 in: "query" 7637 required: true 7638 description: "Path to a directory in the container to extract the archive’s contents into. " 7639 type: "string" 7640 - name: "noOverwriteDirNonDir" 7641 in: "query" 7642 description: | 7643 If `1`, `true`, or `True` then it will be an error if unpacking the 7644 given content would cause an existing directory to be replaced with 7645 a non-directory and vice versa. 7646 type: "string" 7647 - name: "copyUIDGID" 7648 in: "query" 7649 description: | 7650 If `1`, `true`, then it will copy UID/GID maps to the dest file or 7651 dir 7652 type: "string" 7653 - name: "inputStream" 7654 in: "body" 7655 required: true 7656 description: | 7657 The input stream must be a tar archive compressed with one of the 7658 following algorithms: `identity` (no compression), `gzip`, `bzip2`, 7659 or `xz`. 7660 schema: 7661 type: "string" 7662 format: "binary" 7663 tags: ["Container"] 7664 /containers/prune: 7665 post: 7666 summary: "Delete stopped containers" 7667 produces: 7668 - "application/json" 7669 operationId: "ContainerPrune" 7670 parameters: 7671 - name: "filters" 7672 in: "query" 7673 description: | 7674 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 7675 7676 Available filters: 7677 - `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. 7678 - `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. 7679 type: "string" 7680 responses: 7681 200: 7682 description: "No error" 7683 schema: 7684 type: "object" 7685 title: "ContainerPruneResponse" 7686 properties: 7687 ContainersDeleted: 7688 description: "Container IDs that were deleted" 7689 type: "array" 7690 items: 7691 type: "string" 7692 SpaceReclaimed: 7693 description: "Disk space reclaimed in bytes" 7694 type: "integer" 7695 format: "int64" 7696 500: 7697 description: "Server error" 7698 schema: 7699 $ref: "#/definitions/ErrorResponse" 7700 tags: ["Container"] 7701 /images/json: 7702 get: 7703 summary: "List Images" 7704 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." 7705 operationId: "ImageList" 7706 produces: 7707 - "application/json" 7708 responses: 7709 200: 7710 description: "Summary image data for the images matching the query" 7711 schema: 7712 type: "array" 7713 items: 7714 $ref: "#/definitions/ImageSummary" 7715 500: 7716 description: "server error" 7717 schema: 7718 $ref: "#/definitions/ErrorResponse" 7719 parameters: 7720 - name: "all" 7721 in: "query" 7722 description: "Show all images. Only images from a final layer (no children) are shown by default." 7723 type: "boolean" 7724 default: false 7725 - name: "filters" 7726 in: "query" 7727 description: | 7728 A JSON encoded value of the filters (a `map[string][]string`) to 7729 process on the images list. 7730 7731 Available filters: 7732 7733 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7734 - `dangling=true` 7735 - `label=key` or `label="key=value"` of an image label 7736 - `reference`=(`<image-name>[:<tag>]`) 7737 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7738 type: "string" 7739 - name: "digests" 7740 in: "query" 7741 description: "Show digest information as a `RepoDigests` field on each image." 7742 type: "boolean" 7743 default: false 7744 tags: ["Image"] 7745 /build: 7746 post: 7747 summary: "Build an image" 7748 description: | 7749 Build an image from a tar archive with a `Dockerfile` in it. 7750 7751 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/). 7752 7753 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. 7754 7755 The build is canceled if the client drops the connection by quitting or being killed. 7756 operationId: "ImageBuild" 7757 consumes: 7758 - "application/octet-stream" 7759 produces: 7760 - "application/json" 7761 parameters: 7762 - name: "inputStream" 7763 in: "body" 7764 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 7765 schema: 7766 type: "string" 7767 format: "binary" 7768 - name: "dockerfile" 7769 in: "query" 7770 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 7771 type: "string" 7772 default: "Dockerfile" 7773 - name: "t" 7774 in: "query" 7775 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." 7776 type: "string" 7777 - name: "extrahosts" 7778 in: "query" 7779 description: "Extra hosts to add to /etc/hosts" 7780 type: "string" 7781 - name: "remote" 7782 in: "query" 7783 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." 7784 type: "string" 7785 - name: "q" 7786 in: "query" 7787 description: "Suppress verbose build output." 7788 type: "boolean" 7789 default: false 7790 - name: "nocache" 7791 in: "query" 7792 description: "Do not use the cache when building the image." 7793 type: "boolean" 7794 default: false 7795 - name: "cachefrom" 7796 in: "query" 7797 description: "JSON array of images used for build cache resolution." 7798 type: "string" 7799 - name: "pull" 7800 in: "query" 7801 description: "Attempt to pull the image even if an older image exists locally." 7802 type: "string" 7803 - name: "rm" 7804 in: "query" 7805 description: "Remove intermediate containers after a successful build." 7806 type: "boolean" 7807 default: true 7808 - name: "forcerm" 7809 in: "query" 7810 description: "Always remove intermediate containers, even upon failure." 7811 type: "boolean" 7812 default: false 7813 - name: "memory" 7814 in: "query" 7815 description: "Set memory limit for build." 7816 type: "integer" 7817 - name: "memswap" 7818 in: "query" 7819 description: "Total memory (memory + swap). Set as `-1` to disable swap." 7820 type: "integer" 7821 - name: "cpushares" 7822 in: "query" 7823 description: "CPU shares (relative weight)." 7824 type: "integer" 7825 - name: "cpusetcpus" 7826 in: "query" 7827 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 7828 type: "string" 7829 - name: "cpuperiod" 7830 in: "query" 7831 description: "The length of a CPU period in microseconds." 7832 type: "integer" 7833 - name: "cpuquota" 7834 in: "query" 7835 description: "Microseconds of CPU time that the container can get in a CPU period." 7836 type: "integer" 7837 - name: "buildargs" 7838 in: "query" 7839 description: > 7840 JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker 7841 uses the buildargs as the environment context for commands run via the `Dockerfile` RUN 7842 instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for 7843 passing secret values. 7844 7845 7846 For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the 7847 query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. 7848 7849 7850 [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) 7851 type: "string" 7852 - name: "shmsize" 7853 in: "query" 7854 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 7855 type: "integer" 7856 - name: "squash" 7857 in: "query" 7858 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 7859 type: "boolean" 7860 - name: "labels" 7861 in: "query" 7862 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 7863 type: "string" 7864 - name: "networkmode" 7865 in: "query" 7866 description: | 7867 Sets the networking mode for the run commands during build. Supported 7868 standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. 7869 Any other value is taken as a custom network's name or ID to which this 7870 container should connect to. 7871 type: "string" 7872 - name: "Content-type" 7873 in: "header" 7874 type: "string" 7875 enum: 7876 - "application/x-tar" 7877 default: "application/x-tar" 7878 - name: "X-Registry-Config" 7879 in: "header" 7880 description: | 7881 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 7882 7883 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 7884 7885 ``` 7886 { 7887 "docker.example.com": { 7888 "username": "janedoe", 7889 "password": "hunter2" 7890 }, 7891 "https://index.docker.io/v1/": { 7892 "username": "mobydock", 7893 "password": "conta1n3rize14" 7894 } 7895 } 7896 ``` 7897 7898 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. 7899 type: "string" 7900 - name: "platform" 7901 in: "query" 7902 description: "Platform in the format os[/arch[/variant]]" 7903 type: "string" 7904 default: "" 7905 - name: "target" 7906 in: "query" 7907 description: "Target build stage" 7908 type: "string" 7909 default: "" 7910 - name: "outputs" 7911 in: "query" 7912 description: "BuildKit output configuration" 7913 type: "string" 7914 default: "" 7915 responses: 7916 200: 7917 description: "no error" 7918 400: 7919 description: "Bad parameter" 7920 schema: 7921 $ref: "#/definitions/ErrorResponse" 7922 500: 7923 description: "server error" 7924 schema: 7925 $ref: "#/definitions/ErrorResponse" 7926 tags: ["Image"] 7927 /build/prune: 7928 post: 7929 summary: "Delete builder cache" 7930 produces: 7931 - "application/json" 7932 operationId: "BuildPrune" 7933 parameters: 7934 - name: "keep-storage" 7935 in: "query" 7936 description: "Amount of disk space in bytes to keep for cache" 7937 type: "integer" 7938 format: "int64" 7939 - name: "all" 7940 in: "query" 7941 type: "boolean" 7942 description: "Remove all types of build cache" 7943 - name: "filters" 7944 in: "query" 7945 type: "string" 7946 description: | 7947 A JSON encoded value of the filters (a `map[string][]string`) to 7948 process on the list of build cache objects. 7949 7950 Available filters: 7951 7952 - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h') 7953 - `id=<id>` 7954 - `parent=<id>` 7955 - `type=<string>` 7956 - `description=<string>` 7957 - `inuse` 7958 - `shared` 7959 - `private` 7960 responses: 7961 200: 7962 description: "No error" 7963 schema: 7964 type: "object" 7965 title: "BuildPruneResponse" 7966 properties: 7967 CachesDeleted: 7968 type: "array" 7969 items: 7970 description: "ID of build cache object" 7971 type: "string" 7972 SpaceReclaimed: 7973 description: "Disk space reclaimed in bytes" 7974 type: "integer" 7975 format: "int64" 7976 500: 7977 description: "Server error" 7978 schema: 7979 $ref: "#/definitions/ErrorResponse" 7980 tags: ["Image"] 7981 /images/create: 7982 post: 7983 summary: "Create an image" 7984 description: "Create an image by either pulling it from a registry or importing it." 7985 operationId: "ImageCreate" 7986 consumes: 7987 - "text/plain" 7988 - "application/octet-stream" 7989 produces: 7990 - "application/json" 7991 responses: 7992 200: 7993 description: "no error" 7994 404: 7995 description: "repository does not exist or no read access" 7996 schema: 7997 $ref: "#/definitions/ErrorResponse" 7998 500: 7999 description: "server error" 8000 schema: 8001 $ref: "#/definitions/ErrorResponse" 8002 parameters: 8003 - name: "fromImage" 8004 in: "query" 8005 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." 8006 type: "string" 8007 - name: "fromSrc" 8008 in: "query" 8009 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." 8010 type: "string" 8011 - name: "repo" 8012 in: "query" 8013 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." 8014 type: "string" 8015 - name: "tag" 8016 in: "query" 8017 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 8018 type: "string" 8019 - name: "message" 8020 in: "query" 8021 description: "Set commit message for imported image." 8022 type: "string" 8023 - name: "inputImage" 8024 in: "body" 8025 description: "Image content if the value `-` has been specified in fromSrc query parameter" 8026 schema: 8027 type: "string" 8028 required: false 8029 - name: "X-Registry-Auth" 8030 in: "header" 8031 description: | 8032 A base64url-encoded auth configuration. 8033 8034 Refer to the [authentication section](#section/Authentication) for 8035 details. 8036 type: "string" 8037 - name: "changes" 8038 in: "query" 8039 description: | 8040 Apply `Dockerfile` instructions to the image that is created, 8041 for example: `changes=ENV DEBUG=true`. 8042 Note that `ENV DEBUG=true` should be URI component encoded. 8043 8044 Supported `Dockerfile` instructions: 8045 `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` 8046 type: "array" 8047 items: 8048 type: "string" 8049 - name: "platform" 8050 in: "query" 8051 description: "Platform in the format os[/arch[/variant]]" 8052 type: "string" 8053 default: "" 8054 tags: ["Image"] 8055 /images/{name}/json: 8056 get: 8057 summary: "Inspect an image" 8058 description: "Return low-level information about an image." 8059 operationId: "ImageInspect" 8060 produces: 8061 - "application/json" 8062 responses: 8063 200: 8064 description: "No error" 8065 schema: 8066 $ref: "#/definitions/ImageInspect" 8067 404: 8068 description: "No such image" 8069 schema: 8070 $ref: "#/definitions/ErrorResponse" 8071 examples: 8072 application/json: 8073 message: "No such image: someimage (tag: latest)" 8074 500: 8075 description: "Server error" 8076 schema: 8077 $ref: "#/definitions/ErrorResponse" 8078 parameters: 8079 - name: "name" 8080 in: "path" 8081 description: "Image name or id" 8082 type: "string" 8083 required: true 8084 tags: ["Image"] 8085 /images/{name}/history: 8086 get: 8087 summary: "Get the history of an image" 8088 description: "Return parent layers of an image." 8089 operationId: "ImageHistory" 8090 produces: ["application/json"] 8091 responses: 8092 200: 8093 description: "List of image layers" 8094 schema: 8095 type: "array" 8096 items: 8097 type: "object" 8098 x-go-name: HistoryResponseItem 8099 title: "HistoryResponseItem" 8100 description: "individual image layer information in response to ImageHistory operation" 8101 required: [Id, Created, CreatedBy, Tags, Size, Comment] 8102 properties: 8103 Id: 8104 type: "string" 8105 x-nullable: false 8106 Created: 8107 type: "integer" 8108 format: "int64" 8109 x-nullable: false 8110 CreatedBy: 8111 type: "string" 8112 x-nullable: false 8113 Tags: 8114 type: "array" 8115 items: 8116 type: "string" 8117 Size: 8118 type: "integer" 8119 format: "int64" 8120 x-nullable: false 8121 Comment: 8122 type: "string" 8123 x-nullable: false 8124 examples: 8125 application/json: 8126 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 8127 Created: 1398108230 8128 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 8129 Tags: 8130 - "ubuntu:lucid" 8131 - "ubuntu:10.04" 8132 Size: 182964289 8133 Comment: "" 8134 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 8135 Created: 1398108222 8136 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/" 8137 Tags: [] 8138 Size: 0 8139 Comment: "" 8140 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 8141 Created: 1371157430 8142 CreatedBy: "" 8143 Tags: 8144 - "scratch12:latest" 8145 - "scratch:latest" 8146 Size: 0 8147 Comment: "Imported from -" 8148 404: 8149 description: "No such image" 8150 schema: 8151 $ref: "#/definitions/ErrorResponse" 8152 500: 8153 description: "Server error" 8154 schema: 8155 $ref: "#/definitions/ErrorResponse" 8156 parameters: 8157 - name: "name" 8158 in: "path" 8159 description: "Image name or ID" 8160 type: "string" 8161 required: true 8162 tags: ["Image"] 8163 /images/{name}/push: 8164 post: 8165 summary: "Push an image" 8166 description: | 8167 Push an image to a registry. 8168 8169 If you wish to push an image on to a private registry, that image must 8170 already have a tag which references the registry. For example, 8171 `registry.example.com/myimage:latest`. 8172 8173 The push is cancelled if the HTTP connection is closed. 8174 operationId: "ImagePush" 8175 consumes: 8176 - "application/octet-stream" 8177 responses: 8178 200: 8179 description: "No error" 8180 404: 8181 description: "No such image" 8182 schema: 8183 $ref: "#/definitions/ErrorResponse" 8184 500: 8185 description: "Server error" 8186 schema: 8187 $ref: "#/definitions/ErrorResponse" 8188 parameters: 8189 - name: "name" 8190 in: "path" 8191 description: "Image name or ID." 8192 type: "string" 8193 required: true 8194 - name: "tag" 8195 in: "query" 8196 description: "The tag to associate with the image on the registry." 8197 type: "string" 8198 - name: "X-Registry-Auth" 8199 in: "header" 8200 description: | 8201 A base64url-encoded auth configuration. 8202 8203 Refer to the [authentication section](#section/Authentication) for 8204 details. 8205 type: "string" 8206 required: true 8207 tags: ["Image"] 8208 /images/{name}/tag: 8209 post: 8210 summary: "Tag an image" 8211 description: "Tag an image so that it becomes part of a repository." 8212 operationId: "ImageTag" 8213 responses: 8214 201: 8215 description: "No error" 8216 400: 8217 description: "Bad parameter" 8218 schema: 8219 $ref: "#/definitions/ErrorResponse" 8220 404: 8221 description: "No such image" 8222 schema: 8223 $ref: "#/definitions/ErrorResponse" 8224 409: 8225 description: "Conflict" 8226 schema: 8227 $ref: "#/definitions/ErrorResponse" 8228 500: 8229 description: "Server error" 8230 schema: 8231 $ref: "#/definitions/ErrorResponse" 8232 parameters: 8233 - name: "name" 8234 in: "path" 8235 description: "Image name or ID to tag." 8236 type: "string" 8237 required: true 8238 - name: "repo" 8239 in: "query" 8240 description: "The repository to tag in. For example, `someuser/someimage`." 8241 type: "string" 8242 - name: "tag" 8243 in: "query" 8244 description: "The name of the new tag." 8245 type: "string" 8246 tags: ["Image"] 8247 /images/{name}: 8248 delete: 8249 summary: "Remove an image" 8250 description: | 8251 Remove an image, along with any untagged parent images that were 8252 referenced by that image. 8253 8254 Images can't be removed if they have descendant images, are being 8255 used by a running container or are being used by a build. 8256 operationId: "ImageDelete" 8257 produces: ["application/json"] 8258 responses: 8259 200: 8260 description: "The image was deleted successfully" 8261 schema: 8262 type: "array" 8263 items: 8264 $ref: "#/definitions/ImageDeleteResponseItem" 8265 examples: 8266 application/json: 8267 - Untagged: "3e2f21a89f" 8268 - Deleted: "3e2f21a89f" 8269 - Deleted: "53b4f83ac9" 8270 404: 8271 description: "No such image" 8272 schema: 8273 $ref: "#/definitions/ErrorResponse" 8274 409: 8275 description: "Conflict" 8276 schema: 8277 $ref: "#/definitions/ErrorResponse" 8278 500: 8279 description: "Server error" 8280 schema: 8281 $ref: "#/definitions/ErrorResponse" 8282 parameters: 8283 - name: "name" 8284 in: "path" 8285 description: "Image name or ID" 8286 type: "string" 8287 required: true 8288 - name: "force" 8289 in: "query" 8290 description: "Remove the image even if it is being used by stopped containers or has other tags" 8291 type: "boolean" 8292 default: false 8293 - name: "noprune" 8294 in: "query" 8295 description: "Do not delete untagged parent images" 8296 type: "boolean" 8297 default: false 8298 tags: ["Image"] 8299 /images/search: 8300 get: 8301 summary: "Search images" 8302 description: "Search for an image on Docker Hub." 8303 operationId: "ImageSearch" 8304 produces: 8305 - "application/json" 8306 responses: 8307 200: 8308 description: "No error" 8309 schema: 8310 type: "array" 8311 items: 8312 type: "object" 8313 title: "ImageSearchResponseItem" 8314 properties: 8315 description: 8316 type: "string" 8317 is_official: 8318 type: "boolean" 8319 is_automated: 8320 type: "boolean" 8321 name: 8322 type: "string" 8323 star_count: 8324 type: "integer" 8325 examples: 8326 application/json: 8327 - description: "" 8328 is_official: false 8329 is_automated: false 8330 name: "wma55/u1210sshd" 8331 star_count: 0 8332 - description: "" 8333 is_official: false 8334 is_automated: false 8335 name: "jdswinbank/sshd" 8336 star_count: 0 8337 - description: "" 8338 is_official: false 8339 is_automated: false 8340 name: "vgauthier/sshd" 8341 star_count: 0 8342 500: 8343 description: "Server error" 8344 schema: 8345 $ref: "#/definitions/ErrorResponse" 8346 parameters: 8347 - name: "term" 8348 in: "query" 8349 description: "Term to search" 8350 type: "string" 8351 required: true 8352 - name: "limit" 8353 in: "query" 8354 description: "Maximum number of results to return" 8355 type: "integer" 8356 - name: "filters" 8357 in: "query" 8358 description: | 8359 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 8360 8361 - `is-automated=(true|false)` 8362 - `is-official=(true|false)` 8363 - `stars=<number>` Matches images that has at least 'number' stars. 8364 type: "string" 8365 tags: ["Image"] 8366 /images/prune: 8367 post: 8368 summary: "Delete unused images" 8369 produces: 8370 - "application/json" 8371 operationId: "ImagePrune" 8372 parameters: 8373 - name: "filters" 8374 in: "query" 8375 description: | 8376 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 8377 8378 - `dangling=<boolean>` When set to `true` (or `1`), prune only 8379 unused *and* untagged images. When set to `false` 8380 (or `0`), all unused images are pruned. 8381 - `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. 8382 - `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. 8383 type: "string" 8384 responses: 8385 200: 8386 description: "No error" 8387 schema: 8388 type: "object" 8389 title: "ImagePruneResponse" 8390 properties: 8391 ImagesDeleted: 8392 description: "Images that were deleted" 8393 type: "array" 8394 items: 8395 $ref: "#/definitions/ImageDeleteResponseItem" 8396 SpaceReclaimed: 8397 description: "Disk space reclaimed in bytes" 8398 type: "integer" 8399 format: "int64" 8400 500: 8401 description: "Server error" 8402 schema: 8403 $ref: "#/definitions/ErrorResponse" 8404 tags: ["Image"] 8405 /auth: 8406 post: 8407 summary: "Check auth configuration" 8408 description: | 8409 Validate credentials for a registry and, if available, get an identity 8410 token for accessing the registry without password. 8411 operationId: "SystemAuth" 8412 consumes: ["application/json"] 8413 produces: ["application/json"] 8414 responses: 8415 200: 8416 description: "An identity token was generated successfully." 8417 schema: 8418 type: "object" 8419 title: "SystemAuthResponse" 8420 required: [Status] 8421 properties: 8422 Status: 8423 description: "The status of the authentication" 8424 type: "string" 8425 x-nullable: false 8426 IdentityToken: 8427 description: "An opaque token used to authenticate a user after a successful login" 8428 type: "string" 8429 x-nullable: false 8430 examples: 8431 application/json: 8432 Status: "Login Succeeded" 8433 IdentityToken: "9cbaf023786cd7..." 8434 204: 8435 description: "No error" 8436 401: 8437 description: "Auth error" 8438 schema: 8439 $ref: "#/definitions/ErrorResponse" 8440 500: 8441 description: "Server error" 8442 schema: 8443 $ref: "#/definitions/ErrorResponse" 8444 parameters: 8445 - name: "authConfig" 8446 in: "body" 8447 description: "Authentication to check" 8448 schema: 8449 $ref: "#/definitions/AuthConfig" 8450 tags: ["System"] 8451 /info: 8452 get: 8453 summary: "Get system information" 8454 operationId: "SystemInfo" 8455 produces: 8456 - "application/json" 8457 responses: 8458 200: 8459 description: "No error" 8460 schema: 8461 $ref: "#/definitions/SystemInfo" 8462 500: 8463 description: "Server error" 8464 schema: 8465 $ref: "#/definitions/ErrorResponse" 8466 tags: ["System"] 8467 /version: 8468 get: 8469 summary: "Get version" 8470 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 8471 operationId: "SystemVersion" 8472 produces: ["application/json"] 8473 responses: 8474 200: 8475 description: "no error" 8476 schema: 8477 $ref: "#/definitions/SystemVersion" 8478 500: 8479 description: "server error" 8480 schema: 8481 $ref: "#/definitions/ErrorResponse" 8482 tags: ["System"] 8483 /_ping: 8484 get: 8485 summary: "Ping" 8486 description: "This is a dummy endpoint you can use to test if the server is accessible." 8487 operationId: "SystemPing" 8488 produces: ["text/plain"] 8489 responses: 8490 200: 8491 description: "no error" 8492 schema: 8493 type: "string" 8494 example: "OK" 8495 headers: 8496 API-Version: 8497 type: "string" 8498 description: "Max API Version the server supports" 8499 Builder-Version: 8500 type: "string" 8501 description: "Default version of docker image builder" 8502 Docker-Experimental: 8503 type: "boolean" 8504 description: "If the server is running with experimental mode enabled" 8505 Cache-Control: 8506 type: "string" 8507 default: "no-cache, no-store, must-revalidate" 8508 Pragma: 8509 type: "string" 8510 default: "no-cache" 8511 500: 8512 description: "server error" 8513 schema: 8514 $ref: "#/definitions/ErrorResponse" 8515 headers: 8516 Cache-Control: 8517 type: "string" 8518 default: "no-cache, no-store, must-revalidate" 8519 Pragma: 8520 type: "string" 8521 default: "no-cache" 8522 tags: ["System"] 8523 head: 8524 summary: "Ping" 8525 description: "This is a dummy endpoint you can use to test if the server is accessible." 8526 operationId: "SystemPingHead" 8527 produces: ["text/plain"] 8528 responses: 8529 200: 8530 description: "no error" 8531 schema: 8532 type: "string" 8533 example: "(empty)" 8534 headers: 8535 API-Version: 8536 type: "string" 8537 description: "Max API Version the server supports" 8538 Builder-Version: 8539 type: "string" 8540 description: "Default version of docker image builder" 8541 Docker-Experimental: 8542 type: "boolean" 8543 description: "If the server is running with experimental mode enabled" 8544 Cache-Control: 8545 type: "string" 8546 default: "no-cache, no-store, must-revalidate" 8547 Pragma: 8548 type: "string" 8549 default: "no-cache" 8550 500: 8551 description: "server error" 8552 schema: 8553 $ref: "#/definitions/ErrorResponse" 8554 tags: ["System"] 8555 /commit: 8556 post: 8557 summary: "Create a new image from a container" 8558 operationId: "ImageCommit" 8559 consumes: 8560 - "application/json" 8561 produces: 8562 - "application/json" 8563 responses: 8564 201: 8565 description: "no error" 8566 schema: 8567 $ref: "#/definitions/IdResponse" 8568 404: 8569 description: "no such container" 8570 schema: 8571 $ref: "#/definitions/ErrorResponse" 8572 examples: 8573 application/json: 8574 message: "No such container: c2ada9df5af8" 8575 500: 8576 description: "server error" 8577 schema: 8578 $ref: "#/definitions/ErrorResponse" 8579 parameters: 8580 - name: "containerConfig" 8581 in: "body" 8582 description: "The container configuration" 8583 schema: 8584 $ref: "#/definitions/ContainerConfig" 8585 - name: "container" 8586 in: "query" 8587 description: "The ID or name of the container to commit" 8588 type: "string" 8589 - name: "repo" 8590 in: "query" 8591 description: "Repository name for the created image" 8592 type: "string" 8593 - name: "tag" 8594 in: "query" 8595 description: "Tag name for the create image" 8596 type: "string" 8597 - name: "comment" 8598 in: "query" 8599 description: "Commit message" 8600 type: "string" 8601 - name: "author" 8602 in: "query" 8603 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 8604 type: "string" 8605 - name: "pause" 8606 in: "query" 8607 description: "Whether to pause the container before committing" 8608 type: "boolean" 8609 default: true 8610 - name: "changes" 8611 in: "query" 8612 description: "`Dockerfile` instructions to apply while committing" 8613 type: "string" 8614 tags: ["Image"] 8615 /events: 8616 get: 8617 summary: "Monitor events" 8618 description: | 8619 Stream real-time events from the server. 8620 8621 Various objects within Docker report events when something happens to them. 8622 8623 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` 8624 8625 Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` 8626 8627 Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` 8628 8629 Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` 8630 8631 The Docker daemon reports these events: `reload` 8632 8633 Services report these events: `create`, `update`, and `remove` 8634 8635 Nodes report these events: `create`, `update`, and `remove` 8636 8637 Secrets report these events: `create`, `update`, and `remove` 8638 8639 Configs report these events: `create`, `update`, and `remove` 8640 8641 The Builder reports `prune` events 8642 8643 operationId: "SystemEvents" 8644 produces: 8645 - "application/json" 8646 responses: 8647 200: 8648 description: "no error" 8649 schema: 8650 $ref: "#/definitions/EventMessage" 8651 400: 8652 description: "bad parameter" 8653 schema: 8654 $ref: "#/definitions/ErrorResponse" 8655 500: 8656 description: "server error" 8657 schema: 8658 $ref: "#/definitions/ErrorResponse" 8659 parameters: 8660 - name: "since" 8661 in: "query" 8662 description: "Show events created since this timestamp then stream new events." 8663 type: "string" 8664 - name: "until" 8665 in: "query" 8666 description: "Show events created until this timestamp then stop streaming." 8667 type: "string" 8668 - name: "filters" 8669 in: "query" 8670 description: | 8671 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 8672 8673 - `config=<string>` config name or ID 8674 - `container=<string>` container name or ID 8675 - `daemon=<string>` daemon name or ID 8676 - `event=<string>` event type 8677 - `image=<string>` image name or ID 8678 - `label=<string>` image or container label 8679 - `network=<string>` network name or ID 8680 - `node=<string>` node ID 8681 - `plugin`=<string> plugin name or ID 8682 - `scope`=<string> local or swarm 8683 - `secret=<string>` secret name or ID 8684 - `service=<string>` service name or ID 8685 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` 8686 - `volume=<string>` volume name 8687 type: "string" 8688 tags: ["System"] 8689 /system/df: 8690 get: 8691 summary: "Get data usage information" 8692 operationId: "SystemDataUsage" 8693 responses: 8694 200: 8695 description: "no error" 8696 schema: 8697 type: "object" 8698 title: "SystemDataUsageResponse" 8699 properties: 8700 LayersSize: 8701 type: "integer" 8702 format: "int64" 8703 Images: 8704 type: "array" 8705 items: 8706 $ref: "#/definitions/ImageSummary" 8707 Containers: 8708 type: "array" 8709 items: 8710 $ref: "#/definitions/ContainerSummary" 8711 Volumes: 8712 type: "array" 8713 items: 8714 $ref: "#/definitions/Volume" 8715 BuildCache: 8716 type: "array" 8717 items: 8718 $ref: "#/definitions/BuildCache" 8719 example: 8720 LayersSize: 1092588 8721 Images: 8722 - 8723 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8724 ParentId: "" 8725 RepoTags: 8726 - "busybox:latest" 8727 RepoDigests: 8728 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 8729 Created: 1466724217 8730 Size: 1092588 8731 SharedSize: 0 8732 VirtualSize: 1092588 8733 Labels: {} 8734 Containers: 1 8735 Containers: 8736 - 8737 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 8738 Names: 8739 - "/top" 8740 Image: "busybox" 8741 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8742 Command: "top" 8743 Created: 1472592424 8744 Ports: [] 8745 SizeRootFs: 1092588 8746 Labels: {} 8747 State: "exited" 8748 Status: "Exited (0) 56 minutes ago" 8749 HostConfig: 8750 NetworkMode: "default" 8751 NetworkSettings: 8752 Networks: 8753 bridge: 8754 IPAMConfig: null 8755 Links: null 8756 Aliases: null 8757 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 8758 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 8759 Gateway: "172.18.0.1" 8760 IPAddress: "172.18.0.2" 8761 IPPrefixLen: 16 8762 IPv6Gateway: "" 8763 GlobalIPv6Address: "" 8764 GlobalIPv6PrefixLen: 0 8765 MacAddress: "02:42:ac:12:00:02" 8766 Mounts: [] 8767 Volumes: 8768 - 8769 Name: "my-volume" 8770 Driver: "local" 8771 Mountpoint: "/var/lib/docker/volumes/my-volume/_data" 8772 Labels: null 8773 Scope: "local" 8774 Options: null 8775 UsageData: 8776 Size: 10920104 8777 RefCount: 2 8778 BuildCache: 8779 - 8780 ID: "hw53o5aio51xtltp5xjp8v7fx" 8781 Parent: "" 8782 Type: "regular" 8783 Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" 8784 InUse: false 8785 Shared: true 8786 Size: 0 8787 CreatedAt: "2021-06-28T13:31:01.474619385Z" 8788 LastUsedAt: "2021-07-07T22:02:32.738075951Z" 8789 UsageCount: 26 8790 - 8791 ID: "ndlpt0hhvkqcdfkputsk4cq9c" 8792 Parent: "ndlpt0hhvkqcdfkputsk4cq9c" 8793 Type: "regular" 8794 Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" 8795 InUse: false 8796 Shared: true 8797 Size: 51 8798 CreatedAt: "2021-06-28T13:31:03.002625487Z" 8799 LastUsedAt: "2021-07-07T22:02:32.773909517Z" 8800 UsageCount: 26 8801 500: 8802 description: "server error" 8803 schema: 8804 $ref: "#/definitions/ErrorResponse" 8805 tags: ["System"] 8806 /images/{name}/get: 8807 get: 8808 summary: "Export an image" 8809 description: | 8810 Get a tarball containing all images and metadata for a repository. 8811 8812 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. 8813 8814 ### Image tarball format 8815 8816 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 8817 8818 - `VERSION`: currently `1.0` - the file format version 8819 - `json`: detailed layer information, similar to `docker inspect layer_id` 8820 - `layer.tar`: A tarfile containing the filesystem changes in this layer 8821 8822 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 8823 8824 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. 8825 8826 ```json 8827 { 8828 "hello-world": { 8829 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 8830 } 8831 } 8832 ``` 8833 operationId: "ImageGet" 8834 produces: 8835 - "application/x-tar" 8836 responses: 8837 200: 8838 description: "no error" 8839 schema: 8840 type: "string" 8841 format: "binary" 8842 500: 8843 description: "server error" 8844 schema: 8845 $ref: "#/definitions/ErrorResponse" 8846 parameters: 8847 - name: "name" 8848 in: "path" 8849 description: "Image name or ID" 8850 type: "string" 8851 required: true 8852 tags: ["Image"] 8853 /images/get: 8854 get: 8855 summary: "Export several images" 8856 description: | 8857 Get a tarball containing all images and metadata for several image 8858 repositories. 8859 8860 For each value of the `names` parameter: if it is a specific name and 8861 tag (e.g. `ubuntu:latest`), then only that image (and its parents) are 8862 returned; if it is an image ID, similarly only that image (and its parents) 8863 are returned and there would be no names referenced in the 'repositories' 8864 file for this image ID. 8865 8866 For details on the format, see the [export image endpoint](#operation/ImageGet). 8867 operationId: "ImageGetAll" 8868 produces: 8869 - "application/x-tar" 8870 responses: 8871 200: 8872 description: "no error" 8873 schema: 8874 type: "string" 8875 format: "binary" 8876 500: 8877 description: "server error" 8878 schema: 8879 $ref: "#/definitions/ErrorResponse" 8880 parameters: 8881 - name: "names" 8882 in: "query" 8883 description: "Image names to filter by" 8884 type: "array" 8885 items: 8886 type: "string" 8887 tags: ["Image"] 8888 /images/load: 8889 post: 8890 summary: "Import images" 8891 description: | 8892 Load a set of images and tags into a repository. 8893 8894 For details on the format, see the [export image endpoint](#operation/ImageGet). 8895 operationId: "ImageLoad" 8896 consumes: 8897 - "application/x-tar" 8898 produces: 8899 - "application/json" 8900 responses: 8901 200: 8902 description: "no error" 8903 500: 8904 description: "server error" 8905 schema: 8906 $ref: "#/definitions/ErrorResponse" 8907 parameters: 8908 - name: "imagesTarball" 8909 in: "body" 8910 description: "Tar archive containing images" 8911 schema: 8912 type: "string" 8913 format: "binary" 8914 - name: "quiet" 8915 in: "query" 8916 description: "Suppress progress details during load." 8917 type: "boolean" 8918 default: false 8919 tags: ["Image"] 8920 /containers/{id}/exec: 8921 post: 8922 summary: "Create an exec instance" 8923 description: "Run a command inside a running container." 8924 operationId: "ContainerExec" 8925 consumes: 8926 - "application/json" 8927 produces: 8928 - "application/json" 8929 responses: 8930 201: 8931 description: "no error" 8932 schema: 8933 $ref: "#/definitions/IdResponse" 8934 404: 8935 description: "no such container" 8936 schema: 8937 $ref: "#/definitions/ErrorResponse" 8938 examples: 8939 application/json: 8940 message: "No such container: c2ada9df5af8" 8941 409: 8942 description: "container is paused" 8943 schema: 8944 $ref: "#/definitions/ErrorResponse" 8945 500: 8946 description: "Server error" 8947 schema: 8948 $ref: "#/definitions/ErrorResponse" 8949 parameters: 8950 - name: "execConfig" 8951 in: "body" 8952 description: "Exec configuration" 8953 schema: 8954 type: "object" 8955 title: "ExecConfig" 8956 properties: 8957 AttachStdin: 8958 type: "boolean" 8959 description: "Attach to `stdin` of the exec command." 8960 AttachStdout: 8961 type: "boolean" 8962 description: "Attach to `stdout` of the exec command." 8963 AttachStderr: 8964 type: "boolean" 8965 description: "Attach to `stderr` of the exec command." 8966 DetachKeys: 8967 type: "string" 8968 description: | 8969 Override the key sequence for detaching a container. Format is 8970 a single character `[a-Z]` or `ctrl-<value>` where `<value>` 8971 is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. 8972 Tty: 8973 type: "boolean" 8974 description: "Allocate a pseudo-TTY." 8975 Env: 8976 description: | 8977 A list of environment variables in the form `["VAR=value", ...]`. 8978 type: "array" 8979 items: 8980 type: "string" 8981 Cmd: 8982 type: "array" 8983 description: "Command to run, as a string or array of strings." 8984 items: 8985 type: "string" 8986 Privileged: 8987 type: "boolean" 8988 description: "Runs the exec process with extended privileges." 8989 default: false 8990 User: 8991 type: "string" 8992 description: | 8993 The user, and optionally, group to run the exec process inside 8994 the container. Format is one of: `user`, `user:group`, `uid`, 8995 or `uid:gid`. 8996 WorkingDir: 8997 type: "string" 8998 description: | 8999 The working directory for the exec process inside the container. 9000 example: 9001 AttachStdin: false 9002 AttachStdout: true 9003 AttachStderr: true 9004 DetachKeys: "ctrl-p,ctrl-q" 9005 Tty: false 9006 Cmd: 9007 - "date" 9008 Env: 9009 - "FOO=bar" 9010 - "BAZ=quux" 9011 required: true 9012 - name: "id" 9013 in: "path" 9014 description: "ID or name of container" 9015 type: "string" 9016 required: true 9017 tags: ["Exec"] 9018 /exec/{id}/start: 9019 post: 9020 summary: "Start an exec instance" 9021 description: | 9022 Starts a previously set up exec instance. If detach is true, this endpoint 9023 returns immediately after starting the command. Otherwise, it sets up an 9024 interactive session with the command. 9025 operationId: "ExecStart" 9026 consumes: 9027 - "application/json" 9028 produces: 9029 - "application/vnd.docker.raw-stream" 9030 responses: 9031 200: 9032 description: "No error" 9033 404: 9034 description: "No such exec instance" 9035 schema: 9036 $ref: "#/definitions/ErrorResponse" 9037 409: 9038 description: "Container is stopped or paused" 9039 schema: 9040 $ref: "#/definitions/ErrorResponse" 9041 parameters: 9042 - name: "execStartConfig" 9043 in: "body" 9044 schema: 9045 type: "object" 9046 title: "ExecStartConfig" 9047 properties: 9048 Detach: 9049 type: "boolean" 9050 description: "Detach from the command." 9051 Tty: 9052 type: "boolean" 9053 description: "Allocate a pseudo-TTY." 9054 example: 9055 Detach: false 9056 Tty: false 9057 - name: "id" 9058 in: "path" 9059 description: "Exec instance ID" 9060 required: true 9061 type: "string" 9062 tags: ["Exec"] 9063 /exec/{id}/resize: 9064 post: 9065 summary: "Resize an exec instance" 9066 description: | 9067 Resize the TTY session used by an exec instance. This endpoint only works 9068 if `tty` was specified as part of creating and starting the exec instance. 9069 operationId: "ExecResize" 9070 responses: 9071 200: 9072 description: "No error" 9073 400: 9074 description: "bad parameter" 9075 schema: 9076 $ref: "#/definitions/ErrorResponse" 9077 404: 9078 description: "No such exec instance" 9079 schema: 9080 $ref: "#/definitions/ErrorResponse" 9081 500: 9082 description: "Server error" 9083 schema: 9084 $ref: "#/definitions/ErrorResponse" 9085 parameters: 9086 - name: "id" 9087 in: "path" 9088 description: "Exec instance ID" 9089 required: true 9090 type: "string" 9091 - name: "h" 9092 in: "query" 9093 description: "Height of the TTY session in characters" 9094 type: "integer" 9095 - name: "w" 9096 in: "query" 9097 description: "Width of the TTY session in characters" 9098 type: "integer" 9099 tags: ["Exec"] 9100 /exec/{id}/json: 9101 get: 9102 summary: "Inspect an exec instance" 9103 description: "Return low-level information about an exec instance." 9104 operationId: "ExecInspect" 9105 produces: 9106 - "application/json" 9107 responses: 9108 200: 9109 description: "No error" 9110 schema: 9111 type: "object" 9112 title: "ExecInspectResponse" 9113 properties: 9114 CanRemove: 9115 type: "boolean" 9116 DetachKeys: 9117 type: "string" 9118 ID: 9119 type: "string" 9120 Running: 9121 type: "boolean" 9122 ExitCode: 9123 type: "integer" 9124 ProcessConfig: 9125 $ref: "#/definitions/ProcessConfig" 9126 OpenStdin: 9127 type: "boolean" 9128 OpenStderr: 9129 type: "boolean" 9130 OpenStdout: 9131 type: "boolean" 9132 ContainerID: 9133 type: "string" 9134 Pid: 9135 type: "integer" 9136 description: "The system process ID for the exec process." 9137 examples: 9138 application/json: 9139 CanRemove: false 9140 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 9141 DetachKeys: "" 9142 ExitCode: 2 9143 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 9144 OpenStderr: true 9145 OpenStdin: true 9146 OpenStdout: true 9147 ProcessConfig: 9148 arguments: 9149 - "-c" 9150 - "exit 2" 9151 entrypoint: "sh" 9152 privileged: false 9153 tty: true 9154 user: "1000" 9155 Running: false 9156 Pid: 42000 9157 404: 9158 description: "No such exec instance" 9159 schema: 9160 $ref: "#/definitions/ErrorResponse" 9161 500: 9162 description: "Server error" 9163 schema: 9164 $ref: "#/definitions/ErrorResponse" 9165 parameters: 9166 - name: "id" 9167 in: "path" 9168 description: "Exec instance ID" 9169 required: true 9170 type: "string" 9171 tags: ["Exec"] 9172 9173 /volumes: 9174 get: 9175 summary: "List volumes" 9176 operationId: "VolumeList" 9177 produces: ["application/json"] 9178 responses: 9179 200: 9180 description: "Summary volume data that matches the query" 9181 schema: 9182 $ref: "#/definitions/VolumeListResponse" 9183 500: 9184 description: "Server error" 9185 schema: 9186 $ref: "#/definitions/ErrorResponse" 9187 parameters: 9188 - name: "filters" 9189 in: "query" 9190 description: | 9191 JSON encoded value of the filters (a `map[string][]string`) to 9192 process on the volumes list. Available filters: 9193 9194 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9195 volumes that are not in use by a container. When set to `false` 9196 (or `0`), only volumes that are in use by one or more 9197 containers are returned. 9198 - `driver=<volume-driver-name>` Matches volumes based on their driver. 9199 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 9200 the presence of a `label` alone or a `label` and a value. 9201 - `name=<volume-name>` Matches all or part of a volume name. 9202 type: "string" 9203 format: "json" 9204 tags: ["Volume"] 9205 9206 /volumes/create: 9207 post: 9208 summary: "Create a volume" 9209 operationId: "VolumeCreate" 9210 consumes: ["application/json"] 9211 produces: ["application/json"] 9212 responses: 9213 201: 9214 description: "The volume was created successfully" 9215 schema: 9216 $ref: "#/definitions/Volume" 9217 500: 9218 description: "Server error" 9219 schema: 9220 $ref: "#/definitions/ErrorResponse" 9221 parameters: 9222 - name: "volumeConfig" 9223 in: "body" 9224 required: true 9225 description: "Volume configuration" 9226 schema: 9227 $ref: "#/definitions/VolumeCreateOptions" 9228 tags: ["Volume"] 9229 9230 /volumes/{name}: 9231 get: 9232 summary: "Inspect a volume" 9233 operationId: "VolumeInspect" 9234 produces: ["application/json"] 9235 responses: 9236 200: 9237 description: "No error" 9238 schema: 9239 $ref: "#/definitions/Volume" 9240 404: 9241 description: "No such volume" 9242 schema: 9243 $ref: "#/definitions/ErrorResponse" 9244 500: 9245 description: "Server error" 9246 schema: 9247 $ref: "#/definitions/ErrorResponse" 9248 parameters: 9249 - name: "name" 9250 in: "path" 9251 required: true 9252 description: "Volume name or ID" 9253 type: "string" 9254 tags: ["Volume"] 9255 9256 delete: 9257 summary: "Remove a volume" 9258 description: "Instruct the driver to remove the volume." 9259 operationId: "VolumeDelete" 9260 responses: 9261 204: 9262 description: "The volume was removed" 9263 404: 9264 description: "No such volume or volume driver" 9265 schema: 9266 $ref: "#/definitions/ErrorResponse" 9267 409: 9268 description: "Volume is in use and cannot be removed" 9269 schema: 9270 $ref: "#/definitions/ErrorResponse" 9271 500: 9272 description: "Server error" 9273 schema: 9274 $ref: "#/definitions/ErrorResponse" 9275 parameters: 9276 - name: "name" 9277 in: "path" 9278 required: true 9279 description: "Volume name or ID" 9280 type: "string" 9281 - name: "force" 9282 in: "query" 9283 description: "Force the removal of the volume" 9284 type: "boolean" 9285 default: false 9286 tags: ["Volume"] 9287 9288 /volumes/prune: 9289 post: 9290 summary: "Delete unused volumes" 9291 produces: 9292 - "application/json" 9293 operationId: "VolumePrune" 9294 parameters: 9295 - name: "filters" 9296 in: "query" 9297 description: | 9298 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 9299 9300 Available filters: 9301 - `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. 9302 type: "string" 9303 responses: 9304 200: 9305 description: "No error" 9306 schema: 9307 type: "object" 9308 title: "VolumePruneResponse" 9309 properties: 9310 VolumesDeleted: 9311 description: "Volumes that were deleted" 9312 type: "array" 9313 items: 9314 type: "string" 9315 SpaceReclaimed: 9316 description: "Disk space reclaimed in bytes" 9317 type: "integer" 9318 format: "int64" 9319 500: 9320 description: "Server error" 9321 schema: 9322 $ref: "#/definitions/ErrorResponse" 9323 tags: ["Volume"] 9324 /networks: 9325 get: 9326 summary: "List networks" 9327 description: | 9328 Returns a list of networks. For details on the format, see the 9329 [network inspect endpoint](#operation/NetworkInspect). 9330 9331 Note that it uses a different, smaller representation of a network than 9332 inspecting a single network. For example, the list of containers attached 9333 to the network is not propagated in API versions 1.28 and up. 9334 operationId: "NetworkList" 9335 produces: 9336 - "application/json" 9337 responses: 9338 200: 9339 description: "No error" 9340 schema: 9341 type: "array" 9342 items: 9343 $ref: "#/definitions/Network" 9344 examples: 9345 application/json: 9346 - Name: "bridge" 9347 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 9348 Created: "2016-10-19T06:21:00.416543526Z" 9349 Scope: "local" 9350 Driver: "bridge" 9351 EnableIPv6: false 9352 Internal: false 9353 Attachable: false 9354 Ingress: false 9355 IPAM: 9356 Driver: "default" 9357 Config: 9358 - 9359 Subnet: "172.17.0.0/16" 9360 Options: 9361 com.docker.network.bridge.default_bridge: "true" 9362 com.docker.network.bridge.enable_icc: "true" 9363 com.docker.network.bridge.enable_ip_masquerade: "true" 9364 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 9365 com.docker.network.bridge.name: "docker0" 9366 com.docker.network.driver.mtu: "1500" 9367 - Name: "none" 9368 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 9369 Created: "0001-01-01T00:00:00Z" 9370 Scope: "local" 9371 Driver: "null" 9372 EnableIPv6: false 9373 Internal: false 9374 Attachable: false 9375 Ingress: false 9376 IPAM: 9377 Driver: "default" 9378 Config: [] 9379 Containers: {} 9380 Options: {} 9381 - Name: "host" 9382 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 9383 Created: "0001-01-01T00:00:00Z" 9384 Scope: "local" 9385 Driver: "host" 9386 EnableIPv6: false 9387 Internal: false 9388 Attachable: false 9389 Ingress: false 9390 IPAM: 9391 Driver: "default" 9392 Config: [] 9393 Containers: {} 9394 Options: {} 9395 500: 9396 description: "Server error" 9397 schema: 9398 $ref: "#/definitions/ErrorResponse" 9399 parameters: 9400 - name: "filters" 9401 in: "query" 9402 description: | 9403 JSON encoded value of the filters (a `map[string][]string`) to process 9404 on the networks list. 9405 9406 Available filters: 9407 9408 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9409 networks that are not in use by a container. When set to `false` 9410 (or `0`), only networks that are in use by one or more 9411 containers are returned. 9412 - `driver=<driver-name>` Matches a network's driver. 9413 - `id=<network-id>` Matches all or part of a network ID. 9414 - `label=<key>` or `label=<key>=<value>` of a network label. 9415 - `name=<network-name>` Matches all or part of a network name. 9416 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 9417 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 9418 type: "string" 9419 tags: ["Network"] 9420 9421 /networks/{id}: 9422 get: 9423 summary: "Inspect a network" 9424 operationId: "NetworkInspect" 9425 produces: 9426 - "application/json" 9427 responses: 9428 200: 9429 description: "No error" 9430 schema: 9431 $ref: "#/definitions/Network" 9432 404: 9433 description: "Network not found" 9434 schema: 9435 $ref: "#/definitions/ErrorResponse" 9436 500: 9437 description: "Server error" 9438 schema: 9439 $ref: "#/definitions/ErrorResponse" 9440 parameters: 9441 - name: "id" 9442 in: "path" 9443 description: "Network ID or name" 9444 required: true 9445 type: "string" 9446 - name: "verbose" 9447 in: "query" 9448 description: "Detailed inspect output for troubleshooting" 9449 type: "boolean" 9450 default: false 9451 - name: "scope" 9452 in: "query" 9453 description: "Filter the network by scope (swarm, global, or local)" 9454 type: "string" 9455 tags: ["Network"] 9456 9457 delete: 9458 summary: "Remove a network" 9459 operationId: "NetworkDelete" 9460 responses: 9461 204: 9462 description: "No error" 9463 403: 9464 description: "operation not supported for pre-defined networks" 9465 schema: 9466 $ref: "#/definitions/ErrorResponse" 9467 404: 9468 description: "no such network" 9469 schema: 9470 $ref: "#/definitions/ErrorResponse" 9471 500: 9472 description: "Server error" 9473 schema: 9474 $ref: "#/definitions/ErrorResponse" 9475 parameters: 9476 - name: "id" 9477 in: "path" 9478 description: "Network ID or name" 9479 required: true 9480 type: "string" 9481 tags: ["Network"] 9482 9483 /networks/create: 9484 post: 9485 summary: "Create a network" 9486 operationId: "NetworkCreate" 9487 consumes: 9488 - "application/json" 9489 produces: 9490 - "application/json" 9491 responses: 9492 201: 9493 description: "No error" 9494 schema: 9495 type: "object" 9496 title: "NetworkCreateResponse" 9497 properties: 9498 Id: 9499 description: "The ID of the created network." 9500 type: "string" 9501 Warning: 9502 type: "string" 9503 example: 9504 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 9505 Warning: "" 9506 403: 9507 description: "operation not supported for pre-defined networks" 9508 schema: 9509 $ref: "#/definitions/ErrorResponse" 9510 404: 9511 description: "plugin not found" 9512 schema: 9513 $ref: "#/definitions/ErrorResponse" 9514 500: 9515 description: "Server error" 9516 schema: 9517 $ref: "#/definitions/ErrorResponse" 9518 parameters: 9519 - name: "networkConfig" 9520 in: "body" 9521 description: "Network configuration" 9522 required: true 9523 schema: 9524 type: "object" 9525 title: "NetworkCreateRequest" 9526 required: ["Name"] 9527 properties: 9528 Name: 9529 description: "The network's name." 9530 type: "string" 9531 CheckDuplicate: 9532 description: | 9533 Check for networks with duplicate names. Since Network is 9534 primarily keyed based on a random ID and not on the name, and 9535 network name is strictly a user-friendly alias to the network 9536 which is uniquely identified using ID, there is no guaranteed 9537 way to check for duplicates. CheckDuplicate is there to provide 9538 a best effort checking of any networks which has the same name 9539 but it is not guaranteed to catch all name collisions. 9540 type: "boolean" 9541 Driver: 9542 description: "Name of the network driver plugin to use." 9543 type: "string" 9544 default: "bridge" 9545 Internal: 9546 description: "Restrict external access to the network." 9547 type: "boolean" 9548 Attachable: 9549 description: | 9550 Globally scoped network is manually attachable by regular 9551 containers from workers in swarm mode. 9552 type: "boolean" 9553 Ingress: 9554 description: | 9555 Ingress network is the network which provides the routing-mesh 9556 in swarm mode. 9557 type: "boolean" 9558 IPAM: 9559 description: "Optional custom IP scheme for the network." 9560 $ref: "#/definitions/IPAM" 9561 EnableIPv6: 9562 description: "Enable IPv6 on the network." 9563 type: "boolean" 9564 Options: 9565 description: "Network specific options to be used by the drivers." 9566 type: "object" 9567 additionalProperties: 9568 type: "string" 9569 Labels: 9570 description: "User-defined key/value metadata." 9571 type: "object" 9572 additionalProperties: 9573 type: "string" 9574 example: 9575 Name: "isolated_nw" 9576 CheckDuplicate: false 9577 Driver: "bridge" 9578 EnableIPv6: true 9579 IPAM: 9580 Driver: "default" 9581 Config: 9582 - Subnet: "172.20.0.0/16" 9583 IPRange: "172.20.10.0/24" 9584 Gateway: "172.20.10.11" 9585 - Subnet: "2001:db8:abcd::/64" 9586 Gateway: "2001:db8:abcd::1011" 9587 Options: 9588 foo: "bar" 9589 Internal: true 9590 Attachable: false 9591 Ingress: false 9592 Options: 9593 com.docker.network.bridge.default_bridge: "true" 9594 com.docker.network.bridge.enable_icc: "true" 9595 com.docker.network.bridge.enable_ip_masquerade: "true" 9596 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 9597 com.docker.network.bridge.name: "docker0" 9598 com.docker.network.driver.mtu: "1500" 9599 Labels: 9600 com.example.some-label: "some-value" 9601 com.example.some-other-label: "some-other-value" 9602 tags: ["Network"] 9603 9604 /networks/{id}/connect: 9605 post: 9606 summary: "Connect a container to a network" 9607 operationId: "NetworkConnect" 9608 consumes: 9609 - "application/json" 9610 responses: 9611 200: 9612 description: "No error" 9613 403: 9614 description: "Operation not supported for swarm scoped networks" 9615 schema: 9616 $ref: "#/definitions/ErrorResponse" 9617 404: 9618 description: "Network or container not found" 9619 schema: 9620 $ref: "#/definitions/ErrorResponse" 9621 500: 9622 description: "Server error" 9623 schema: 9624 $ref: "#/definitions/ErrorResponse" 9625 parameters: 9626 - name: "id" 9627 in: "path" 9628 description: "Network ID or name" 9629 required: true 9630 type: "string" 9631 - name: "container" 9632 in: "body" 9633 required: true 9634 schema: 9635 type: "object" 9636 title: "NetworkDisconnectRequest" 9637 properties: 9638 Container: 9639 type: "string" 9640 description: "The ID or name of the container to connect to the network." 9641 EndpointConfig: 9642 $ref: "#/definitions/EndpointSettings" 9643 example: 9644 Container: "3613f73ba0e4" 9645 EndpointConfig: 9646 IPAMConfig: 9647 IPv4Address: "172.24.56.89" 9648 IPv6Address: "2001:db8::5689" 9649 tags: ["Network"] 9650 9651 /networks/{id}/disconnect: 9652 post: 9653 summary: "Disconnect a container from a network" 9654 operationId: "NetworkDisconnect" 9655 consumes: 9656 - "application/json" 9657 responses: 9658 200: 9659 description: "No error" 9660 403: 9661 description: "Operation not supported for swarm scoped networks" 9662 schema: 9663 $ref: "#/definitions/ErrorResponse" 9664 404: 9665 description: "Network or container not found" 9666 schema: 9667 $ref: "#/definitions/ErrorResponse" 9668 500: 9669 description: "Server error" 9670 schema: 9671 $ref: "#/definitions/ErrorResponse" 9672 parameters: 9673 - name: "id" 9674 in: "path" 9675 description: "Network ID or name" 9676 required: true 9677 type: "string" 9678 - name: "container" 9679 in: "body" 9680 required: true 9681 schema: 9682 type: "object" 9683 title: "NetworkConnectRequest" 9684 properties: 9685 Container: 9686 type: "string" 9687 description: | 9688 The ID or name of the container to disconnect from the network. 9689 Force: 9690 type: "boolean" 9691 description: | 9692 Force the container to disconnect from the network. 9693 tags: ["Network"] 9694 /networks/prune: 9695 post: 9696 summary: "Delete unused networks" 9697 produces: 9698 - "application/json" 9699 operationId: "NetworkPrune" 9700 parameters: 9701 - name: "filters" 9702 in: "query" 9703 description: | 9704 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 9705 9706 Available filters: 9707 - `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. 9708 - `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. 9709 type: "string" 9710 responses: 9711 200: 9712 description: "No error" 9713 schema: 9714 type: "object" 9715 title: "NetworkPruneResponse" 9716 properties: 9717 NetworksDeleted: 9718 description: "Networks that were deleted" 9719 type: "array" 9720 items: 9721 type: "string" 9722 500: 9723 description: "Server error" 9724 schema: 9725 $ref: "#/definitions/ErrorResponse" 9726 tags: ["Network"] 9727 /plugins: 9728 get: 9729 summary: "List plugins" 9730 operationId: "PluginList" 9731 description: "Returns information about installed plugins." 9732 produces: ["application/json"] 9733 responses: 9734 200: 9735 description: "No error" 9736 schema: 9737 type: "array" 9738 items: 9739 $ref: "#/definitions/Plugin" 9740 500: 9741 description: "Server error" 9742 schema: 9743 $ref: "#/definitions/ErrorResponse" 9744 parameters: 9745 - name: "filters" 9746 in: "query" 9747 type: "string" 9748 description: | 9749 A JSON encoded value of the filters (a `map[string][]string`) to 9750 process on the plugin list. 9751 9752 Available filters: 9753 9754 - `capability=<capability name>` 9755 - `enable=<true>|<false>` 9756 tags: ["Plugin"] 9757 9758 /plugins/privileges: 9759 get: 9760 summary: "Get plugin privileges" 9761 operationId: "GetPluginPrivileges" 9762 responses: 9763 200: 9764 description: "no error" 9765 schema: 9766 type: "array" 9767 items: 9768 $ref: "#/definitions/PluginPrivilege" 9769 example: 9770 - Name: "network" 9771 Description: "" 9772 Value: 9773 - "host" 9774 - Name: "mount" 9775 Description: "" 9776 Value: 9777 - "/data" 9778 - Name: "device" 9779 Description: "" 9780 Value: 9781 - "/dev/cpu_dma_latency" 9782 500: 9783 description: "server error" 9784 schema: 9785 $ref: "#/definitions/ErrorResponse" 9786 parameters: 9787 - name: "remote" 9788 in: "query" 9789 description: | 9790 The name of the plugin. The `:latest` tag is optional, and is the 9791 default if omitted. 9792 required: true 9793 type: "string" 9794 tags: 9795 - "Plugin" 9796 9797 /plugins/pull: 9798 post: 9799 summary: "Install a plugin" 9800 operationId: "PluginPull" 9801 description: | 9802 Pulls and installs a plugin. After the plugin is installed, it can be 9803 enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). 9804 produces: 9805 - "application/json" 9806 responses: 9807 204: 9808 description: "no error" 9809 500: 9810 description: "server error" 9811 schema: 9812 $ref: "#/definitions/ErrorResponse" 9813 parameters: 9814 - name: "remote" 9815 in: "query" 9816 description: | 9817 Remote reference for plugin to install. 9818 9819 The `:latest` tag is optional, and is used as the default if omitted. 9820 required: true 9821 type: "string" 9822 - name: "name" 9823 in: "query" 9824 description: | 9825 Local name for the pulled plugin. 9826 9827 The `:latest` tag is optional, and is used as the default if omitted. 9828 required: false 9829 type: "string" 9830 - name: "X-Registry-Auth" 9831 in: "header" 9832 description: | 9833 A base64url-encoded auth configuration to use when pulling a plugin 9834 from a registry. 9835 9836 Refer to the [authentication section](#section/Authentication) for 9837 details. 9838 type: "string" 9839 - name: "body" 9840 in: "body" 9841 schema: 9842 type: "array" 9843 items: 9844 $ref: "#/definitions/PluginPrivilege" 9845 example: 9846 - Name: "network" 9847 Description: "" 9848 Value: 9849 - "host" 9850 - Name: "mount" 9851 Description: "" 9852 Value: 9853 - "/data" 9854 - Name: "device" 9855 Description: "" 9856 Value: 9857 - "/dev/cpu_dma_latency" 9858 tags: ["Plugin"] 9859 /plugins/{name}/json: 9860 get: 9861 summary: "Inspect a plugin" 9862 operationId: "PluginInspect" 9863 responses: 9864 200: 9865 description: "no error" 9866 schema: 9867 $ref: "#/definitions/Plugin" 9868 404: 9869 description: "plugin is not installed" 9870 schema: 9871 $ref: "#/definitions/ErrorResponse" 9872 500: 9873 description: "server error" 9874 schema: 9875 $ref: "#/definitions/ErrorResponse" 9876 parameters: 9877 - name: "name" 9878 in: "path" 9879 description: | 9880 The name of the plugin. The `:latest` tag is optional, and is the 9881 default if omitted. 9882 required: true 9883 type: "string" 9884 tags: ["Plugin"] 9885 /plugins/{name}: 9886 delete: 9887 summary: "Remove a plugin" 9888 operationId: "PluginDelete" 9889 responses: 9890 200: 9891 description: "no error" 9892 schema: 9893 $ref: "#/definitions/Plugin" 9894 404: 9895 description: "plugin is not installed" 9896 schema: 9897 $ref: "#/definitions/ErrorResponse" 9898 500: 9899 description: "server error" 9900 schema: 9901 $ref: "#/definitions/ErrorResponse" 9902 parameters: 9903 - name: "name" 9904 in: "path" 9905 description: | 9906 The name of the plugin. The `:latest` tag is optional, and is the 9907 default if omitted. 9908 required: true 9909 type: "string" 9910 - name: "force" 9911 in: "query" 9912 description: | 9913 Disable the plugin before removing. This may result in issues if the 9914 plugin is in use by a container. 9915 type: "boolean" 9916 default: false 9917 tags: ["Plugin"] 9918 /plugins/{name}/enable: 9919 post: 9920 summary: "Enable a plugin" 9921 operationId: "PluginEnable" 9922 responses: 9923 200: 9924 description: "no error" 9925 404: 9926 description: "plugin is not installed" 9927 schema: 9928 $ref: "#/definitions/ErrorResponse" 9929 500: 9930 description: "server error" 9931 schema: 9932 $ref: "#/definitions/ErrorResponse" 9933 parameters: 9934 - name: "name" 9935 in: "path" 9936 description: | 9937 The name of the plugin. The `:latest` tag is optional, and is the 9938 default if omitted. 9939 required: true 9940 type: "string" 9941 - name: "timeout" 9942 in: "query" 9943 description: "Set the HTTP client timeout (in seconds)" 9944 type: "integer" 9945 default: 0 9946 tags: ["Plugin"] 9947 /plugins/{name}/disable: 9948 post: 9949 summary: "Disable a plugin" 9950 operationId: "PluginDisable" 9951 responses: 9952 200: 9953 description: "no error" 9954 404: 9955 description: "plugin is not installed" 9956 schema: 9957 $ref: "#/definitions/ErrorResponse" 9958 500: 9959 description: "server error" 9960 schema: 9961 $ref: "#/definitions/ErrorResponse" 9962 parameters: 9963 - name: "name" 9964 in: "path" 9965 description: | 9966 The name of the plugin. The `:latest` tag is optional, and is the 9967 default if omitted. 9968 required: true 9969 type: "string" 9970 tags: ["Plugin"] 9971 /plugins/{name}/upgrade: 9972 post: 9973 summary: "Upgrade a plugin" 9974 operationId: "PluginUpgrade" 9975 responses: 9976 204: 9977 description: "no error" 9978 404: 9979 description: "plugin not installed" 9980 schema: 9981 $ref: "#/definitions/ErrorResponse" 9982 500: 9983 description: "server error" 9984 schema: 9985 $ref: "#/definitions/ErrorResponse" 9986 parameters: 9987 - name: "name" 9988 in: "path" 9989 description: | 9990 The name of the plugin. The `:latest` tag is optional, and is the 9991 default if omitted. 9992 required: true 9993 type: "string" 9994 - name: "remote" 9995 in: "query" 9996 description: | 9997 Remote reference to upgrade to. 9998 9999 The `:latest` tag is optional, and is used as the default if omitted. 10000 required: true 10001 type: "string" 10002 - name: "X-Registry-Auth" 10003 in: "header" 10004 description: | 10005 A base64url-encoded auth configuration to use when pulling a plugin 10006 from a registry. 10007 10008 Refer to the [authentication section](#section/Authentication) for 10009 details. 10010 type: "string" 10011 - name: "body" 10012 in: "body" 10013 schema: 10014 type: "array" 10015 items: 10016 $ref: "#/definitions/PluginPrivilege" 10017 example: 10018 - Name: "network" 10019 Description: "" 10020 Value: 10021 - "host" 10022 - Name: "mount" 10023 Description: "" 10024 Value: 10025 - "/data" 10026 - Name: "device" 10027 Description: "" 10028 Value: 10029 - "/dev/cpu_dma_latency" 10030 tags: ["Plugin"] 10031 /plugins/create: 10032 post: 10033 summary: "Create a plugin" 10034 operationId: "PluginCreate" 10035 consumes: 10036 - "application/x-tar" 10037 responses: 10038 204: 10039 description: "no error" 10040 500: 10041 description: "server error" 10042 schema: 10043 $ref: "#/definitions/ErrorResponse" 10044 parameters: 10045 - name: "name" 10046 in: "query" 10047 description: | 10048 The name of the plugin. The `:latest` tag is optional, and is the 10049 default if omitted. 10050 required: true 10051 type: "string" 10052 - name: "tarContext" 10053 in: "body" 10054 description: "Path to tar containing plugin rootfs and manifest" 10055 schema: 10056 type: "string" 10057 format: "binary" 10058 tags: ["Plugin"] 10059 /plugins/{name}/push: 10060 post: 10061 summary: "Push a plugin" 10062 operationId: "PluginPush" 10063 description: | 10064 Push a plugin to the registry. 10065 parameters: 10066 - name: "name" 10067 in: "path" 10068 description: | 10069 The name of the plugin. The `:latest` tag is optional, and is the 10070 default if omitted. 10071 required: true 10072 type: "string" 10073 responses: 10074 200: 10075 description: "no error" 10076 404: 10077 description: "plugin not installed" 10078 schema: 10079 $ref: "#/definitions/ErrorResponse" 10080 500: 10081 description: "server error" 10082 schema: 10083 $ref: "#/definitions/ErrorResponse" 10084 tags: ["Plugin"] 10085 /plugins/{name}/set: 10086 post: 10087 summary: "Configure a plugin" 10088 operationId: "PluginSet" 10089 consumes: 10090 - "application/json" 10091 parameters: 10092 - name: "name" 10093 in: "path" 10094 description: | 10095 The name of the plugin. The `:latest` tag is optional, and is the 10096 default if omitted. 10097 required: true 10098 type: "string" 10099 - name: "body" 10100 in: "body" 10101 schema: 10102 type: "array" 10103 items: 10104 type: "string" 10105 example: ["DEBUG=1"] 10106 responses: 10107 204: 10108 description: "No error" 10109 404: 10110 description: "Plugin not installed" 10111 schema: 10112 $ref: "#/definitions/ErrorResponse" 10113 500: 10114 description: "Server error" 10115 schema: 10116 $ref: "#/definitions/ErrorResponse" 10117 tags: ["Plugin"] 10118 /nodes: 10119 get: 10120 summary: "List nodes" 10121 operationId: "NodeList" 10122 responses: 10123 200: 10124 description: "no error" 10125 schema: 10126 type: "array" 10127 items: 10128 $ref: "#/definitions/Node" 10129 500: 10130 description: "server error" 10131 schema: 10132 $ref: "#/definitions/ErrorResponse" 10133 503: 10134 description: "node is not part of a swarm" 10135 schema: 10136 $ref: "#/definitions/ErrorResponse" 10137 parameters: 10138 - name: "filters" 10139 in: "query" 10140 description: | 10141 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 10142 10143 Available filters: 10144 - `id=<node id>` 10145 - `label=<engine label>` 10146 - `membership=`(`accepted`|`pending`)` 10147 - `name=<node name>` 10148 - `node.label=<node label>` 10149 - `role=`(`manager`|`worker`)` 10150 type: "string" 10151 tags: ["Node"] 10152 /nodes/{id}: 10153 get: 10154 summary: "Inspect a node" 10155 operationId: "NodeInspect" 10156 responses: 10157 200: 10158 description: "no error" 10159 schema: 10160 $ref: "#/definitions/Node" 10161 404: 10162 description: "no such node" 10163 schema: 10164 $ref: "#/definitions/ErrorResponse" 10165 500: 10166 description: "server error" 10167 schema: 10168 $ref: "#/definitions/ErrorResponse" 10169 503: 10170 description: "node is not part of a swarm" 10171 schema: 10172 $ref: "#/definitions/ErrorResponse" 10173 parameters: 10174 - name: "id" 10175 in: "path" 10176 description: "The ID or name of the node" 10177 type: "string" 10178 required: true 10179 tags: ["Node"] 10180 delete: 10181 summary: "Delete a node" 10182 operationId: "NodeDelete" 10183 responses: 10184 200: 10185 description: "no error" 10186 404: 10187 description: "no such node" 10188 schema: 10189 $ref: "#/definitions/ErrorResponse" 10190 500: 10191 description: "server error" 10192 schema: 10193 $ref: "#/definitions/ErrorResponse" 10194 503: 10195 description: "node is not part of a swarm" 10196 schema: 10197 $ref: "#/definitions/ErrorResponse" 10198 parameters: 10199 - name: "id" 10200 in: "path" 10201 description: "The ID or name of the node" 10202 type: "string" 10203 required: true 10204 - name: "force" 10205 in: "query" 10206 description: "Force remove a node from the swarm" 10207 default: false 10208 type: "boolean" 10209 tags: ["Node"] 10210 /nodes/{id}/update: 10211 post: 10212 summary: "Update a node" 10213 operationId: "NodeUpdate" 10214 responses: 10215 200: 10216 description: "no error" 10217 400: 10218 description: "bad parameter" 10219 schema: 10220 $ref: "#/definitions/ErrorResponse" 10221 404: 10222 description: "no such node" 10223 schema: 10224 $ref: "#/definitions/ErrorResponse" 10225 500: 10226 description: "server error" 10227 schema: 10228 $ref: "#/definitions/ErrorResponse" 10229 503: 10230 description: "node is not part of a swarm" 10231 schema: 10232 $ref: "#/definitions/ErrorResponse" 10233 parameters: 10234 - name: "id" 10235 in: "path" 10236 description: "The ID of the node" 10237 type: "string" 10238 required: true 10239 - name: "body" 10240 in: "body" 10241 schema: 10242 $ref: "#/definitions/NodeSpec" 10243 - name: "version" 10244 in: "query" 10245 description: | 10246 The version number of the node object being updated. This is required 10247 to avoid conflicting writes. 10248 type: "integer" 10249 format: "int64" 10250 required: true 10251 tags: ["Node"] 10252 /swarm: 10253 get: 10254 summary: "Inspect swarm" 10255 operationId: "SwarmInspect" 10256 responses: 10257 200: 10258 description: "no error" 10259 schema: 10260 $ref: "#/definitions/Swarm" 10261 404: 10262 description: "no such swarm" 10263 schema: 10264 $ref: "#/definitions/ErrorResponse" 10265 500: 10266 description: "server error" 10267 schema: 10268 $ref: "#/definitions/ErrorResponse" 10269 503: 10270 description: "node is not part of a swarm" 10271 schema: 10272 $ref: "#/definitions/ErrorResponse" 10273 tags: ["Swarm"] 10274 /swarm/init: 10275 post: 10276 summary: "Initialize a new swarm" 10277 operationId: "SwarmInit" 10278 produces: 10279 - "application/json" 10280 - "text/plain" 10281 responses: 10282 200: 10283 description: "no error" 10284 schema: 10285 description: "The node ID" 10286 type: "string" 10287 example: "7v2t30z9blmxuhnyo6s4cpenp" 10288 400: 10289 description: "bad parameter" 10290 schema: 10291 $ref: "#/definitions/ErrorResponse" 10292 500: 10293 description: "server error" 10294 schema: 10295 $ref: "#/definitions/ErrorResponse" 10296 503: 10297 description: "node is already part of a swarm" 10298 schema: 10299 $ref: "#/definitions/ErrorResponse" 10300 parameters: 10301 - name: "body" 10302 in: "body" 10303 required: true 10304 schema: 10305 type: "object" 10306 title: "SwarmInitRequest" 10307 properties: 10308 ListenAddr: 10309 description: | 10310 Listen address used for inter-manager communication, as well 10311 as determining the networking interface used for the VXLAN 10312 Tunnel Endpoint (VTEP). This can either be an address/port 10313 combination in the form `192.168.1.1:4567`, or an interface 10314 followed by a port number, like `eth0:4567`. If the port number 10315 is omitted, the default swarm listening port is used. 10316 type: "string" 10317 AdvertiseAddr: 10318 description: | 10319 Externally reachable address advertised to other nodes. This 10320 can either be an address/port combination in the form 10321 `192.168.1.1:4567`, or an interface followed by a port number, 10322 like `eth0:4567`. If the port number is omitted, the port 10323 number from the listen address is used. If `AdvertiseAddr` is 10324 not specified, it will be automatically detected when possible. 10325 type: "string" 10326 DataPathAddr: 10327 description: | 10328 Address or interface to use for data path traffic (format: 10329 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10330 like `eth0`. If `DataPathAddr` is unspecified, the same address 10331 as `AdvertiseAddr` is used. 10332 10333 The `DataPathAddr` specifies the address that global scope 10334 network drivers will publish towards other nodes in order to 10335 reach the containers running on this node. Using this parameter 10336 it is possible to separate the container data traffic from the 10337 management traffic of the cluster. 10338 type: "string" 10339 DataPathPort: 10340 description: | 10341 DataPathPort specifies the data path port number for data traffic. 10342 Acceptable port range is 1024 to 49151. 10343 if no port is set or is set to 0, default port 4789 will be used. 10344 type: "integer" 10345 format: "uint32" 10346 DefaultAddrPool: 10347 description: | 10348 Default Address Pool specifies default subnet pools for global 10349 scope networks. 10350 type: "array" 10351 items: 10352 type: "string" 10353 example: ["10.10.0.0/16", "20.20.0.0/16"] 10354 ForceNewCluster: 10355 description: "Force creation of a new swarm." 10356 type: "boolean" 10357 SubnetSize: 10358 description: | 10359 SubnetSize specifies the subnet size of the networks created 10360 from the default subnet pool. 10361 type: "integer" 10362 format: "uint32" 10363 Spec: 10364 $ref: "#/definitions/SwarmSpec" 10365 example: 10366 ListenAddr: "0.0.0.0:2377" 10367 AdvertiseAddr: "192.168.1.1:2377" 10368 DataPathPort: 4789 10369 DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] 10370 SubnetSize: 24 10371 ForceNewCluster: false 10372 Spec: 10373 Orchestration: {} 10374 Raft: {} 10375 Dispatcher: {} 10376 CAConfig: {} 10377 EncryptionConfig: 10378 AutoLockManagers: false 10379 tags: ["Swarm"] 10380 /swarm/join: 10381 post: 10382 summary: "Join an existing swarm" 10383 operationId: "SwarmJoin" 10384 responses: 10385 200: 10386 description: "no error" 10387 400: 10388 description: "bad parameter" 10389 schema: 10390 $ref: "#/definitions/ErrorResponse" 10391 500: 10392 description: "server error" 10393 schema: 10394 $ref: "#/definitions/ErrorResponse" 10395 503: 10396 description: "node is already part of a swarm" 10397 schema: 10398 $ref: "#/definitions/ErrorResponse" 10399 parameters: 10400 - name: "body" 10401 in: "body" 10402 required: true 10403 schema: 10404 type: "object" 10405 title: "SwarmJoinRequest" 10406 properties: 10407 ListenAddr: 10408 description: | 10409 Listen address used for inter-manager communication if the node 10410 gets promoted to manager, as well as determining the networking 10411 interface used for the VXLAN Tunnel Endpoint (VTEP). 10412 type: "string" 10413 AdvertiseAddr: 10414 description: | 10415 Externally reachable address advertised to other nodes. This 10416 can either be an address/port combination in the form 10417 `192.168.1.1:4567`, or an interface followed by a port number, 10418 like `eth0:4567`. If the port number is omitted, the port 10419 number from the listen address is used. If `AdvertiseAddr` is 10420 not specified, it will be automatically detected when possible. 10421 type: "string" 10422 DataPathAddr: 10423 description: | 10424 Address or interface to use for data path traffic (format: 10425 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10426 like `eth0`. If `DataPathAddr` is unspecified, the same address 10427 as `AdvertiseAddr` is used. 10428 10429 The `DataPathAddr` specifies the address that global scope 10430 network drivers will publish towards other nodes in order to 10431 reach the containers running on this node. Using this parameter 10432 it is possible to separate the container data traffic from the 10433 management traffic of the cluster. 10434 10435 type: "string" 10436 RemoteAddrs: 10437 description: | 10438 Addresses of manager nodes already participating in the swarm. 10439 type: "array" 10440 items: 10441 type: "string" 10442 JoinToken: 10443 description: "Secret token for joining this swarm." 10444 type: "string" 10445 example: 10446 ListenAddr: "0.0.0.0:2377" 10447 AdvertiseAddr: "192.168.1.1:2377" 10448 RemoteAddrs: 10449 - "node1:2377" 10450 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 10451 tags: ["Swarm"] 10452 /swarm/leave: 10453 post: 10454 summary: "Leave a swarm" 10455 operationId: "SwarmLeave" 10456 responses: 10457 200: 10458 description: "no error" 10459 500: 10460 description: "server error" 10461 schema: 10462 $ref: "#/definitions/ErrorResponse" 10463 503: 10464 description: "node is not part of a swarm" 10465 schema: 10466 $ref: "#/definitions/ErrorResponse" 10467 parameters: 10468 - name: "force" 10469 description: | 10470 Force leave swarm, even if this is the last manager or that it will 10471 break the cluster. 10472 in: "query" 10473 type: "boolean" 10474 default: false 10475 tags: ["Swarm"] 10476 /swarm/update: 10477 post: 10478 summary: "Update a swarm" 10479 operationId: "SwarmUpdate" 10480 responses: 10481 200: 10482 description: "no error" 10483 400: 10484 description: "bad parameter" 10485 schema: 10486 $ref: "#/definitions/ErrorResponse" 10487 500: 10488 description: "server error" 10489 schema: 10490 $ref: "#/definitions/ErrorResponse" 10491 503: 10492 description: "node is not part of a swarm" 10493 schema: 10494 $ref: "#/definitions/ErrorResponse" 10495 parameters: 10496 - name: "body" 10497 in: "body" 10498 required: true 10499 schema: 10500 $ref: "#/definitions/SwarmSpec" 10501 - name: "version" 10502 in: "query" 10503 description: | 10504 The version number of the swarm object being updated. This is 10505 required to avoid conflicting writes. 10506 type: "integer" 10507 format: "int64" 10508 required: true 10509 - name: "rotateWorkerToken" 10510 in: "query" 10511 description: "Rotate the worker join token." 10512 type: "boolean" 10513 default: false 10514 - name: "rotateManagerToken" 10515 in: "query" 10516 description: "Rotate the manager join token." 10517 type: "boolean" 10518 default: false 10519 - name: "rotateManagerUnlockKey" 10520 in: "query" 10521 description: "Rotate the manager unlock key." 10522 type: "boolean" 10523 default: false 10524 tags: ["Swarm"] 10525 /swarm/unlockkey: 10526 get: 10527 summary: "Get the unlock key" 10528 operationId: "SwarmUnlockkey" 10529 consumes: 10530 - "application/json" 10531 responses: 10532 200: 10533 description: "no error" 10534 schema: 10535 type: "object" 10536 title: "UnlockKeyResponse" 10537 properties: 10538 UnlockKey: 10539 description: "The swarm's unlock key." 10540 type: "string" 10541 example: 10542 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10543 500: 10544 description: "server error" 10545 schema: 10546 $ref: "#/definitions/ErrorResponse" 10547 503: 10548 description: "node is not part of a swarm" 10549 schema: 10550 $ref: "#/definitions/ErrorResponse" 10551 tags: ["Swarm"] 10552 /swarm/unlock: 10553 post: 10554 summary: "Unlock a locked manager" 10555 operationId: "SwarmUnlock" 10556 consumes: 10557 - "application/json" 10558 produces: 10559 - "application/json" 10560 parameters: 10561 - name: "body" 10562 in: "body" 10563 required: true 10564 schema: 10565 type: "object" 10566 title: "SwarmUnlockRequest" 10567 properties: 10568 UnlockKey: 10569 description: "The swarm's unlock key." 10570 type: "string" 10571 example: 10572 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10573 responses: 10574 200: 10575 description: "no error" 10576 500: 10577 description: "server error" 10578 schema: 10579 $ref: "#/definitions/ErrorResponse" 10580 503: 10581 description: "node is not part of a swarm" 10582 schema: 10583 $ref: "#/definitions/ErrorResponse" 10584 tags: ["Swarm"] 10585 /services: 10586 get: 10587 summary: "List services" 10588 operationId: "ServiceList" 10589 responses: 10590 200: 10591 description: "no error" 10592 schema: 10593 type: "array" 10594 items: 10595 $ref: "#/definitions/Service" 10596 500: 10597 description: "server error" 10598 schema: 10599 $ref: "#/definitions/ErrorResponse" 10600 503: 10601 description: "node is not part of a swarm" 10602 schema: 10603 $ref: "#/definitions/ErrorResponse" 10604 parameters: 10605 - name: "filters" 10606 in: "query" 10607 type: "string" 10608 description: | 10609 A JSON encoded value of the filters (a `map[string][]string`) to 10610 process on the services list. 10611 10612 Available filters: 10613 10614 - `id=<service id>` 10615 - `label=<service label>` 10616 - `mode=["replicated"|"global"]` 10617 - `name=<service name>` 10618 - name: "status" 10619 in: "query" 10620 type: "boolean" 10621 description: | 10622 Include service status, with count of running and desired tasks. 10623 tags: ["Service"] 10624 /services/create: 10625 post: 10626 summary: "Create a service" 10627 operationId: "ServiceCreate" 10628 consumes: 10629 - "application/json" 10630 produces: 10631 - "application/json" 10632 responses: 10633 201: 10634 description: "no error" 10635 schema: 10636 type: "object" 10637 title: "ServiceCreateResponse" 10638 properties: 10639 ID: 10640 description: "The ID of the created service." 10641 type: "string" 10642 Warning: 10643 description: "Optional warning message" 10644 type: "string" 10645 example: 10646 ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" 10647 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 10648 400: 10649 description: "bad parameter" 10650 schema: 10651 $ref: "#/definitions/ErrorResponse" 10652 403: 10653 description: "network is not eligible for services" 10654 schema: 10655 $ref: "#/definitions/ErrorResponse" 10656 409: 10657 description: "name conflicts with an existing service" 10658 schema: 10659 $ref: "#/definitions/ErrorResponse" 10660 500: 10661 description: "server error" 10662 schema: 10663 $ref: "#/definitions/ErrorResponse" 10664 503: 10665 description: "node is not part of a swarm" 10666 schema: 10667 $ref: "#/definitions/ErrorResponse" 10668 parameters: 10669 - name: "body" 10670 in: "body" 10671 required: true 10672 schema: 10673 allOf: 10674 - $ref: "#/definitions/ServiceSpec" 10675 - type: "object" 10676 example: 10677 Name: "web" 10678 TaskTemplate: 10679 ContainerSpec: 10680 Image: "nginx:alpine" 10681 Mounts: 10682 - 10683 ReadOnly: true 10684 Source: "web-data" 10685 Target: "/usr/share/nginx/html" 10686 Type: "volume" 10687 VolumeOptions: 10688 DriverConfig: {} 10689 Labels: 10690 com.example.something: "something-value" 10691 Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] 10692 User: "33" 10693 DNSConfig: 10694 Nameservers: ["8.8.8.8"] 10695 Search: ["example.org"] 10696 Options: ["timeout:3"] 10697 Secrets: 10698 - 10699 File: 10700 Name: "www.example.org.key" 10701 UID: "33" 10702 GID: "33" 10703 Mode: 384 10704 SecretID: "fpjqlhnwb19zds35k8wn80lq9" 10705 SecretName: "example_org_domain_key" 10706 LogDriver: 10707 Name: "json-file" 10708 Options: 10709 max-file: "3" 10710 max-size: "10M" 10711 Placement: {} 10712 Resources: 10713 Limits: 10714 MemoryBytes: 104857600 10715 Reservations: {} 10716 RestartPolicy: 10717 Condition: "on-failure" 10718 Delay: 10000000000 10719 MaxAttempts: 10 10720 Mode: 10721 Replicated: 10722 Replicas: 4 10723 UpdateConfig: 10724 Parallelism: 2 10725 Delay: 1000000000 10726 FailureAction: "pause" 10727 Monitor: 15000000000 10728 MaxFailureRatio: 0.15 10729 RollbackConfig: 10730 Parallelism: 1 10731 Delay: 1000000000 10732 FailureAction: "pause" 10733 Monitor: 15000000000 10734 MaxFailureRatio: 0.15 10735 EndpointSpec: 10736 Ports: 10737 - 10738 Protocol: "tcp" 10739 PublishedPort: 8080 10740 TargetPort: 80 10741 Labels: 10742 foo: "bar" 10743 - name: "X-Registry-Auth" 10744 in: "header" 10745 description: | 10746 A base64url-encoded auth configuration for pulling from private 10747 registries. 10748 10749 Refer to the [authentication section](#section/Authentication) for 10750 details. 10751 type: "string" 10752 tags: ["Service"] 10753 /services/{id}: 10754 get: 10755 summary: "Inspect a service" 10756 operationId: "ServiceInspect" 10757 responses: 10758 200: 10759 description: "no error" 10760 schema: 10761 $ref: "#/definitions/Service" 10762 404: 10763 description: "no such service" 10764 schema: 10765 $ref: "#/definitions/ErrorResponse" 10766 500: 10767 description: "server error" 10768 schema: 10769 $ref: "#/definitions/ErrorResponse" 10770 503: 10771 description: "node is not part of a swarm" 10772 schema: 10773 $ref: "#/definitions/ErrorResponse" 10774 parameters: 10775 - name: "id" 10776 in: "path" 10777 description: "ID or name of service." 10778 required: true 10779 type: "string" 10780 - name: "insertDefaults" 10781 in: "query" 10782 description: "Fill empty fields with default values." 10783 type: "boolean" 10784 default: false 10785 tags: ["Service"] 10786 delete: 10787 summary: "Delete a service" 10788 operationId: "ServiceDelete" 10789 responses: 10790 200: 10791 description: "no error" 10792 404: 10793 description: "no such service" 10794 schema: 10795 $ref: "#/definitions/ErrorResponse" 10796 500: 10797 description: "server error" 10798 schema: 10799 $ref: "#/definitions/ErrorResponse" 10800 503: 10801 description: "node is not part of a swarm" 10802 schema: 10803 $ref: "#/definitions/ErrorResponse" 10804 parameters: 10805 - name: "id" 10806 in: "path" 10807 description: "ID or name of service." 10808 required: true 10809 type: "string" 10810 tags: ["Service"] 10811 /services/{id}/update: 10812 post: 10813 summary: "Update a service" 10814 operationId: "ServiceUpdate" 10815 consumes: ["application/json"] 10816 produces: ["application/json"] 10817 responses: 10818 200: 10819 description: "no error" 10820 schema: 10821 $ref: "#/definitions/ServiceUpdateResponse" 10822 400: 10823 description: "bad parameter" 10824 schema: 10825 $ref: "#/definitions/ErrorResponse" 10826 404: 10827 description: "no such service" 10828 schema: 10829 $ref: "#/definitions/ErrorResponse" 10830 500: 10831 description: "server error" 10832 schema: 10833 $ref: "#/definitions/ErrorResponse" 10834 503: 10835 description: "node is not part of a swarm" 10836 schema: 10837 $ref: "#/definitions/ErrorResponse" 10838 parameters: 10839 - name: "id" 10840 in: "path" 10841 description: "ID or name of service." 10842 required: true 10843 type: "string" 10844 - name: "body" 10845 in: "body" 10846 required: true 10847 schema: 10848 allOf: 10849 - $ref: "#/definitions/ServiceSpec" 10850 - type: "object" 10851 example: 10852 Name: "top" 10853 TaskTemplate: 10854 ContainerSpec: 10855 Image: "busybox" 10856 Args: 10857 - "top" 10858 Resources: 10859 Limits: {} 10860 Reservations: {} 10861 RestartPolicy: 10862 Condition: "any" 10863 MaxAttempts: 0 10864 Placement: {} 10865 ForceUpdate: 0 10866 Mode: 10867 Replicated: 10868 Replicas: 1 10869 UpdateConfig: 10870 Parallelism: 2 10871 Delay: 1000000000 10872 FailureAction: "pause" 10873 Monitor: 15000000000 10874 MaxFailureRatio: 0.15 10875 RollbackConfig: 10876 Parallelism: 1 10877 Delay: 1000000000 10878 FailureAction: "pause" 10879 Monitor: 15000000000 10880 MaxFailureRatio: 0.15 10881 EndpointSpec: 10882 Mode: "vip" 10883 10884 - name: "version" 10885 in: "query" 10886 description: | 10887 The version number of the service object being updated. This is 10888 required to avoid conflicting writes. 10889 This version number should be the value as currently set on the 10890 service *before* the update. You can find the current version by 10891 calling `GET /services/{id}` 10892 required: true 10893 type: "integer" 10894 - name: "registryAuthFrom" 10895 in: "query" 10896 description: | 10897 If the `X-Registry-Auth` header is not specified, this parameter 10898 indicates where to find registry authorization credentials. 10899 type: "string" 10900 enum: ["spec", "previous-spec"] 10901 default: "spec" 10902 - name: "rollback" 10903 in: "query" 10904 description: | 10905 Set to this parameter to `previous` to cause a server-side rollback 10906 to the previous service spec. The supplied spec will be ignored in 10907 this case. 10908 type: "string" 10909 - name: "X-Registry-Auth" 10910 in: "header" 10911 description: | 10912 A base64url-encoded auth configuration for pulling from private 10913 registries. 10914 10915 Refer to the [authentication section](#section/Authentication) for 10916 details. 10917 type: "string" 10918 10919 tags: ["Service"] 10920 /services/{id}/logs: 10921 get: 10922 summary: "Get service logs" 10923 description: | 10924 Get `stdout` and `stderr` logs from a service. See also 10925 [`/containers/{id}/logs`](#operation/ContainerLogs). 10926 10927 **Note**: This endpoint works only for services with the `local`, 10928 `json-file` or `journald` logging drivers. 10929 operationId: "ServiceLogs" 10930 responses: 10931 200: 10932 description: "logs returned as a stream in response body" 10933 schema: 10934 type: "string" 10935 format: "binary" 10936 404: 10937 description: "no such service" 10938 schema: 10939 $ref: "#/definitions/ErrorResponse" 10940 examples: 10941 application/json: 10942 message: "No such service: c2ada9df5af8" 10943 500: 10944 description: "server error" 10945 schema: 10946 $ref: "#/definitions/ErrorResponse" 10947 503: 10948 description: "node is not part of a swarm" 10949 schema: 10950 $ref: "#/definitions/ErrorResponse" 10951 parameters: 10952 - name: "id" 10953 in: "path" 10954 required: true 10955 description: "ID or name of the service" 10956 type: "string" 10957 - name: "details" 10958 in: "query" 10959 description: "Show service context and extra details provided to logs." 10960 type: "boolean" 10961 default: false 10962 - name: "follow" 10963 in: "query" 10964 description: "Keep connection after returning logs." 10965 type: "boolean" 10966 default: false 10967 - name: "stdout" 10968 in: "query" 10969 description: "Return logs from `stdout`" 10970 type: "boolean" 10971 default: false 10972 - name: "stderr" 10973 in: "query" 10974 description: "Return logs from `stderr`" 10975 type: "boolean" 10976 default: false 10977 - name: "since" 10978 in: "query" 10979 description: "Only return logs since this time, as a UNIX timestamp" 10980 type: "integer" 10981 default: 0 10982 - name: "timestamps" 10983 in: "query" 10984 description: "Add timestamps to every log line" 10985 type: "boolean" 10986 default: false 10987 - name: "tail" 10988 in: "query" 10989 description: | 10990 Only return this number of log lines from the end of the logs. 10991 Specify as an integer or `all` to output all log lines. 10992 type: "string" 10993 default: "all" 10994 tags: ["Service"] 10995 /tasks: 10996 get: 10997 summary: "List tasks" 10998 operationId: "TaskList" 10999 produces: 11000 - "application/json" 11001 responses: 11002 200: 11003 description: "no error" 11004 schema: 11005 type: "array" 11006 items: 11007 $ref: "#/definitions/Task" 11008 example: 11009 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 11010 Version: 11011 Index: 71 11012 CreatedAt: "2016-06-07T21:07:31.171892745Z" 11013 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 11014 Spec: 11015 ContainerSpec: 11016 Image: "redis" 11017 Resources: 11018 Limits: {} 11019 Reservations: {} 11020 RestartPolicy: 11021 Condition: "any" 11022 MaxAttempts: 0 11023 Placement: {} 11024 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11025 Slot: 1 11026 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11027 Status: 11028 Timestamp: "2016-06-07T21:07:31.290032978Z" 11029 State: "running" 11030 Message: "started" 11031 ContainerStatus: 11032 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 11033 PID: 677 11034 DesiredState: "running" 11035 NetworksAttachments: 11036 - Network: 11037 ID: "4qvuz4ko70xaltuqbt8956gd1" 11038 Version: 11039 Index: 18 11040 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11041 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11042 Spec: 11043 Name: "ingress" 11044 Labels: 11045 com.docker.swarm.internal: "true" 11046 DriverConfiguration: {} 11047 IPAMOptions: 11048 Driver: {} 11049 Configs: 11050 - Subnet: "10.255.0.0/16" 11051 Gateway: "10.255.0.1" 11052 DriverState: 11053 Name: "overlay" 11054 Options: 11055 com.docker.network.driver.overlay.vxlanid_list: "256" 11056 IPAMOptions: 11057 Driver: 11058 Name: "default" 11059 Configs: 11060 - Subnet: "10.255.0.0/16" 11061 Gateway: "10.255.0.1" 11062 Addresses: 11063 - "10.255.0.10/16" 11064 - ID: "1yljwbmlr8er2waf8orvqpwms" 11065 Version: 11066 Index: 30 11067 CreatedAt: "2016-06-07T21:07:30.019104782Z" 11068 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 11069 Name: "hopeful_cori" 11070 Spec: 11071 ContainerSpec: 11072 Image: "redis" 11073 Resources: 11074 Limits: {} 11075 Reservations: {} 11076 RestartPolicy: 11077 Condition: "any" 11078 MaxAttempts: 0 11079 Placement: {} 11080 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11081 Slot: 1 11082 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11083 Status: 11084 Timestamp: "2016-06-07T21:07:30.202183143Z" 11085 State: "shutdown" 11086 Message: "shutdown" 11087 ContainerStatus: 11088 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 11089 DesiredState: "shutdown" 11090 NetworksAttachments: 11091 - Network: 11092 ID: "4qvuz4ko70xaltuqbt8956gd1" 11093 Version: 11094 Index: 18 11095 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11096 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11097 Spec: 11098 Name: "ingress" 11099 Labels: 11100 com.docker.swarm.internal: "true" 11101 DriverConfiguration: {} 11102 IPAMOptions: 11103 Driver: {} 11104 Configs: 11105 - Subnet: "10.255.0.0/16" 11106 Gateway: "10.255.0.1" 11107 DriverState: 11108 Name: "overlay" 11109 Options: 11110 com.docker.network.driver.overlay.vxlanid_list: "256" 11111 IPAMOptions: 11112 Driver: 11113 Name: "default" 11114 Configs: 11115 - Subnet: "10.255.0.0/16" 11116 Gateway: "10.255.0.1" 11117 Addresses: 11118 - "10.255.0.5/16" 11119 500: 11120 description: "server error" 11121 schema: 11122 $ref: "#/definitions/ErrorResponse" 11123 503: 11124 description: "node is not part of a swarm" 11125 schema: 11126 $ref: "#/definitions/ErrorResponse" 11127 parameters: 11128 - name: "filters" 11129 in: "query" 11130 type: "string" 11131 description: | 11132 A JSON encoded value of the filters (a `map[string][]string`) to 11133 process on the tasks list. 11134 11135 Available filters: 11136 11137 - `desired-state=(running | shutdown | accepted)` 11138 - `id=<task id>` 11139 - `label=key` or `label="key=value"` 11140 - `name=<task name>` 11141 - `node=<node id or name>` 11142 - `service=<service name>` 11143 tags: ["Task"] 11144 /tasks/{id}: 11145 get: 11146 summary: "Inspect a task" 11147 operationId: "TaskInspect" 11148 produces: 11149 - "application/json" 11150 responses: 11151 200: 11152 description: "no error" 11153 schema: 11154 $ref: "#/definitions/Task" 11155 404: 11156 description: "no such task" 11157 schema: 11158 $ref: "#/definitions/ErrorResponse" 11159 500: 11160 description: "server error" 11161 schema: 11162 $ref: "#/definitions/ErrorResponse" 11163 503: 11164 description: "node is not part of a swarm" 11165 schema: 11166 $ref: "#/definitions/ErrorResponse" 11167 parameters: 11168 - name: "id" 11169 in: "path" 11170 description: "ID of the task" 11171 required: true 11172 type: "string" 11173 tags: ["Task"] 11174 /tasks/{id}/logs: 11175 get: 11176 summary: "Get task logs" 11177 description: | 11178 Get `stdout` and `stderr` logs from a task. 11179 See also [`/containers/{id}/logs`](#operation/ContainerLogs). 11180 11181 **Note**: This endpoint works only for services with the `local`, 11182 `json-file` or `journald` logging drivers. 11183 operationId: "TaskLogs" 11184 responses: 11185 200: 11186 description: "logs returned as a stream in response body" 11187 schema: 11188 type: "string" 11189 format: "binary" 11190 404: 11191 description: "no such task" 11192 schema: 11193 $ref: "#/definitions/ErrorResponse" 11194 examples: 11195 application/json: 11196 message: "No such task: c2ada9df5af8" 11197 500: 11198 description: "server error" 11199 schema: 11200 $ref: "#/definitions/ErrorResponse" 11201 503: 11202 description: "node is not part of a swarm" 11203 schema: 11204 $ref: "#/definitions/ErrorResponse" 11205 parameters: 11206 - name: "id" 11207 in: "path" 11208 required: true 11209 description: "ID of the task" 11210 type: "string" 11211 - name: "details" 11212 in: "query" 11213 description: "Show task context and extra details provided to logs." 11214 type: "boolean" 11215 default: false 11216 - name: "follow" 11217 in: "query" 11218 description: "Keep connection after returning logs." 11219 type: "boolean" 11220 default: false 11221 - name: "stdout" 11222 in: "query" 11223 description: "Return logs from `stdout`" 11224 type: "boolean" 11225 default: false 11226 - name: "stderr" 11227 in: "query" 11228 description: "Return logs from `stderr`" 11229 type: "boolean" 11230 default: false 11231 - name: "since" 11232 in: "query" 11233 description: "Only return logs since this time, as a UNIX timestamp" 11234 type: "integer" 11235 default: 0 11236 - name: "timestamps" 11237 in: "query" 11238 description: "Add timestamps to every log line" 11239 type: "boolean" 11240 default: false 11241 - name: "tail" 11242 in: "query" 11243 description: | 11244 Only return this number of log lines from the end of the logs. 11245 Specify as an integer or `all` to output all log lines. 11246 type: "string" 11247 default: "all" 11248 tags: ["Task"] 11249 /secrets: 11250 get: 11251 summary: "List secrets" 11252 operationId: "SecretList" 11253 produces: 11254 - "application/json" 11255 responses: 11256 200: 11257 description: "no error" 11258 schema: 11259 type: "array" 11260 items: 11261 $ref: "#/definitions/Secret" 11262 example: 11263 - ID: "blt1owaxmitz71s9v5zh81zun" 11264 Version: 11265 Index: 85 11266 CreatedAt: "2017-07-20T13:55:28.678958722Z" 11267 UpdatedAt: "2017-07-20T13:55:28.678958722Z" 11268 Spec: 11269 Name: "mysql-passwd" 11270 Labels: 11271 some.label: "some.value" 11272 Driver: 11273 Name: "secret-bucket" 11274 Options: 11275 OptionA: "value for driver option A" 11276 OptionB: "value for driver option B" 11277 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 11278 Version: 11279 Index: 11 11280 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11281 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11282 Spec: 11283 Name: "app-dev.crt" 11284 Labels: 11285 foo: "bar" 11286 500: 11287 description: "server error" 11288 schema: 11289 $ref: "#/definitions/ErrorResponse" 11290 503: 11291 description: "node is not part of a swarm" 11292 schema: 11293 $ref: "#/definitions/ErrorResponse" 11294 parameters: 11295 - name: "filters" 11296 in: "query" 11297 type: "string" 11298 description: | 11299 A JSON encoded value of the filters (a `map[string][]string`) to 11300 process on the secrets list. 11301 11302 Available filters: 11303 11304 - `id=<secret id>` 11305 - `label=<key> or label=<key>=value` 11306 - `name=<secret name>` 11307 - `names=<secret name>` 11308 tags: ["Secret"] 11309 /secrets/create: 11310 post: 11311 summary: "Create a secret" 11312 operationId: "SecretCreate" 11313 consumes: 11314 - "application/json" 11315 produces: 11316 - "application/json" 11317 responses: 11318 201: 11319 description: "no error" 11320 schema: 11321 $ref: "#/definitions/IdResponse" 11322 409: 11323 description: "name conflicts with an existing object" 11324 schema: 11325 $ref: "#/definitions/ErrorResponse" 11326 500: 11327 description: "server error" 11328 schema: 11329 $ref: "#/definitions/ErrorResponse" 11330 503: 11331 description: "node is not part of a swarm" 11332 schema: 11333 $ref: "#/definitions/ErrorResponse" 11334 parameters: 11335 - name: "body" 11336 in: "body" 11337 schema: 11338 allOf: 11339 - $ref: "#/definitions/SecretSpec" 11340 - type: "object" 11341 example: 11342 Name: "app-key.crt" 11343 Labels: 11344 foo: "bar" 11345 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11346 Driver: 11347 Name: "secret-bucket" 11348 Options: 11349 OptionA: "value for driver option A" 11350 OptionB: "value for driver option B" 11351 tags: ["Secret"] 11352 /secrets/{id}: 11353 get: 11354 summary: "Inspect a secret" 11355 operationId: "SecretInspect" 11356 produces: 11357 - "application/json" 11358 responses: 11359 200: 11360 description: "no error" 11361 schema: 11362 $ref: "#/definitions/Secret" 11363 examples: 11364 application/json: 11365 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11366 Version: 11367 Index: 11 11368 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11369 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11370 Spec: 11371 Name: "app-dev.crt" 11372 Labels: 11373 foo: "bar" 11374 Driver: 11375 Name: "secret-bucket" 11376 Options: 11377 OptionA: "value for driver option A" 11378 OptionB: "value for driver option B" 11379 11380 404: 11381 description: "secret not found" 11382 schema: 11383 $ref: "#/definitions/ErrorResponse" 11384 500: 11385 description: "server error" 11386 schema: 11387 $ref: "#/definitions/ErrorResponse" 11388 503: 11389 description: "node is not part of a swarm" 11390 schema: 11391 $ref: "#/definitions/ErrorResponse" 11392 parameters: 11393 - name: "id" 11394 in: "path" 11395 required: true 11396 type: "string" 11397 description: "ID of the secret" 11398 tags: ["Secret"] 11399 delete: 11400 summary: "Delete a secret" 11401 operationId: "SecretDelete" 11402 produces: 11403 - "application/json" 11404 responses: 11405 204: 11406 description: "no error" 11407 404: 11408 description: "secret not found" 11409 schema: 11410 $ref: "#/definitions/ErrorResponse" 11411 500: 11412 description: "server error" 11413 schema: 11414 $ref: "#/definitions/ErrorResponse" 11415 503: 11416 description: "node is not part of a swarm" 11417 schema: 11418 $ref: "#/definitions/ErrorResponse" 11419 parameters: 11420 - name: "id" 11421 in: "path" 11422 required: true 11423 type: "string" 11424 description: "ID of the secret" 11425 tags: ["Secret"] 11426 /secrets/{id}/update: 11427 post: 11428 summary: "Update a Secret" 11429 operationId: "SecretUpdate" 11430 responses: 11431 200: 11432 description: "no error" 11433 400: 11434 description: "bad parameter" 11435 schema: 11436 $ref: "#/definitions/ErrorResponse" 11437 404: 11438 description: "no such secret" 11439 schema: 11440 $ref: "#/definitions/ErrorResponse" 11441 500: 11442 description: "server error" 11443 schema: 11444 $ref: "#/definitions/ErrorResponse" 11445 503: 11446 description: "node is not part of a swarm" 11447 schema: 11448 $ref: "#/definitions/ErrorResponse" 11449 parameters: 11450 - name: "id" 11451 in: "path" 11452 description: "The ID or name of the secret" 11453 type: "string" 11454 required: true 11455 - name: "body" 11456 in: "body" 11457 schema: 11458 $ref: "#/definitions/SecretSpec" 11459 description: | 11460 The spec of the secret to update. Currently, only the Labels field 11461 can be updated. All other fields must remain unchanged from the 11462 [SecretInspect endpoint](#operation/SecretInspect) response values. 11463 - name: "version" 11464 in: "query" 11465 description: | 11466 The version number of the secret object being updated. This is 11467 required to avoid conflicting writes. 11468 type: "integer" 11469 format: "int64" 11470 required: true 11471 tags: ["Secret"] 11472 /configs: 11473 get: 11474 summary: "List configs" 11475 operationId: "ConfigList" 11476 produces: 11477 - "application/json" 11478 responses: 11479 200: 11480 description: "no error" 11481 schema: 11482 type: "array" 11483 items: 11484 $ref: "#/definitions/Config" 11485 example: 11486 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 11487 Version: 11488 Index: 11 11489 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11490 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11491 Spec: 11492 Name: "server.conf" 11493 500: 11494 description: "server error" 11495 schema: 11496 $ref: "#/definitions/ErrorResponse" 11497 503: 11498 description: "node is not part of a swarm" 11499 schema: 11500 $ref: "#/definitions/ErrorResponse" 11501 parameters: 11502 - name: "filters" 11503 in: "query" 11504 type: "string" 11505 description: | 11506 A JSON encoded value of the filters (a `map[string][]string`) to 11507 process on the configs list. 11508 11509 Available filters: 11510 11511 - `id=<config id>` 11512 - `label=<key> or label=<key>=value` 11513 - `name=<config name>` 11514 - `names=<config name>` 11515 tags: ["Config"] 11516 /configs/create: 11517 post: 11518 summary: "Create a config" 11519 operationId: "ConfigCreate" 11520 consumes: 11521 - "application/json" 11522 produces: 11523 - "application/json" 11524 responses: 11525 201: 11526 description: "no error" 11527 schema: 11528 $ref: "#/definitions/IdResponse" 11529 409: 11530 description: "name conflicts with an existing object" 11531 schema: 11532 $ref: "#/definitions/ErrorResponse" 11533 500: 11534 description: "server error" 11535 schema: 11536 $ref: "#/definitions/ErrorResponse" 11537 503: 11538 description: "node is not part of a swarm" 11539 schema: 11540 $ref: "#/definitions/ErrorResponse" 11541 parameters: 11542 - name: "body" 11543 in: "body" 11544 schema: 11545 allOf: 11546 - $ref: "#/definitions/ConfigSpec" 11547 - type: "object" 11548 example: 11549 Name: "server.conf" 11550 Labels: 11551 foo: "bar" 11552 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11553 tags: ["Config"] 11554 /configs/{id}: 11555 get: 11556 summary: "Inspect a config" 11557 operationId: "ConfigInspect" 11558 produces: 11559 - "application/json" 11560 responses: 11561 200: 11562 description: "no error" 11563 schema: 11564 $ref: "#/definitions/Config" 11565 examples: 11566 application/json: 11567 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11568 Version: 11569 Index: 11 11570 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11571 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11572 Spec: 11573 Name: "app-dev.crt" 11574 404: 11575 description: "config not found" 11576 schema: 11577 $ref: "#/definitions/ErrorResponse" 11578 500: 11579 description: "server error" 11580 schema: 11581 $ref: "#/definitions/ErrorResponse" 11582 503: 11583 description: "node is not part of a swarm" 11584 schema: 11585 $ref: "#/definitions/ErrorResponse" 11586 parameters: 11587 - name: "id" 11588 in: "path" 11589 required: true 11590 type: "string" 11591 description: "ID of the config" 11592 tags: ["Config"] 11593 delete: 11594 summary: "Delete a config" 11595 operationId: "ConfigDelete" 11596 produces: 11597 - "application/json" 11598 responses: 11599 204: 11600 description: "no error" 11601 404: 11602 description: "config not found" 11603 schema: 11604 $ref: "#/definitions/ErrorResponse" 11605 500: 11606 description: "server error" 11607 schema: 11608 $ref: "#/definitions/ErrorResponse" 11609 503: 11610 description: "node is not part of a swarm" 11611 schema: 11612 $ref: "#/definitions/ErrorResponse" 11613 parameters: 11614 - name: "id" 11615 in: "path" 11616 required: true 11617 type: "string" 11618 description: "ID of the config" 11619 tags: ["Config"] 11620 /configs/{id}/update: 11621 post: 11622 summary: "Update a Config" 11623 operationId: "ConfigUpdate" 11624 responses: 11625 200: 11626 description: "no error" 11627 400: 11628 description: "bad parameter" 11629 schema: 11630 $ref: "#/definitions/ErrorResponse" 11631 404: 11632 description: "no such config" 11633 schema: 11634 $ref: "#/definitions/ErrorResponse" 11635 500: 11636 description: "server error" 11637 schema: 11638 $ref: "#/definitions/ErrorResponse" 11639 503: 11640 description: "node is not part of a swarm" 11641 schema: 11642 $ref: "#/definitions/ErrorResponse" 11643 parameters: 11644 - name: "id" 11645 in: "path" 11646 description: "The ID or name of the config" 11647 type: "string" 11648 required: true 11649 - name: "body" 11650 in: "body" 11651 schema: 11652 $ref: "#/definitions/ConfigSpec" 11653 description: | 11654 The spec of the config to update. Currently, only the Labels field 11655 can be updated. All other fields must remain unchanged from the 11656 [ConfigInspect endpoint](#operation/ConfigInspect) response values. 11657 - name: "version" 11658 in: "query" 11659 description: | 11660 The version number of the config object being updated. This is 11661 required to avoid conflicting writes. 11662 type: "integer" 11663 format: "int64" 11664 required: true 11665 tags: ["Config"] 11666 /distribution/{name}/json: 11667 get: 11668 summary: "Get image information from the registry" 11669 description: | 11670 Return image digest and platform information by contacting the registry. 11671 operationId: "DistributionInspect" 11672 produces: 11673 - "application/json" 11674 responses: 11675 200: 11676 description: "descriptor and platform information" 11677 schema: 11678 $ref: "#/definitions/DistributionInspect" 11679 401: 11680 description: "Failed authentication or no image found" 11681 schema: 11682 $ref: "#/definitions/ErrorResponse" 11683 examples: 11684 application/json: 11685 message: "No such image: someimage (tag: latest)" 11686 500: 11687 description: "Server error" 11688 schema: 11689 $ref: "#/definitions/ErrorResponse" 11690 parameters: 11691 - name: "name" 11692 in: "path" 11693 description: "Image name or id" 11694 type: "string" 11695 required: true 11696 tags: ["Distribution"] 11697 /session: 11698 post: 11699 summary: "Initialize interactive session" 11700 description: | 11701 Start a new interactive session with a server. Session allows server to 11702 call back to the client for advanced capabilities. 11703 11704 ### Hijacking 11705 11706 This endpoint hijacks the HTTP connection to HTTP2 transport that allows 11707 the client to expose gPRC services on that connection. 11708 11709 For example, the client sends this request to upgrade the connection: 11710 11711 ``` 11712 POST /session HTTP/1.1 11713 Upgrade: h2c 11714 Connection: Upgrade 11715 ``` 11716 11717 The Docker daemon responds with a `101 UPGRADED` response follow with 11718 the raw stream: 11719 11720 ``` 11721 HTTP/1.1 101 UPGRADED 11722 Connection: Upgrade 11723 Upgrade: h2c 11724 ``` 11725 operationId: "Session" 11726 produces: 11727 - "application/vnd.docker.raw-stream" 11728 responses: 11729 101: 11730 description: "no error, hijacking successful" 11731 400: 11732 description: "bad parameter" 11733 schema: 11734 $ref: "#/definitions/ErrorResponse" 11735 500: 11736 description: "server error" 11737 schema: 11738 $ref: "#/definitions/ErrorResponse" 11739 tags: ["Session"]