github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/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://go.dev/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://go.dev/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 type: "string" 5104 example: "20.10.25" 5105 ClusterStore: 5106 description: | 5107 URL of the distributed storage backend. 5108 5109 5110 The storage backend is used for multihost networking (to store 5111 network and endpoint information) and by the node discovery mechanism. 5112 5113 <p><br /></p> 5114 5115 > **Deprecated**: This field is only propagated when using standalone Swarm 5116 > mode, and overlay networking using an external k/v store. Overlay 5117 > networks with Swarm mode enabled use the built-in raft store, and 5118 > this field will be empty. 5119 type: "string" 5120 example: "consul://consul.corp.example.com:8600/some/path" 5121 ClusterAdvertise: 5122 description: | 5123 The network endpoint that the Engine advertises for the purpose of 5124 node discovery. ClusterAdvertise is a `host:port` combination on which 5125 the daemon is reachable by other hosts. 5126 5127 <p><br /></p> 5128 5129 > **Deprecated**: This field is only propagated when using standalone Swarm 5130 > mode, and overlay networking using an external k/v store. Overlay 5131 > networks with Swarm mode enabled use the built-in raft store, and 5132 > this field will be empty. 5133 type: "string" 5134 example: "node5.corp.example.com:8000" 5135 Runtimes: 5136 description: | 5137 List of [OCI compliant](https://github.com/opencontainers/runtime-spec) 5138 runtimes configured on the daemon. Keys hold the "name" used to 5139 reference the runtime. 5140 5141 The Docker daemon relies on an OCI compliant runtime (invoked via the 5142 `containerd` daemon) as its interface to the Linux kernel namespaces, 5143 cgroups, and SELinux. 5144 5145 The default runtime is `runc`, and automatically configured. Additional 5146 runtimes can be configured by the user and will be listed here. 5147 type: "object" 5148 additionalProperties: 5149 $ref: "#/definitions/Runtime" 5150 default: 5151 runc: 5152 path: "runc" 5153 example: 5154 runc: 5155 path: "runc" 5156 runc-master: 5157 path: "/go/bin/runc" 5158 custom: 5159 path: "/usr/local/bin/my-oci-runtime" 5160 runtimeArgs: ["--debug", "--systemd-cgroup=false"] 5161 DefaultRuntime: 5162 description: | 5163 Name of the default OCI runtime that is used when starting containers. 5164 5165 The default can be overridden per-container at create time. 5166 type: "string" 5167 default: "runc" 5168 example: "runc" 5169 Swarm: 5170 $ref: "#/definitions/SwarmInfo" 5171 LiveRestoreEnabled: 5172 description: | 5173 Indicates if live restore is enabled. 5174 5175 If enabled, containers are kept running when the daemon is shutdown 5176 or upon daemon start if running containers are detected. 5177 type: "boolean" 5178 default: false 5179 example: false 5180 Isolation: 5181 description: | 5182 Represents the isolation technology to use as a default for containers. 5183 The supported values are platform-specific. 5184 5185 If no isolation value is specified on daemon start, on Windows client, 5186 the default is `hyperv`, and on Windows server, the default is `process`. 5187 5188 This option is currently not used on other platforms. 5189 default: "default" 5190 type: "string" 5191 enum: 5192 - "default" 5193 - "hyperv" 5194 - "process" 5195 InitBinary: 5196 description: | 5197 Name and, optional, path of the `docker-init` binary. 5198 5199 If the path is omitted, the daemon searches the host's `$PATH` for the 5200 binary and uses the first result. 5201 type: "string" 5202 example: "docker-init" 5203 ContainerdCommit: 5204 $ref: "#/definitions/Commit" 5205 RuncCommit: 5206 $ref: "#/definitions/Commit" 5207 InitCommit: 5208 $ref: "#/definitions/Commit" 5209 SecurityOptions: 5210 description: | 5211 List of security features that are enabled on the daemon, such as 5212 apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. 5213 5214 Additional configuration options for each security feature may 5215 be present, and are included as a comma-separated list of key/value 5216 pairs. 5217 type: "array" 5218 items: 5219 type: "string" 5220 example: 5221 - "name=apparmor" 5222 - "name=seccomp,profile=default" 5223 - "name=selinux" 5224 - "name=userns" 5225 - "name=rootless" 5226 ProductLicense: 5227 description: | 5228 Reports a summary of the product license on the daemon. 5229 5230 If a commercial license has been applied to the daemon, information 5231 such as number of nodes, and expiration are included. 5232 type: "string" 5233 example: "Community Engine" 5234 DefaultAddressPools: 5235 description: | 5236 List of custom default address pools for local networks, which can be 5237 specified in the daemon.json file or dockerd option. 5238 5239 Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 5240 10.10.[0-255].0/24 address pools. 5241 type: "array" 5242 items: 5243 type: "object" 5244 properties: 5245 Base: 5246 description: "The network address in CIDR format" 5247 type: "string" 5248 example: "10.10.0.0/16" 5249 Size: 5250 description: "The network pool size" 5251 type: "integer" 5252 example: "24" 5253 Warnings: 5254 description: | 5255 List of warnings / informational messages about missing features, or 5256 issues related to the daemon configuration. 5257 5258 These messages can be printed by the client as information to the user. 5259 type: "array" 5260 items: 5261 type: "string" 5262 example: 5263 - "WARNING: No memory limit support" 5264 - "WARNING: bridge-nf-call-iptables is disabled" 5265 - "WARNING: bridge-nf-call-ip6tables is disabled" 5266 5267 5268 # PluginsInfo is a temp struct holding Plugins name 5269 # registered with docker daemon. It is used by Info struct 5270 PluginsInfo: 5271 description: | 5272 Available plugins per type. 5273 5274 <p><br /></p> 5275 5276 > **Note**: Only unmanaged (V1) plugins are included in this list. 5277 > V1 plugins are "lazily" loaded, and are not returned in this list 5278 > if there is no resource using the plugin. 5279 type: "object" 5280 properties: 5281 Volume: 5282 description: "Names of available volume-drivers, and network-driver plugins." 5283 type: "array" 5284 items: 5285 type: "string" 5286 example: ["local"] 5287 Network: 5288 description: "Names of available network-drivers, and network-driver plugins." 5289 type: "array" 5290 items: 5291 type: "string" 5292 example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] 5293 Authorization: 5294 description: "Names of available authorization plugins." 5295 type: "array" 5296 items: 5297 type: "string" 5298 example: ["img-authz-plugin", "hbm"] 5299 Log: 5300 description: "Names of available logging-drivers, and logging-driver plugins." 5301 type: "array" 5302 items: 5303 type: "string" 5304 example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] 5305 5306 5307 RegistryServiceConfig: 5308 description: | 5309 RegistryServiceConfig stores daemon registry services configuration. 5310 type: "object" 5311 x-nullable: true 5312 properties: 5313 AllowNondistributableArtifactsCIDRs: 5314 description: | 5315 List of IP ranges to which nondistributable artifacts can be pushed, 5316 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). 5317 5318 Some images (for example, Windows base images) contain artifacts 5319 whose distribution is restricted by license. When these images are 5320 pushed to a registry, restricted artifacts are not included. 5321 5322 This configuration override this behavior, and enables the daemon to 5323 push nondistributable artifacts to all registries whose resolved IP 5324 address is within the subnet described by the CIDR syntax. 5325 5326 This option is useful when pushing images containing 5327 nondistributable artifacts to a registry on an air-gapped network so 5328 hosts on that network can pull the images without connecting to 5329 another server. 5330 5331 > **Warning**: Nondistributable artifacts typically have restrictions 5332 > on how and where they can be distributed and shared. Only use this 5333 > feature to push artifacts to private registries and ensure that you 5334 > are in compliance with any terms that cover redistributing 5335 > nondistributable artifacts. 5336 5337 type: "array" 5338 items: 5339 type: "string" 5340 example: ["::1/128", "127.0.0.0/8"] 5341 AllowNondistributableArtifactsHostnames: 5342 description: | 5343 List of registry hostnames to which nondistributable artifacts can be 5344 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. 5345 5346 Some images (for example, Windows base images) contain artifacts 5347 whose distribution is restricted by license. When these images are 5348 pushed to a registry, restricted artifacts are not included. 5349 5350 This configuration override this behavior for the specified 5351 registries. 5352 5353 This option is useful when pushing images containing 5354 nondistributable artifacts to a registry on an air-gapped network so 5355 hosts on that network can pull the images without connecting to 5356 another server. 5357 5358 > **Warning**: Nondistributable artifacts typically have restrictions 5359 > on how and where they can be distributed and shared. Only use this 5360 > feature to push artifacts to private registries and ensure that you 5361 > are in compliance with any terms that cover redistributing 5362 > nondistributable artifacts. 5363 type: "array" 5364 items: 5365 type: "string" 5366 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] 5367 InsecureRegistryCIDRs: 5368 description: | 5369 List of IP ranges of insecure registries, using the CIDR syntax 5370 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries 5371 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates 5372 from unknown CAs) communication. 5373 5374 By default, local registries (`127.0.0.0/8`) are configured as 5375 insecure. All other registries are secure. Communicating with an 5376 insecure registry is not possible if the daemon assumes that registry 5377 is secure. 5378 5379 This configuration override this behavior, insecure communication with 5380 registries whose resolved IP address is within the subnet described by 5381 the CIDR syntax. 5382 5383 Registries can also be marked insecure by hostname. Those registries 5384 are listed under `IndexConfigs` and have their `Secure` field set to 5385 `false`. 5386 5387 > **Warning**: Using this option can be useful when running a local 5388 > registry, but introduces security vulnerabilities. This option 5389 > should therefore ONLY be used for testing purposes. For increased 5390 > security, users should add their CA to their system's list of trusted 5391 > CAs instead of enabling this option. 5392 type: "array" 5393 items: 5394 type: "string" 5395 example: ["::1/128", "127.0.0.0/8"] 5396 IndexConfigs: 5397 type: "object" 5398 additionalProperties: 5399 $ref: "#/definitions/IndexInfo" 5400 example: 5401 "127.0.0.1:5000": 5402 "Name": "127.0.0.1:5000" 5403 "Mirrors": [] 5404 "Secure": false 5405 "Official": false 5406 "[2001:db8:a0b:12f0::1]:80": 5407 "Name": "[2001:db8:a0b:12f0::1]:80" 5408 "Mirrors": [] 5409 "Secure": false 5410 "Official": false 5411 "docker.io": 5412 Name: "docker.io" 5413 Mirrors: ["https://hub-mirror.corp.example.com:5000/"] 5414 Secure: true 5415 Official: true 5416 "registry.internal.corp.example.com:3000": 5417 Name: "registry.internal.corp.example.com:3000" 5418 Mirrors: [] 5419 Secure: false 5420 Official: false 5421 Mirrors: 5422 description: | 5423 List of registry URLs that act as a mirror for the official 5424 (`docker.io`) registry. 5425 5426 type: "array" 5427 items: 5428 type: "string" 5429 example: 5430 - "https://hub-mirror.corp.example.com:5000/" 5431 - "https://[2001:db8:a0b:12f0::1]/" 5432 5433 IndexInfo: 5434 description: 5435 IndexInfo contains information about a registry. 5436 type: "object" 5437 x-nullable: true 5438 properties: 5439 Name: 5440 description: | 5441 Name of the registry, such as "docker.io". 5442 type: "string" 5443 example: "docker.io" 5444 Mirrors: 5445 description: | 5446 List of mirrors, expressed as URIs. 5447 type: "array" 5448 items: 5449 type: "string" 5450 example: 5451 - "https://hub-mirror.corp.example.com:5000/" 5452 - "https://registry-2.docker.io/" 5453 - "https://registry-3.docker.io/" 5454 Secure: 5455 description: | 5456 Indicates if the registry is part of the list of insecure 5457 registries. 5458 5459 If `false`, the registry is insecure. Insecure registries accept 5460 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from 5461 unknown CAs) communication. 5462 5463 > **Warning**: Insecure registries can be useful when running a local 5464 > registry. However, because its use creates security vulnerabilities 5465 > it should ONLY be enabled for testing purposes. For increased 5466 > security, users should add their CA to their system's list of 5467 > trusted CAs instead of enabling this option. 5468 type: "boolean" 5469 example: true 5470 Official: 5471 description: | 5472 Indicates whether this is an official registry (i.e., Docker Hub / docker.io) 5473 type: "boolean" 5474 example: true 5475 5476 Runtime: 5477 description: | 5478 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) 5479 runtime. 5480 5481 The runtime is invoked by the daemon via the `containerd` daemon. OCI 5482 runtimes act as an interface to the Linux kernel namespaces, cgroups, 5483 and SELinux. 5484 type: "object" 5485 properties: 5486 path: 5487 description: | 5488 Name and, optional, path, of the OCI executable binary. 5489 5490 If the path is omitted, the daemon searches the host's `$PATH` for the 5491 binary and uses the first result. 5492 type: "string" 5493 example: "/usr/local/bin/my-oci-runtime" 5494 runtimeArgs: 5495 description: | 5496 List of command-line arguments to pass to the runtime when invoked. 5497 type: "array" 5498 x-nullable: true 5499 items: 5500 type: "string" 5501 example: ["--debug", "--systemd-cgroup=false"] 5502 5503 Commit: 5504 description: | 5505 Commit holds the Git-commit (SHA1) that a binary was built from, as 5506 reported in the version-string of external tools, such as `containerd`, 5507 or `runC`. 5508 type: "object" 5509 properties: 5510 ID: 5511 description: "Actual commit ID of external tool." 5512 type: "string" 5513 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" 5514 Expected: 5515 description: | 5516 Commit ID of external tool expected by dockerd as set at build time. 5517 type: "string" 5518 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" 5519 5520 SwarmInfo: 5521 description: | 5522 Represents generic information about swarm. 5523 type: "object" 5524 properties: 5525 NodeID: 5526 description: "Unique identifier of for this node in the swarm." 5527 type: "string" 5528 default: "" 5529 example: "k67qz4598weg5unwwffg6z1m1" 5530 NodeAddr: 5531 description: | 5532 IP address at which this node can be reached by other nodes in the 5533 swarm. 5534 type: "string" 5535 default: "" 5536 example: "10.0.0.46" 5537 LocalNodeState: 5538 $ref: "#/definitions/LocalNodeState" 5539 ControlAvailable: 5540 type: "boolean" 5541 default: false 5542 example: true 5543 Error: 5544 type: "string" 5545 default: "" 5546 RemoteManagers: 5547 description: | 5548 List of ID's and addresses of other managers in the swarm. 5549 type: "array" 5550 default: null 5551 x-nullable: true 5552 items: 5553 $ref: "#/definitions/PeerNode" 5554 example: 5555 - NodeID: "71izy0goik036k48jg985xnds" 5556 Addr: "10.0.0.158:2377" 5557 - NodeID: "79y6h1o4gv8n120drcprv5nmc" 5558 Addr: "10.0.0.159:2377" 5559 - NodeID: "k67qz4598weg5unwwffg6z1m1" 5560 Addr: "10.0.0.46:2377" 5561 Nodes: 5562 description: "Total number of nodes in the swarm." 5563 type: "integer" 5564 x-nullable: true 5565 example: 4 5566 Managers: 5567 description: "Total number of managers in the swarm." 5568 type: "integer" 5569 x-nullable: true 5570 example: 3 5571 Cluster: 5572 $ref: "#/definitions/ClusterInfo" 5573 5574 LocalNodeState: 5575 description: "Current local status of this node." 5576 type: "string" 5577 default: "" 5578 enum: 5579 - "" 5580 - "inactive" 5581 - "pending" 5582 - "active" 5583 - "error" 5584 - "locked" 5585 example: "active" 5586 5587 PeerNode: 5588 description: "Represents a peer-node in the swarm" 5589 type: "object" 5590 properties: 5591 NodeID: 5592 description: "Unique identifier of for this node in the swarm." 5593 type: "string" 5594 Addr: 5595 description: | 5596 IP address and ports at which this node can be reached. 5597 type: "string" 5598 5599 NetworkAttachmentConfig: 5600 description: | 5601 Specifies how a service should be attached to a particular network. 5602 type: "object" 5603 properties: 5604 Target: 5605 description: | 5606 The target network for attachment. Must be a network name or ID. 5607 type: "string" 5608 Aliases: 5609 description: | 5610 Discoverable alternate names for the service on this network. 5611 type: "array" 5612 items: 5613 type: "string" 5614 DriverOpts: 5615 description: | 5616 Driver attachment options for the network target. 5617 type: "object" 5618 additionalProperties: 5619 type: "string" 5620 5621 EventActor: 5622 description: | 5623 Actor describes something that generates events, like a container, network, 5624 or a volume. 5625 type: "object" 5626 properties: 5627 ID: 5628 description: "The ID of the object emitting the event" 5629 type: "string" 5630 example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 5631 Attributes: 5632 description: | 5633 Various key/value attributes of the object, depending on its type. 5634 type: "object" 5635 additionalProperties: 5636 type: "string" 5637 example: 5638 com.example.some-label: "some-label-value" 5639 image: "alpine:latest" 5640 name: "my-container" 5641 5642 EventMessage: 5643 description: | 5644 EventMessage represents the information an event contains. 5645 type: "object" 5646 title: "SystemEventsResponse" 5647 properties: 5648 Type: 5649 description: "The type of object emitting the event" 5650 type: "string" 5651 enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] 5652 example: "container" 5653 Action: 5654 description: "The type of event" 5655 type: "string" 5656 example: "create" 5657 Actor: 5658 $ref: "#/definitions/EventActor" 5659 scope: 5660 description: | 5661 Scope of the event. Engine events are `local` scope. Cluster (Swarm) 5662 events are `swarm` scope. 5663 type: "string" 5664 enum: ["local", "swarm"] 5665 time: 5666 description: "Timestamp of event" 5667 type: "integer" 5668 format: "int64" 5669 example: 1629574695 5670 timeNano: 5671 description: "Timestamp of event, with nanosecond accuracy" 5672 type: "integer" 5673 format: "int64" 5674 example: 1629574695515050031 5675 5676 OCIDescriptor: 5677 type: "object" 5678 x-go-name: Descriptor 5679 description: | 5680 A descriptor struct containing digest, media type, and size, as defined in 5681 the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). 5682 properties: 5683 mediaType: 5684 description: | 5685 The media type of the object this schema refers to. 5686 type: "string" 5687 example: "application/vnd.docker.distribution.manifest.v2+json" 5688 digest: 5689 description: | 5690 The digest of the targeted content. 5691 type: "string" 5692 example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" 5693 size: 5694 description: | 5695 The size in bytes of the blob. 5696 type: "integer" 5697 format: "int64" 5698 example: 3987495 5699 # TODO Not yet including these fields for now, as they are nil / omitted in our response. 5700 # urls: 5701 # description: | 5702 # List of URLs from which this object MAY be downloaded. 5703 # type: "array" 5704 # items: 5705 # type: "string" 5706 # format: "uri" 5707 # annotations: 5708 # description: | 5709 # Arbitrary metadata relating to the targeted content. 5710 # type: "object" 5711 # additionalProperties: 5712 # type: "string" 5713 # platform: 5714 # $ref: "#/definitions/OCIPlatform" 5715 5716 OCIPlatform: 5717 type: "object" 5718 x-go-name: Platform 5719 description: | 5720 Describes the platform which the image in the manifest runs on, as defined 5721 in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). 5722 properties: 5723 architecture: 5724 description: | 5725 The CPU architecture, for example `amd64` or `ppc64`. 5726 type: "string" 5727 example: "arm" 5728 os: 5729 description: | 5730 The operating system, for example `linux` or `windows`. 5731 type: "string" 5732 example: "windows" 5733 os.version: 5734 description: | 5735 Optional field specifying the operating system version, for example on 5736 Windows `10.0.19041.1165`. 5737 type: "string" 5738 example: "10.0.19041.1165" 5739 os.features: 5740 description: | 5741 Optional field specifying an array of strings, each listing a required 5742 OS feature (for example on Windows `win32k`). 5743 type: "array" 5744 items: 5745 type: "string" 5746 example: 5747 - "win32k" 5748 variant: 5749 description: | 5750 Optional field specifying a variant of the CPU, for example `v7` to 5751 specify ARMv7 when architecture is `arm`. 5752 type: "string" 5753 example: "v7" 5754 5755 DistributionInspect: 5756 type: "object" 5757 x-go-name: DistributionInspect 5758 title: "DistributionInspectResponse" 5759 required: [Descriptor, Platforms] 5760 description: | 5761 Describes the result obtained from contacting the registry to retrieve 5762 image metadata. 5763 properties: 5764 Descriptor: 5765 $ref: "#/definitions/OCIDescriptor" 5766 Platforms: 5767 type: "array" 5768 description: | 5769 An array containing all platforms supported by the image. 5770 items: 5771 $ref: "#/definitions/OCIPlatform" 5772 5773 paths: 5774 /containers/json: 5775 get: 5776 summary: "List containers" 5777 description: | 5778 Returns a list of containers. For details on the format, see the 5779 [inspect endpoint](#operation/ContainerInspect). 5780 5781 Note that it uses a different, smaller representation of a container 5782 than inspecting a single container. For example, the list of linked 5783 containers is not propagated . 5784 operationId: "ContainerList" 5785 produces: 5786 - "application/json" 5787 parameters: 5788 - name: "all" 5789 in: "query" 5790 description: | 5791 Return all containers. By default, only running containers are shown. 5792 type: "boolean" 5793 default: false 5794 - name: "limit" 5795 in: "query" 5796 description: | 5797 Return this number of most recently created containers, including 5798 non-running ones. 5799 type: "integer" 5800 - name: "size" 5801 in: "query" 5802 description: | 5803 Return the size of container as fields `SizeRw` and `SizeRootFs`. 5804 type: "boolean" 5805 default: false 5806 - name: "filters" 5807 in: "query" 5808 description: | 5809 Filters to process on the container list, encoded as JSON (a 5810 `map[string][]string`). For example, `{"status": ["paused"]}` will 5811 only return paused containers. 5812 5813 Available filters: 5814 5815 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 5816 - `before`=(`<container id>` or `<container name>`) 5817 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5818 - `exited=<int>` containers with exit code of `<int>` 5819 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 5820 - `id=<ID>` a container's ID 5821 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 5822 - `is-task=`(`true`|`false`) 5823 - `label=key` or `label="key=value"` of a container label 5824 - `name=<name>` a container's name 5825 - `network`=(`<network id>` or `<network name>`) 5826 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5827 - `since`=(`<container id>` or `<container name>`) 5828 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 5829 - `volume`=(`<volume name>` or `<mount point destination>`) 5830 type: "string" 5831 responses: 5832 200: 5833 description: "no error" 5834 schema: 5835 type: "array" 5836 items: 5837 $ref: "#/definitions/ContainerSummary" 5838 examples: 5839 application/json: 5840 - Id: "8dfafdbc3a40" 5841 Names: 5842 - "/boring_feynman" 5843 Image: "ubuntu:latest" 5844 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5845 Command: "echo 1" 5846 Created: 1367854155 5847 State: "Exited" 5848 Status: "Exit 0" 5849 Ports: 5850 - PrivatePort: 2222 5851 PublicPort: 3333 5852 Type: "tcp" 5853 Labels: 5854 com.example.vendor: "Acme" 5855 com.example.license: "GPL" 5856 com.example.version: "1.0" 5857 SizeRw: 12288 5858 SizeRootFs: 0 5859 HostConfig: 5860 NetworkMode: "default" 5861 NetworkSettings: 5862 Networks: 5863 bridge: 5864 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5865 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 5866 Gateway: "172.17.0.1" 5867 IPAddress: "172.17.0.2" 5868 IPPrefixLen: 16 5869 IPv6Gateway: "" 5870 GlobalIPv6Address: "" 5871 GlobalIPv6PrefixLen: 0 5872 MacAddress: "02:42:ac:11:00:02" 5873 Mounts: 5874 - Name: "fac362...80535" 5875 Source: "/data" 5876 Destination: "/data" 5877 Driver: "local" 5878 Mode: "ro,Z" 5879 RW: false 5880 Propagation: "" 5881 - Id: "9cd87474be90" 5882 Names: 5883 - "/coolName" 5884 Image: "ubuntu:latest" 5885 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5886 Command: "echo 222222" 5887 Created: 1367854155 5888 State: "Exited" 5889 Status: "Exit 0" 5890 Ports: [] 5891 Labels: {} 5892 SizeRw: 12288 5893 SizeRootFs: 0 5894 HostConfig: 5895 NetworkMode: "default" 5896 NetworkSettings: 5897 Networks: 5898 bridge: 5899 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5900 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 5901 Gateway: "172.17.0.1" 5902 IPAddress: "172.17.0.8" 5903 IPPrefixLen: 16 5904 IPv6Gateway: "" 5905 GlobalIPv6Address: "" 5906 GlobalIPv6PrefixLen: 0 5907 MacAddress: "02:42:ac:11:00:08" 5908 Mounts: [] 5909 - Id: "3176a2479c92" 5910 Names: 5911 - "/sleepy_dog" 5912 Image: "ubuntu:latest" 5913 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5914 Command: "echo 3333333333333333" 5915 Created: 1367854154 5916 State: "Exited" 5917 Status: "Exit 0" 5918 Ports: [] 5919 Labels: {} 5920 SizeRw: 12288 5921 SizeRootFs: 0 5922 HostConfig: 5923 NetworkMode: "default" 5924 NetworkSettings: 5925 Networks: 5926 bridge: 5927 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5928 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 5929 Gateway: "172.17.0.1" 5930 IPAddress: "172.17.0.6" 5931 IPPrefixLen: 16 5932 IPv6Gateway: "" 5933 GlobalIPv6Address: "" 5934 GlobalIPv6PrefixLen: 0 5935 MacAddress: "02:42:ac:11:00:06" 5936 Mounts: [] 5937 - Id: "4cb07b47f9fb" 5938 Names: 5939 - "/running_cat" 5940 Image: "ubuntu:latest" 5941 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5942 Command: "echo 444444444444444444444444444444444" 5943 Created: 1367854152 5944 State: "Exited" 5945 Status: "Exit 0" 5946 Ports: [] 5947 Labels: {} 5948 SizeRw: 12288 5949 SizeRootFs: 0 5950 HostConfig: 5951 NetworkMode: "default" 5952 NetworkSettings: 5953 Networks: 5954 bridge: 5955 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5956 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 5957 Gateway: "172.17.0.1" 5958 IPAddress: "172.17.0.5" 5959 IPPrefixLen: 16 5960 IPv6Gateway: "" 5961 GlobalIPv6Address: "" 5962 GlobalIPv6PrefixLen: 0 5963 MacAddress: "02:42:ac:11:00:05" 5964 Mounts: [] 5965 400: 5966 description: "bad parameter" 5967 schema: 5968 $ref: "#/definitions/ErrorResponse" 5969 500: 5970 description: "server error" 5971 schema: 5972 $ref: "#/definitions/ErrorResponse" 5973 tags: ["Container"] 5974 /containers/create: 5975 post: 5976 summary: "Create a container" 5977 operationId: "ContainerCreate" 5978 consumes: 5979 - "application/json" 5980 - "application/octet-stream" 5981 produces: 5982 - "application/json" 5983 parameters: 5984 - name: "name" 5985 in: "query" 5986 description: | 5987 Assign the specified name to the container. Must match 5988 `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. 5989 type: "string" 5990 pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" 5991 - name: "platform" 5992 in: "query" 5993 description: | 5994 Platform in the format `os[/arch[/variant]]` used for image lookup. 5995 5996 When specified, the daemon checks if the requested image is present 5997 in the local image cache with the given OS and Architecture, and 5998 otherwise returns a `404` status. 5999 6000 If the option is not set, the host's native OS and Architecture are 6001 used to look up the image in the image cache. However, if no platform 6002 is passed and the given image does exist in the local image cache, 6003 but its OS or architecture does not match, the container is created 6004 with the available image, and a warning is added to the `Warnings` 6005 field in the response, for example; 6006 6007 WARNING: The requested image's platform (linux/arm64/v8) does not 6008 match the detected host platform (linux/amd64) and no 6009 specific platform was requested 6010 6011 type: "string" 6012 default: "" 6013 - name: "body" 6014 in: "body" 6015 description: "Container to create" 6016 schema: 6017 allOf: 6018 - $ref: "#/definitions/ContainerConfig" 6019 - type: "object" 6020 properties: 6021 HostConfig: 6022 $ref: "#/definitions/HostConfig" 6023 NetworkingConfig: 6024 $ref: "#/definitions/NetworkingConfig" 6025 example: 6026 Hostname: "" 6027 Domainname: "" 6028 User: "" 6029 AttachStdin: false 6030 AttachStdout: true 6031 AttachStderr: true 6032 Tty: false 6033 OpenStdin: false 6034 StdinOnce: false 6035 Env: 6036 - "FOO=bar" 6037 - "BAZ=quux" 6038 Cmd: 6039 - "date" 6040 Entrypoint: "" 6041 Image: "ubuntu" 6042 Labels: 6043 com.example.vendor: "Acme" 6044 com.example.license: "GPL" 6045 com.example.version: "1.0" 6046 Volumes: 6047 /volumes/data: {} 6048 WorkingDir: "" 6049 NetworkDisabled: false 6050 MacAddress: "12:34:56:78:9a:bc" 6051 ExposedPorts: 6052 22/tcp: {} 6053 StopSignal: "SIGTERM" 6054 StopTimeout: 10 6055 HostConfig: 6056 Binds: 6057 - "/tmp:/tmp" 6058 Links: 6059 - "redis3:redis" 6060 Memory: 0 6061 MemorySwap: 0 6062 MemoryReservation: 0 6063 KernelMemory: 0 6064 NanoCpus: 500000 6065 CpuPercent: 80 6066 CpuShares: 512 6067 CpuPeriod: 100000 6068 CpuRealtimePeriod: 1000000 6069 CpuRealtimeRuntime: 10000 6070 CpuQuota: 50000 6071 CpusetCpus: "0,1" 6072 CpusetMems: "0,1" 6073 MaximumIOps: 0 6074 MaximumIOBps: 0 6075 BlkioWeight: 300 6076 BlkioWeightDevice: 6077 - {} 6078 BlkioDeviceReadBps: 6079 - {} 6080 BlkioDeviceReadIOps: 6081 - {} 6082 BlkioDeviceWriteBps: 6083 - {} 6084 BlkioDeviceWriteIOps: 6085 - {} 6086 DeviceRequests: 6087 - Driver: "nvidia" 6088 Count: -1 6089 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6090 Capabilities: [["gpu", "nvidia", "compute"]] 6091 Options: 6092 property1: "string" 6093 property2: "string" 6094 MemorySwappiness: 60 6095 OomKillDisable: false 6096 OomScoreAdj: 500 6097 PidMode: "" 6098 PidsLimit: 0 6099 PortBindings: 6100 22/tcp: 6101 - HostPort: "11022" 6102 PublishAllPorts: false 6103 Privileged: false 6104 ReadonlyRootfs: false 6105 Dns: 6106 - "8.8.8.8" 6107 DnsOptions: 6108 - "" 6109 DnsSearch: 6110 - "" 6111 VolumesFrom: 6112 - "parent" 6113 - "other:ro" 6114 CapAdd: 6115 - "NET_ADMIN" 6116 CapDrop: 6117 - "MKNOD" 6118 GroupAdd: 6119 - "newgroup" 6120 RestartPolicy: 6121 Name: "" 6122 MaximumRetryCount: 0 6123 AutoRemove: true 6124 NetworkMode: "bridge" 6125 Devices: [] 6126 Ulimits: 6127 - {} 6128 LogConfig: 6129 Type: "json-file" 6130 Config: {} 6131 SecurityOpt: [] 6132 StorageOpt: {} 6133 CgroupParent: "" 6134 VolumeDriver: "" 6135 ShmSize: 67108864 6136 NetworkingConfig: 6137 EndpointsConfig: 6138 isolated_nw: 6139 IPAMConfig: 6140 IPv4Address: "172.20.30.33" 6141 IPv6Address: "2001:db8:abcd::3033" 6142 LinkLocalIPs: 6143 - "169.254.34.68" 6144 - "fe80::3468" 6145 Links: 6146 - "container_1" 6147 - "container_2" 6148 Aliases: 6149 - "server_x" 6150 - "server_y" 6151 6152 required: true 6153 responses: 6154 201: 6155 description: "Container created successfully" 6156 schema: 6157 type: "object" 6158 title: "ContainerCreateResponse" 6159 description: "OK response to ContainerCreate operation" 6160 required: [Id, Warnings] 6161 properties: 6162 Id: 6163 description: "The ID of the created container" 6164 type: "string" 6165 x-nullable: false 6166 Warnings: 6167 description: "Warnings encountered when creating the container" 6168 type: "array" 6169 x-nullable: false 6170 items: 6171 type: "string" 6172 examples: 6173 application/json: 6174 Id: "e90e34656806" 6175 Warnings: [] 6176 400: 6177 description: "bad parameter" 6178 schema: 6179 $ref: "#/definitions/ErrorResponse" 6180 404: 6181 description: "no such image" 6182 schema: 6183 $ref: "#/definitions/ErrorResponse" 6184 examples: 6185 application/json: 6186 message: "No such image: c2ada9df5af8" 6187 409: 6188 description: "conflict" 6189 schema: 6190 $ref: "#/definitions/ErrorResponse" 6191 500: 6192 description: "server error" 6193 schema: 6194 $ref: "#/definitions/ErrorResponse" 6195 tags: ["Container"] 6196 /containers/{id}/json: 6197 get: 6198 summary: "Inspect a container" 6199 description: "Return low-level information about a container." 6200 operationId: "ContainerInspect" 6201 produces: 6202 - "application/json" 6203 responses: 6204 200: 6205 description: "no error" 6206 schema: 6207 type: "object" 6208 title: "ContainerInspectResponse" 6209 properties: 6210 Id: 6211 description: "The ID of the container" 6212 type: "string" 6213 Created: 6214 description: "The time the container was created" 6215 type: "string" 6216 Path: 6217 description: "The path to the command being run" 6218 type: "string" 6219 Args: 6220 description: "The arguments to the command being run" 6221 type: "array" 6222 items: 6223 type: "string" 6224 State: 6225 $ref: "#/definitions/ContainerState" 6226 Image: 6227 description: "The container's image ID" 6228 type: "string" 6229 ResolvConfPath: 6230 type: "string" 6231 HostnamePath: 6232 type: "string" 6233 HostsPath: 6234 type: "string" 6235 LogPath: 6236 type: "string" 6237 Name: 6238 type: "string" 6239 RestartCount: 6240 type: "integer" 6241 Driver: 6242 type: "string" 6243 Platform: 6244 type: "string" 6245 MountLabel: 6246 type: "string" 6247 ProcessLabel: 6248 type: "string" 6249 AppArmorProfile: 6250 type: "string" 6251 ExecIDs: 6252 description: "IDs of exec instances that are running in the container." 6253 type: "array" 6254 items: 6255 type: "string" 6256 x-nullable: true 6257 HostConfig: 6258 $ref: "#/definitions/HostConfig" 6259 GraphDriver: 6260 $ref: "#/definitions/GraphDriverData" 6261 SizeRw: 6262 description: | 6263 The size of files that have been created or changed by this 6264 container. 6265 type: "integer" 6266 format: "int64" 6267 SizeRootFs: 6268 description: "The total size of all the files in this container." 6269 type: "integer" 6270 format: "int64" 6271 Mounts: 6272 type: "array" 6273 items: 6274 $ref: "#/definitions/MountPoint" 6275 Config: 6276 $ref: "#/definitions/ContainerConfig" 6277 NetworkSettings: 6278 $ref: "#/definitions/NetworkSettings" 6279 examples: 6280 application/json: 6281 AppArmorProfile: "" 6282 Args: 6283 - "-c" 6284 - "exit 9" 6285 Config: 6286 AttachStderr: true 6287 AttachStdin: false 6288 AttachStdout: true 6289 Cmd: 6290 - "/bin/sh" 6291 - "-c" 6292 - "exit 9" 6293 Domainname: "" 6294 Env: 6295 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 6296 Healthcheck: 6297 Test: ["CMD-SHELL", "exit 0"] 6298 Hostname: "ba033ac44011" 6299 Image: "ubuntu" 6300 Labels: 6301 com.example.vendor: "Acme" 6302 com.example.license: "GPL" 6303 com.example.version: "1.0" 6304 MacAddress: "" 6305 NetworkDisabled: false 6306 OpenStdin: false 6307 StdinOnce: false 6308 Tty: false 6309 User: "" 6310 Volumes: 6311 /volumes/data: {} 6312 WorkingDir: "" 6313 StopSignal: "SIGTERM" 6314 StopTimeout: 10 6315 Created: "2015-01-06T15:47:31.485331387Z" 6316 Driver: "overlay2" 6317 ExecIDs: 6318 - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" 6319 - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" 6320 HostConfig: 6321 MaximumIOps: 0 6322 MaximumIOBps: 0 6323 BlkioWeight: 0 6324 BlkioWeightDevice: 6325 - {} 6326 BlkioDeviceReadBps: 6327 - {} 6328 BlkioDeviceWriteBps: 6329 - {} 6330 BlkioDeviceReadIOps: 6331 - {} 6332 BlkioDeviceWriteIOps: 6333 - {} 6334 ContainerIDFile: "" 6335 CpusetCpus: "" 6336 CpusetMems: "" 6337 CpuPercent: 80 6338 CpuShares: 0 6339 CpuPeriod: 100000 6340 CpuRealtimePeriod: 1000000 6341 CpuRealtimeRuntime: 10000 6342 Devices: [] 6343 DeviceRequests: 6344 - Driver: "nvidia" 6345 Count: -1 6346 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] 6347 Capabilities: [["gpu", "nvidia", "compute"]] 6348 Options: 6349 property1: "string" 6350 property2: "string" 6351 IpcMode: "" 6352 Memory: 0 6353 MemorySwap: 0 6354 MemoryReservation: 0 6355 KernelMemory: 0 6356 OomKillDisable: false 6357 OomScoreAdj: 500 6358 NetworkMode: "bridge" 6359 PidMode: "" 6360 PortBindings: {} 6361 Privileged: false 6362 ReadonlyRootfs: false 6363 PublishAllPorts: false 6364 RestartPolicy: 6365 MaximumRetryCount: 2 6366 Name: "on-failure" 6367 LogConfig: 6368 Type: "json-file" 6369 Sysctls: 6370 net.ipv4.ip_forward: "1" 6371 Ulimits: 6372 - {} 6373 VolumeDriver: "" 6374 ShmSize: 67108864 6375 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 6376 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 6377 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 6378 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 6379 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 6380 MountLabel: "" 6381 Name: "/boring_euclid" 6382 NetworkSettings: 6383 Bridge: "" 6384 SandboxID: "" 6385 HairpinMode: false 6386 LinkLocalIPv6Address: "" 6387 LinkLocalIPv6PrefixLen: 0 6388 SandboxKey: "" 6389 EndpointID: "" 6390 Gateway: "" 6391 GlobalIPv6Address: "" 6392 GlobalIPv6PrefixLen: 0 6393 IPAddress: "" 6394 IPPrefixLen: 0 6395 IPv6Gateway: "" 6396 MacAddress: "" 6397 Networks: 6398 bridge: 6399 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 6400 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 6401 Gateway: "172.17.0.1" 6402 IPAddress: "172.17.0.2" 6403 IPPrefixLen: 16 6404 IPv6Gateway: "" 6405 GlobalIPv6Address: "" 6406 GlobalIPv6PrefixLen: 0 6407 MacAddress: "02:42:ac:12:00:02" 6408 Path: "/bin/sh" 6409 ProcessLabel: "" 6410 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 6411 RestartCount: 1 6412 State: 6413 Error: "" 6414 ExitCode: 9 6415 FinishedAt: "2015-01-06T15:47:32.080254511Z" 6416 Health: 6417 Status: "healthy" 6418 FailingStreak: 0 6419 Log: 6420 - Start: "2019-12-22T10:59:05.6385933Z" 6421 End: "2019-12-22T10:59:05.8078452Z" 6422 ExitCode: 0 6423 Output: "" 6424 OOMKilled: false 6425 Dead: false 6426 Paused: false 6427 Pid: 0 6428 Restarting: false 6429 Running: true 6430 StartedAt: "2015-01-06T15:47:32.072697474Z" 6431 Status: "running" 6432 Mounts: 6433 - Name: "fac362...80535" 6434 Source: "/data" 6435 Destination: "/data" 6436 Driver: "local" 6437 Mode: "ro,Z" 6438 RW: false 6439 Propagation: "" 6440 404: 6441 description: "no such container" 6442 schema: 6443 $ref: "#/definitions/ErrorResponse" 6444 examples: 6445 application/json: 6446 message: "No such container: c2ada9df5af8" 6447 500: 6448 description: "server error" 6449 schema: 6450 $ref: "#/definitions/ErrorResponse" 6451 parameters: 6452 - name: "id" 6453 in: "path" 6454 required: true 6455 description: "ID or name of the container" 6456 type: "string" 6457 - name: "size" 6458 in: "query" 6459 type: "boolean" 6460 default: false 6461 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 6462 tags: ["Container"] 6463 /containers/{id}/top: 6464 get: 6465 summary: "List processes running inside a container" 6466 description: | 6467 On Unix systems, this is done by running the `ps` command. This endpoint 6468 is not supported on Windows. 6469 operationId: "ContainerTop" 6470 responses: 6471 200: 6472 description: "no error" 6473 schema: 6474 type: "object" 6475 title: "ContainerTopResponse" 6476 description: "OK response to ContainerTop operation" 6477 properties: 6478 Titles: 6479 description: "The ps column titles" 6480 type: "array" 6481 items: 6482 type: "string" 6483 Processes: 6484 description: | 6485 Each process running in the container, where each is process 6486 is an array of values corresponding to the titles. 6487 type: "array" 6488 items: 6489 type: "array" 6490 items: 6491 type: "string" 6492 examples: 6493 application/json: 6494 Titles: 6495 - "UID" 6496 - "PID" 6497 - "PPID" 6498 - "C" 6499 - "STIME" 6500 - "TTY" 6501 - "TIME" 6502 - "CMD" 6503 Processes: 6504 - 6505 - "root" 6506 - "13642" 6507 - "882" 6508 - "0" 6509 - "17:03" 6510 - "pts/0" 6511 - "00:00:00" 6512 - "/bin/bash" 6513 - 6514 - "root" 6515 - "13735" 6516 - "13642" 6517 - "0" 6518 - "17:06" 6519 - "pts/0" 6520 - "00:00:00" 6521 - "sleep 10" 6522 404: 6523 description: "no such container" 6524 schema: 6525 $ref: "#/definitions/ErrorResponse" 6526 examples: 6527 application/json: 6528 message: "No such container: c2ada9df5af8" 6529 500: 6530 description: "server error" 6531 schema: 6532 $ref: "#/definitions/ErrorResponse" 6533 parameters: 6534 - name: "id" 6535 in: "path" 6536 required: true 6537 description: "ID or name of the container" 6538 type: "string" 6539 - name: "ps_args" 6540 in: "query" 6541 description: "The arguments to pass to `ps`. For example, `aux`" 6542 type: "string" 6543 default: "-ef" 6544 tags: ["Container"] 6545 /containers/{id}/logs: 6546 get: 6547 summary: "Get container logs" 6548 description: | 6549 Get `stdout` and `stderr` logs from a container. 6550 6551 Note: This endpoint works only for containers with the `json-file` or 6552 `journald` logging driver. 6553 operationId: "ContainerLogs" 6554 responses: 6555 200: 6556 description: | 6557 logs returned as a stream in response body. 6558 For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 6559 Note that unlike the attach endpoint, the logs endpoint does not 6560 upgrade the connection and does not set Content-Type. 6561 schema: 6562 type: "string" 6563 format: "binary" 6564 404: 6565 description: "no such container" 6566 schema: 6567 $ref: "#/definitions/ErrorResponse" 6568 examples: 6569 application/json: 6570 message: "No such container: c2ada9df5af8" 6571 500: 6572 description: "server error" 6573 schema: 6574 $ref: "#/definitions/ErrorResponse" 6575 parameters: 6576 - name: "id" 6577 in: "path" 6578 required: true 6579 description: "ID or name of the container" 6580 type: "string" 6581 - name: "follow" 6582 in: "query" 6583 description: "Keep connection after returning logs." 6584 type: "boolean" 6585 default: false 6586 - name: "stdout" 6587 in: "query" 6588 description: "Return logs from `stdout`" 6589 type: "boolean" 6590 default: false 6591 - name: "stderr" 6592 in: "query" 6593 description: "Return logs from `stderr`" 6594 type: "boolean" 6595 default: false 6596 - name: "since" 6597 in: "query" 6598 description: "Only return logs since this time, as a UNIX timestamp" 6599 type: "integer" 6600 default: 0 6601 - name: "until" 6602 in: "query" 6603 description: "Only return logs before this time, as a UNIX timestamp" 6604 type: "integer" 6605 default: 0 6606 - name: "timestamps" 6607 in: "query" 6608 description: "Add timestamps to every log line" 6609 type: "boolean" 6610 default: false 6611 - name: "tail" 6612 in: "query" 6613 description: | 6614 Only return this number of log lines from the end of the logs. 6615 Specify as an integer or `all` to output all log lines. 6616 type: "string" 6617 default: "all" 6618 tags: ["Container"] 6619 /containers/{id}/changes: 6620 get: 6621 summary: "Get changes on a container’s filesystem" 6622 description: | 6623 Returns which files in a container's filesystem have been added, deleted, 6624 or modified. The `Kind` of modification can be one of: 6625 6626 - `0`: Modified 6627 - `1`: Added 6628 - `2`: Deleted 6629 operationId: "ContainerChanges" 6630 produces: ["application/json"] 6631 responses: 6632 200: 6633 description: "The list of changes" 6634 schema: 6635 type: "array" 6636 items: 6637 type: "object" 6638 x-go-name: "ContainerChangeResponseItem" 6639 title: "ContainerChangeResponseItem" 6640 description: "change item in response to ContainerChanges operation" 6641 required: [Path, Kind] 6642 properties: 6643 Path: 6644 description: "Path to file that has changed" 6645 type: "string" 6646 x-nullable: false 6647 Kind: 6648 description: "Kind of change" 6649 type: "integer" 6650 format: "uint8" 6651 enum: [0, 1, 2] 6652 x-nullable: false 6653 examples: 6654 application/json: 6655 - Path: "/dev" 6656 Kind: 0 6657 - Path: "/dev/kmsg" 6658 Kind: 1 6659 - Path: "/test" 6660 Kind: 1 6661 404: 6662 description: "no such container" 6663 schema: 6664 $ref: "#/definitions/ErrorResponse" 6665 examples: 6666 application/json: 6667 message: "No such container: c2ada9df5af8" 6668 500: 6669 description: "server error" 6670 schema: 6671 $ref: "#/definitions/ErrorResponse" 6672 parameters: 6673 - name: "id" 6674 in: "path" 6675 required: true 6676 description: "ID or name of the container" 6677 type: "string" 6678 tags: ["Container"] 6679 /containers/{id}/export: 6680 get: 6681 summary: "Export a container" 6682 description: "Export the contents of a container as a tarball." 6683 operationId: "ContainerExport" 6684 produces: 6685 - "application/octet-stream" 6686 responses: 6687 200: 6688 description: "no error" 6689 404: 6690 description: "no such container" 6691 schema: 6692 $ref: "#/definitions/ErrorResponse" 6693 examples: 6694 application/json: 6695 message: "No such container: c2ada9df5af8" 6696 500: 6697 description: "server error" 6698 schema: 6699 $ref: "#/definitions/ErrorResponse" 6700 parameters: 6701 - name: "id" 6702 in: "path" 6703 required: true 6704 description: "ID or name of the container" 6705 type: "string" 6706 tags: ["Container"] 6707 /containers/{id}/stats: 6708 get: 6709 summary: "Get container stats based on resource usage" 6710 description: | 6711 This endpoint returns a live stream of a container’s resource usage 6712 statistics. 6713 6714 The `precpu_stats` is the CPU statistic of the *previous* read, and is 6715 used to calculate the CPU usage percentage. It is not an exact copy 6716 of the `cpu_stats` field. 6717 6718 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 6719 nil then for compatibility with older daemons the length of the 6720 corresponding `cpu_usage.percpu_usage` array should be used. 6721 6722 On a cgroup v2 host, the following fields are not set 6723 * `blkio_stats`: all fields other than `io_service_bytes_recursive` 6724 * `cpu_stats`: `cpu_usage.percpu_usage` 6725 * `memory_stats`: `max_usage` and `failcnt` 6726 Also, `memory_stats.stats` fields are incompatible with cgroup v1. 6727 6728 To calculate the values shown by the `stats` command of the docker cli tool 6729 the following formulas can be used: 6730 * used_memory = `memory_stats.usage - memory_stats.stats.cache` 6731 * available_memory = `memory_stats.limit` 6732 * Memory usage % = `(used_memory / available_memory) * 100.0` 6733 * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` 6734 * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` 6735 * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` 6736 * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` 6737 operationId: "ContainerStats" 6738 produces: ["application/json"] 6739 responses: 6740 200: 6741 description: "no error" 6742 schema: 6743 type: "object" 6744 examples: 6745 application/json: 6746 read: "2015-01-08T22:57:31.547920715Z" 6747 pids_stats: 6748 current: 3 6749 networks: 6750 eth0: 6751 rx_bytes: 5338 6752 rx_dropped: 0 6753 rx_errors: 0 6754 rx_packets: 36 6755 tx_bytes: 648 6756 tx_dropped: 0 6757 tx_errors: 0 6758 tx_packets: 8 6759 eth5: 6760 rx_bytes: 4641 6761 rx_dropped: 0 6762 rx_errors: 0 6763 rx_packets: 26 6764 tx_bytes: 690 6765 tx_dropped: 0 6766 tx_errors: 0 6767 tx_packets: 9 6768 memory_stats: 6769 stats: 6770 total_pgmajfault: 0 6771 cache: 0 6772 mapped_file: 0 6773 total_inactive_file: 0 6774 pgpgout: 414 6775 rss: 6537216 6776 total_mapped_file: 0 6777 writeback: 0 6778 unevictable: 0 6779 pgpgin: 477 6780 total_unevictable: 0 6781 pgmajfault: 0 6782 total_rss: 6537216 6783 total_rss_huge: 6291456 6784 total_writeback: 0 6785 total_inactive_anon: 0 6786 rss_huge: 6291456 6787 hierarchical_memory_limit: 67108864 6788 total_pgfault: 964 6789 total_active_file: 0 6790 active_anon: 6537216 6791 total_active_anon: 6537216 6792 total_pgpgout: 414 6793 total_cache: 0 6794 inactive_anon: 0 6795 active_file: 0 6796 pgfault: 964 6797 inactive_file: 0 6798 total_pgpgin: 477 6799 max_usage: 6651904 6800 usage: 6537216 6801 failcnt: 0 6802 limit: 67108864 6803 blkio_stats: {} 6804 cpu_stats: 6805 cpu_usage: 6806 percpu_usage: 6807 - 8646879 6808 - 24472255 6809 - 36438778 6810 - 30657443 6811 usage_in_usermode: 50000000 6812 total_usage: 100215355 6813 usage_in_kernelmode: 30000000 6814 system_cpu_usage: 739306590000000 6815 online_cpus: 4 6816 throttling_data: 6817 periods: 0 6818 throttled_periods: 0 6819 throttled_time: 0 6820 precpu_stats: 6821 cpu_usage: 6822 percpu_usage: 6823 - 8646879 6824 - 24350896 6825 - 36438778 6826 - 30657443 6827 usage_in_usermode: 50000000 6828 total_usage: 100093996 6829 usage_in_kernelmode: 30000000 6830 system_cpu_usage: 9492140000000 6831 online_cpus: 4 6832 throttling_data: 6833 periods: 0 6834 throttled_periods: 0 6835 throttled_time: 0 6836 404: 6837 description: "no such container" 6838 schema: 6839 $ref: "#/definitions/ErrorResponse" 6840 examples: 6841 application/json: 6842 message: "No such container: c2ada9df5af8" 6843 500: 6844 description: "server error" 6845 schema: 6846 $ref: "#/definitions/ErrorResponse" 6847 parameters: 6848 - name: "id" 6849 in: "path" 6850 required: true 6851 description: "ID or name of the container" 6852 type: "string" 6853 - name: "stream" 6854 in: "query" 6855 description: | 6856 Stream the output. If false, the stats will be output once and then 6857 it will disconnect. 6858 type: "boolean" 6859 default: true 6860 - name: "one-shot" 6861 in: "query" 6862 description: | 6863 Only get a single stat instead of waiting for 2 cycles. Must be used 6864 with `stream=false`. 6865 type: "boolean" 6866 default: false 6867 tags: ["Container"] 6868 /containers/{id}/resize: 6869 post: 6870 summary: "Resize a container TTY" 6871 description: "Resize the TTY for a container." 6872 operationId: "ContainerResize" 6873 consumes: 6874 - "application/octet-stream" 6875 produces: 6876 - "text/plain" 6877 responses: 6878 200: 6879 description: "no error" 6880 404: 6881 description: "no such container" 6882 schema: 6883 $ref: "#/definitions/ErrorResponse" 6884 examples: 6885 application/json: 6886 message: "No such container: c2ada9df5af8" 6887 500: 6888 description: "cannot resize container" 6889 schema: 6890 $ref: "#/definitions/ErrorResponse" 6891 parameters: 6892 - name: "id" 6893 in: "path" 6894 required: true 6895 description: "ID or name of the container" 6896 type: "string" 6897 - name: "h" 6898 in: "query" 6899 description: "Height of the TTY session in characters" 6900 type: "integer" 6901 - name: "w" 6902 in: "query" 6903 description: "Width of the TTY session in characters" 6904 type: "integer" 6905 tags: ["Container"] 6906 /containers/{id}/start: 6907 post: 6908 summary: "Start a container" 6909 operationId: "ContainerStart" 6910 responses: 6911 204: 6912 description: "no error" 6913 304: 6914 description: "container already started" 6915 404: 6916 description: "no such container" 6917 schema: 6918 $ref: "#/definitions/ErrorResponse" 6919 examples: 6920 application/json: 6921 message: "No such container: c2ada9df5af8" 6922 500: 6923 description: "server error" 6924 schema: 6925 $ref: "#/definitions/ErrorResponse" 6926 parameters: 6927 - name: "id" 6928 in: "path" 6929 required: true 6930 description: "ID or name of the container" 6931 type: "string" 6932 - name: "detachKeys" 6933 in: "query" 6934 description: | 6935 Override the key sequence for detaching a container. Format is a 6936 single character `[a-Z]` or `ctrl-<value>` where `<value>` is one 6937 of: `a-z`, `@`, `^`, `[`, `,` or `_`. 6938 type: "string" 6939 tags: ["Container"] 6940 /containers/{id}/stop: 6941 post: 6942 summary: "Stop a container" 6943 operationId: "ContainerStop" 6944 responses: 6945 204: 6946 description: "no error" 6947 304: 6948 description: "container already stopped" 6949 404: 6950 description: "no such container" 6951 schema: 6952 $ref: "#/definitions/ErrorResponse" 6953 examples: 6954 application/json: 6955 message: "No such container: c2ada9df5af8" 6956 500: 6957 description: "server error" 6958 schema: 6959 $ref: "#/definitions/ErrorResponse" 6960 parameters: 6961 - name: "id" 6962 in: "path" 6963 required: true 6964 description: "ID or name of the container" 6965 type: "string" 6966 - name: "t" 6967 in: "query" 6968 description: "Number of seconds to wait before killing the container" 6969 type: "integer" 6970 tags: ["Container"] 6971 /containers/{id}/restart: 6972 post: 6973 summary: "Restart a container" 6974 operationId: "ContainerRestart" 6975 responses: 6976 204: 6977 description: "no error" 6978 404: 6979 description: "no such container" 6980 schema: 6981 $ref: "#/definitions/ErrorResponse" 6982 examples: 6983 application/json: 6984 message: "No such container: c2ada9df5af8" 6985 500: 6986 description: "server error" 6987 schema: 6988 $ref: "#/definitions/ErrorResponse" 6989 parameters: 6990 - name: "id" 6991 in: "path" 6992 required: true 6993 description: "ID or name of the container" 6994 type: "string" 6995 - name: "t" 6996 in: "query" 6997 description: "Number of seconds to wait before killing the container" 6998 type: "integer" 6999 tags: ["Container"] 7000 /containers/{id}/kill: 7001 post: 7002 summary: "Kill a container" 7003 description: | 7004 Send a POSIX signal to a container, defaulting to killing to the 7005 container. 7006 operationId: "ContainerKill" 7007 responses: 7008 204: 7009 description: "no error" 7010 404: 7011 description: "no such container" 7012 schema: 7013 $ref: "#/definitions/ErrorResponse" 7014 examples: 7015 application/json: 7016 message: "No such container: c2ada9df5af8" 7017 409: 7018 description: "container is not running" 7019 schema: 7020 $ref: "#/definitions/ErrorResponse" 7021 examples: 7022 application/json: 7023 message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 7024 500: 7025 description: "server error" 7026 schema: 7027 $ref: "#/definitions/ErrorResponse" 7028 parameters: 7029 - name: "id" 7030 in: "path" 7031 required: true 7032 description: "ID or name of the container" 7033 type: "string" 7034 - name: "signal" 7035 in: "query" 7036 description: | 7037 Signal to send to the container as an integer or string (e.g. `SIGINT`). 7038 type: "string" 7039 default: "SIGKILL" 7040 tags: ["Container"] 7041 /containers/{id}/update: 7042 post: 7043 summary: "Update a container" 7044 description: | 7045 Change various configuration options of a container without having to 7046 recreate it. 7047 operationId: "ContainerUpdate" 7048 consumes: ["application/json"] 7049 produces: ["application/json"] 7050 responses: 7051 200: 7052 description: "The container has been updated." 7053 schema: 7054 type: "object" 7055 title: "ContainerUpdateResponse" 7056 description: "OK response to ContainerUpdate operation" 7057 properties: 7058 Warnings: 7059 type: "array" 7060 items: 7061 type: "string" 7062 404: 7063 description: "no such container" 7064 schema: 7065 $ref: "#/definitions/ErrorResponse" 7066 examples: 7067 application/json: 7068 message: "No such container: c2ada9df5af8" 7069 500: 7070 description: "server error" 7071 schema: 7072 $ref: "#/definitions/ErrorResponse" 7073 parameters: 7074 - name: "id" 7075 in: "path" 7076 required: true 7077 description: "ID or name of the container" 7078 type: "string" 7079 - name: "update" 7080 in: "body" 7081 required: true 7082 schema: 7083 allOf: 7084 - $ref: "#/definitions/Resources" 7085 - type: "object" 7086 properties: 7087 RestartPolicy: 7088 $ref: "#/definitions/RestartPolicy" 7089 example: 7090 BlkioWeight: 300 7091 CpuShares: 512 7092 CpuPeriod: 100000 7093 CpuQuota: 50000 7094 CpuRealtimePeriod: 1000000 7095 CpuRealtimeRuntime: 10000 7096 CpusetCpus: "0,1" 7097 CpusetMems: "0" 7098 Memory: 314572800 7099 MemorySwap: 514288000 7100 MemoryReservation: 209715200 7101 KernelMemory: 52428800 7102 RestartPolicy: 7103 MaximumRetryCount: 4 7104 Name: "on-failure" 7105 tags: ["Container"] 7106 /containers/{id}/rename: 7107 post: 7108 summary: "Rename a container" 7109 operationId: "ContainerRename" 7110 responses: 7111 204: 7112 description: "no error" 7113 404: 7114 description: "no such container" 7115 schema: 7116 $ref: "#/definitions/ErrorResponse" 7117 examples: 7118 application/json: 7119 message: "No such container: c2ada9df5af8" 7120 409: 7121 description: "name already in use" 7122 schema: 7123 $ref: "#/definitions/ErrorResponse" 7124 500: 7125 description: "server error" 7126 schema: 7127 $ref: "#/definitions/ErrorResponse" 7128 parameters: 7129 - name: "id" 7130 in: "path" 7131 required: true 7132 description: "ID or name of the container" 7133 type: "string" 7134 - name: "name" 7135 in: "query" 7136 required: true 7137 description: "New name for the container" 7138 type: "string" 7139 tags: ["Container"] 7140 /containers/{id}/pause: 7141 post: 7142 summary: "Pause a container" 7143 description: | 7144 Use the freezer cgroup to suspend all processes in a container. 7145 7146 Traditionally, when suspending a process the `SIGSTOP` signal is used, 7147 which is observable by the process being suspended. With the freezer 7148 cgroup the process is unaware, and unable to capture, that it is being 7149 suspended, and subsequently resumed. 7150 operationId: "ContainerPause" 7151 responses: 7152 204: 7153 description: "no error" 7154 404: 7155 description: "no such container" 7156 schema: 7157 $ref: "#/definitions/ErrorResponse" 7158 examples: 7159 application/json: 7160 message: "No such container: c2ada9df5af8" 7161 500: 7162 description: "server error" 7163 schema: 7164 $ref: "#/definitions/ErrorResponse" 7165 parameters: 7166 - name: "id" 7167 in: "path" 7168 required: true 7169 description: "ID or name of the container" 7170 type: "string" 7171 tags: ["Container"] 7172 /containers/{id}/unpause: 7173 post: 7174 summary: "Unpause a container" 7175 description: "Resume a container which has been paused." 7176 operationId: "ContainerUnpause" 7177 responses: 7178 204: 7179 description: "no error" 7180 404: 7181 description: "no such container" 7182 schema: 7183 $ref: "#/definitions/ErrorResponse" 7184 examples: 7185 application/json: 7186 message: "No such container: c2ada9df5af8" 7187 500: 7188 description: "server error" 7189 schema: 7190 $ref: "#/definitions/ErrorResponse" 7191 parameters: 7192 - name: "id" 7193 in: "path" 7194 required: true 7195 description: "ID or name of the container" 7196 type: "string" 7197 tags: ["Container"] 7198 /containers/{id}/attach: 7199 post: 7200 summary: "Attach to a container" 7201 description: | 7202 Attach to a container to read its output or send it input. You can attach 7203 to the same container multiple times and you can reattach to containers 7204 that have been detached. 7205 7206 Either the `stream` or `logs` parameter must be `true` for this endpoint 7207 to do anything. 7208 7209 See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) 7210 for more details. 7211 7212 ### Hijacking 7213 7214 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, 7215 and `stderr` on the same socket. 7216 7217 This is the response from the daemon for an attach request: 7218 7219 ``` 7220 HTTP/1.1 200 OK 7221 Content-Type: application/vnd.docker.raw-stream 7222 7223 [STREAM] 7224 ``` 7225 7226 After the headers and two new lines, the TCP connection can now be used 7227 for raw, bidirectional communication between the client and server. 7228 7229 To hint potential proxies about connection hijacking, the Docker client 7230 can also optionally send connection upgrade headers. 7231 7232 For example, the client sends this request to upgrade the connection: 7233 7234 ``` 7235 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 7236 Upgrade: tcp 7237 Connection: Upgrade 7238 ``` 7239 7240 The Docker daemon will respond with a `101 UPGRADED` response, and will 7241 similarly follow with the raw stream: 7242 7243 ``` 7244 HTTP/1.1 101 UPGRADED 7245 Content-Type: application/vnd.docker.raw-stream 7246 Connection: Upgrade 7247 Upgrade: tcp 7248 7249 [STREAM] 7250 ``` 7251 7252 ### Stream format 7253 7254 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), 7255 the stream over the hijacked connected is multiplexed to separate out 7256 `stdout` and `stderr`. The stream consists of a series of frames, each 7257 containing a header and a payload. 7258 7259 The header contains the information which the stream writes (`stdout` or 7260 `stderr`). It also contains the size of the associated frame encoded in 7261 the last four bytes (`uint32`). 7262 7263 It is encoded on the first eight bytes like this: 7264 7265 ```go 7266 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 7267 ``` 7268 7269 `STREAM_TYPE` can be: 7270 7271 - 0: `stdin` (is written on `stdout`) 7272 - 1: `stdout` 7273 - 2: `stderr` 7274 7275 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size 7276 encoded as big endian. 7277 7278 Following the header is the payload, which is the specified number of 7279 bytes of `STREAM_TYPE`. 7280 7281 The simplest way to implement this protocol is the following: 7282 7283 1. Read 8 bytes. 7284 2. Choose `stdout` or `stderr` depending on the first byte. 7285 3. Extract the frame size from the last four bytes. 7286 4. Read the extracted size and output it on the correct output. 7287 5. Goto 1. 7288 7289 ### Stream format when using a TTY 7290 7291 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), 7292 the stream is not multiplexed. The data exchanged over the hijacked 7293 connection is simply the raw data from the process PTY and client's 7294 `stdin`. 7295 7296 operationId: "ContainerAttach" 7297 produces: 7298 - "application/vnd.docker.raw-stream" 7299 responses: 7300 101: 7301 description: "no error, hints proxy about hijacking" 7302 200: 7303 description: "no error, no upgrade header found" 7304 400: 7305 description: "bad parameter" 7306 schema: 7307 $ref: "#/definitions/ErrorResponse" 7308 404: 7309 description: "no such container" 7310 schema: 7311 $ref: "#/definitions/ErrorResponse" 7312 examples: 7313 application/json: 7314 message: "No such container: c2ada9df5af8" 7315 500: 7316 description: "server error" 7317 schema: 7318 $ref: "#/definitions/ErrorResponse" 7319 parameters: 7320 - name: "id" 7321 in: "path" 7322 required: true 7323 description: "ID or name of the container" 7324 type: "string" 7325 - name: "detachKeys" 7326 in: "query" 7327 description: | 7328 Override the key sequence for detaching a container.Format is a single 7329 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7330 `@`, `^`, `[`, `,` or `_`. 7331 type: "string" 7332 - name: "logs" 7333 in: "query" 7334 description: | 7335 Replay previous logs from the container. 7336 7337 This is useful for attaching to a container that has started and you 7338 want to output everything since the container started. 7339 7340 If `stream` is also enabled, once all the previous output has been 7341 returned, it will seamlessly transition into streaming current 7342 output. 7343 type: "boolean" 7344 default: false 7345 - name: "stream" 7346 in: "query" 7347 description: | 7348 Stream attached streams from the time the request was made onwards. 7349 type: "boolean" 7350 default: false 7351 - name: "stdin" 7352 in: "query" 7353 description: "Attach to `stdin`" 7354 type: "boolean" 7355 default: false 7356 - name: "stdout" 7357 in: "query" 7358 description: "Attach to `stdout`" 7359 type: "boolean" 7360 default: false 7361 - name: "stderr" 7362 in: "query" 7363 description: "Attach to `stderr`" 7364 type: "boolean" 7365 default: false 7366 tags: ["Container"] 7367 /containers/{id}/attach/ws: 7368 get: 7369 summary: "Attach to a container via a websocket" 7370 operationId: "ContainerAttachWebsocket" 7371 responses: 7372 101: 7373 description: "no error, hints proxy about hijacking" 7374 200: 7375 description: "no error, no upgrade header found" 7376 400: 7377 description: "bad parameter" 7378 schema: 7379 $ref: "#/definitions/ErrorResponse" 7380 404: 7381 description: "no such container" 7382 schema: 7383 $ref: "#/definitions/ErrorResponse" 7384 examples: 7385 application/json: 7386 message: "No such container: c2ada9df5af8" 7387 500: 7388 description: "server error" 7389 schema: 7390 $ref: "#/definitions/ErrorResponse" 7391 parameters: 7392 - name: "id" 7393 in: "path" 7394 required: true 7395 description: "ID or name of the container" 7396 type: "string" 7397 - name: "detachKeys" 7398 in: "query" 7399 description: | 7400 Override the key sequence for detaching a container.Format is a single 7401 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 7402 `@`, `^`, `[`, `,`, or `_`. 7403 type: "string" 7404 - name: "logs" 7405 in: "query" 7406 description: "Return logs" 7407 type: "boolean" 7408 default: false 7409 - name: "stream" 7410 in: "query" 7411 description: "Return stream" 7412 type: "boolean" 7413 default: false 7414 tags: ["Container"] 7415 /containers/{id}/wait: 7416 post: 7417 summary: "Wait for a container" 7418 description: "Block until a container stops, then returns the exit code." 7419 operationId: "ContainerWait" 7420 produces: ["application/json"] 7421 responses: 7422 200: 7423 description: "The container has exit." 7424 schema: 7425 $ref: "#/definitions/ContainerWaitResponse" 7426 400: 7427 description: "bad parameter" 7428 schema: 7429 $ref: "#/definitions/ErrorResponse" 7430 404: 7431 description: "no such container" 7432 schema: 7433 $ref: "#/definitions/ErrorResponse" 7434 examples: 7435 application/json: 7436 message: "No such container: c2ada9df5af8" 7437 500: 7438 description: "server error" 7439 schema: 7440 $ref: "#/definitions/ErrorResponse" 7441 parameters: 7442 - name: "id" 7443 in: "path" 7444 required: true 7445 description: "ID or name of the container" 7446 type: "string" 7447 - name: "condition" 7448 in: "query" 7449 description: | 7450 Wait until a container state reaches the given condition. 7451 7452 Defaults to `not-running` if omitted or empty. 7453 type: "string" 7454 enum: 7455 - "not-running" 7456 - "next-exit" 7457 - "removed" 7458 default: "not-running" 7459 tags: ["Container"] 7460 /containers/{id}: 7461 delete: 7462 summary: "Remove a container" 7463 operationId: "ContainerDelete" 7464 responses: 7465 204: 7466 description: "no error" 7467 400: 7468 description: "bad parameter" 7469 schema: 7470 $ref: "#/definitions/ErrorResponse" 7471 404: 7472 description: "no such container" 7473 schema: 7474 $ref: "#/definitions/ErrorResponse" 7475 examples: 7476 application/json: 7477 message: "No such container: c2ada9df5af8" 7478 409: 7479 description: "conflict" 7480 schema: 7481 $ref: "#/definitions/ErrorResponse" 7482 examples: 7483 application/json: 7484 message: | 7485 You cannot remove a running container: c2ada9df5af8. Stop the 7486 container before attempting removal or force remove 7487 500: 7488 description: "server error" 7489 schema: 7490 $ref: "#/definitions/ErrorResponse" 7491 parameters: 7492 - name: "id" 7493 in: "path" 7494 required: true 7495 description: "ID or name of the container" 7496 type: "string" 7497 - name: "v" 7498 in: "query" 7499 description: "Remove anonymous volumes associated with the container." 7500 type: "boolean" 7501 default: false 7502 - name: "force" 7503 in: "query" 7504 description: "If the container is running, kill it before removing it." 7505 type: "boolean" 7506 default: false 7507 - name: "link" 7508 in: "query" 7509 description: "Remove the specified link associated with the container." 7510 type: "boolean" 7511 default: false 7512 tags: ["Container"] 7513 /containers/{id}/archive: 7514 head: 7515 summary: "Get information about files in a container" 7516 description: | 7517 A response header `X-Docker-Container-Path-Stat` is returned, containing 7518 a base64 - encoded JSON object with some filesystem header information 7519 about the path. 7520 operationId: "ContainerArchiveInfo" 7521 responses: 7522 200: 7523 description: "no error" 7524 headers: 7525 X-Docker-Container-Path-Stat: 7526 type: "string" 7527 description: | 7528 A base64 - encoded JSON object with some filesystem header 7529 information about the path 7530 400: 7531 description: "Bad parameter" 7532 schema: 7533 $ref: "#/definitions/ErrorResponse" 7534 404: 7535 description: "Container or path does not exist" 7536 schema: 7537 $ref: "#/definitions/ErrorResponse" 7538 examples: 7539 application/json: 7540 message: "No such container: c2ada9df5af8" 7541 500: 7542 description: "Server error" 7543 schema: 7544 $ref: "#/definitions/ErrorResponse" 7545 parameters: 7546 - name: "id" 7547 in: "path" 7548 required: true 7549 description: "ID or name of the container" 7550 type: "string" 7551 - name: "path" 7552 in: "query" 7553 required: true 7554 description: "Resource in the container’s filesystem to archive." 7555 type: "string" 7556 tags: ["Container"] 7557 get: 7558 summary: "Get an archive of a filesystem resource in a container" 7559 description: "Get a tar archive of a resource in the filesystem of container id." 7560 operationId: "ContainerArchive" 7561 produces: ["application/x-tar"] 7562 responses: 7563 200: 7564 description: "no error" 7565 400: 7566 description: "Bad parameter" 7567 schema: 7568 $ref: "#/definitions/ErrorResponse" 7569 404: 7570 description: "Container or path does not exist" 7571 schema: 7572 $ref: "#/definitions/ErrorResponse" 7573 examples: 7574 application/json: 7575 message: "No such container: c2ada9df5af8" 7576 500: 7577 description: "server error" 7578 schema: 7579 $ref: "#/definitions/ErrorResponse" 7580 parameters: 7581 - name: "id" 7582 in: "path" 7583 required: true 7584 description: "ID or name of the container" 7585 type: "string" 7586 - name: "path" 7587 in: "query" 7588 required: true 7589 description: "Resource in the container’s filesystem to archive." 7590 type: "string" 7591 tags: ["Container"] 7592 put: 7593 summary: "Extract an archive of files or folders to a directory in a container" 7594 description: | 7595 Upload a tar archive to be extracted to a path in the filesystem of container id. 7596 `path` parameter is asserted to be a directory. If it exists as a file, 400 error 7597 will be returned with message "not a directory". 7598 operationId: "PutContainerArchive" 7599 consumes: ["application/x-tar", "application/octet-stream"] 7600 responses: 7601 200: 7602 description: "The content was extracted successfully" 7603 400: 7604 description: "Bad parameter" 7605 schema: 7606 $ref: "#/definitions/ErrorResponse" 7607 examples: 7608 application/json: 7609 message: "not a directory" 7610 403: 7611 description: "Permission denied, the volume or container rootfs is marked as read-only." 7612 schema: 7613 $ref: "#/definitions/ErrorResponse" 7614 404: 7615 description: "No such container or path does not exist inside the container" 7616 schema: 7617 $ref: "#/definitions/ErrorResponse" 7618 examples: 7619 application/json: 7620 message: "No such container: c2ada9df5af8" 7621 500: 7622 description: "Server error" 7623 schema: 7624 $ref: "#/definitions/ErrorResponse" 7625 parameters: 7626 - name: "id" 7627 in: "path" 7628 required: true 7629 description: "ID or name of the container" 7630 type: "string" 7631 - name: "path" 7632 in: "query" 7633 required: true 7634 description: "Path to a directory in the container to extract the archive’s contents into. " 7635 type: "string" 7636 - name: "noOverwriteDirNonDir" 7637 in: "query" 7638 description: | 7639 If `1`, `true`, or `True` then it will be an error if unpacking the 7640 given content would cause an existing directory to be replaced with 7641 a non-directory and vice versa. 7642 type: "string" 7643 - name: "copyUIDGID" 7644 in: "query" 7645 description: | 7646 If `1`, `true`, then it will copy UID/GID maps to the dest file or 7647 dir 7648 type: "string" 7649 - name: "inputStream" 7650 in: "body" 7651 required: true 7652 description: | 7653 The input stream must be a tar archive compressed with one of the 7654 following algorithms: `identity` (no compression), `gzip`, `bzip2`, 7655 or `xz`. 7656 schema: 7657 type: "string" 7658 format: "binary" 7659 tags: ["Container"] 7660 /containers/prune: 7661 post: 7662 summary: "Delete stopped containers" 7663 produces: 7664 - "application/json" 7665 operationId: "ContainerPrune" 7666 parameters: 7667 - name: "filters" 7668 in: "query" 7669 description: | 7670 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 7671 7672 Available filters: 7673 - `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. 7674 - `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. 7675 type: "string" 7676 responses: 7677 200: 7678 description: "No error" 7679 schema: 7680 type: "object" 7681 title: "ContainerPruneResponse" 7682 properties: 7683 ContainersDeleted: 7684 description: "Container IDs that were deleted" 7685 type: "array" 7686 items: 7687 type: "string" 7688 SpaceReclaimed: 7689 description: "Disk space reclaimed in bytes" 7690 type: "integer" 7691 format: "int64" 7692 500: 7693 description: "Server error" 7694 schema: 7695 $ref: "#/definitions/ErrorResponse" 7696 tags: ["Container"] 7697 /images/json: 7698 get: 7699 summary: "List Images" 7700 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." 7701 operationId: "ImageList" 7702 produces: 7703 - "application/json" 7704 responses: 7705 200: 7706 description: "Summary image data for the images matching the query" 7707 schema: 7708 type: "array" 7709 items: 7710 $ref: "#/definitions/ImageSummary" 7711 500: 7712 description: "server error" 7713 schema: 7714 $ref: "#/definitions/ErrorResponse" 7715 parameters: 7716 - name: "all" 7717 in: "query" 7718 description: "Show all images. Only images from a final layer (no children) are shown by default." 7719 type: "boolean" 7720 default: false 7721 - name: "filters" 7722 in: "query" 7723 description: | 7724 A JSON encoded value of the filters (a `map[string][]string`) to 7725 process on the images list. 7726 7727 Available filters: 7728 7729 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7730 - `dangling=true` 7731 - `label=key` or `label="key=value"` of an image label 7732 - `reference`=(`<image-name>[:<tag>]`) 7733 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7734 type: "string" 7735 - name: "digests" 7736 in: "query" 7737 description: "Show digest information as a `RepoDigests` field on each image." 7738 type: "boolean" 7739 default: false 7740 tags: ["Image"] 7741 /build: 7742 post: 7743 summary: "Build an image" 7744 description: | 7745 Build an image from a tar archive with a `Dockerfile` in it. 7746 7747 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/). 7748 7749 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. 7750 7751 The build is canceled if the client drops the connection by quitting or being killed. 7752 operationId: "ImageBuild" 7753 consumes: 7754 - "application/octet-stream" 7755 produces: 7756 - "application/json" 7757 parameters: 7758 - name: "inputStream" 7759 in: "body" 7760 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 7761 schema: 7762 type: "string" 7763 format: "binary" 7764 - name: "dockerfile" 7765 in: "query" 7766 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 7767 type: "string" 7768 default: "Dockerfile" 7769 - name: "t" 7770 in: "query" 7771 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." 7772 type: "string" 7773 - name: "extrahosts" 7774 in: "query" 7775 description: "Extra hosts to add to /etc/hosts" 7776 type: "string" 7777 - name: "remote" 7778 in: "query" 7779 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." 7780 type: "string" 7781 - name: "q" 7782 in: "query" 7783 description: "Suppress verbose build output." 7784 type: "boolean" 7785 default: false 7786 - name: "nocache" 7787 in: "query" 7788 description: "Do not use the cache when building the image." 7789 type: "boolean" 7790 default: false 7791 - name: "cachefrom" 7792 in: "query" 7793 description: "JSON array of images used for build cache resolution." 7794 type: "string" 7795 - name: "pull" 7796 in: "query" 7797 description: "Attempt to pull the image even if an older image exists locally." 7798 type: "string" 7799 - name: "rm" 7800 in: "query" 7801 description: "Remove intermediate containers after a successful build." 7802 type: "boolean" 7803 default: true 7804 - name: "forcerm" 7805 in: "query" 7806 description: "Always remove intermediate containers, even upon failure." 7807 type: "boolean" 7808 default: false 7809 - name: "memory" 7810 in: "query" 7811 description: "Set memory limit for build." 7812 type: "integer" 7813 - name: "memswap" 7814 in: "query" 7815 description: "Total memory (memory + swap). Set as `-1` to disable swap." 7816 type: "integer" 7817 - name: "cpushares" 7818 in: "query" 7819 description: "CPU shares (relative weight)." 7820 type: "integer" 7821 - name: "cpusetcpus" 7822 in: "query" 7823 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 7824 type: "string" 7825 - name: "cpuperiod" 7826 in: "query" 7827 description: "The length of a CPU period in microseconds." 7828 type: "integer" 7829 - name: "cpuquota" 7830 in: "query" 7831 description: "Microseconds of CPU time that the container can get in a CPU period." 7832 type: "integer" 7833 - name: "buildargs" 7834 in: "query" 7835 description: > 7836 JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker 7837 uses the buildargs as the environment context for commands run via the `Dockerfile` RUN 7838 instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for 7839 passing secret values. 7840 7841 7842 For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the 7843 query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. 7844 7845 7846 [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) 7847 type: "string" 7848 - name: "shmsize" 7849 in: "query" 7850 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 7851 type: "integer" 7852 - name: "squash" 7853 in: "query" 7854 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 7855 type: "boolean" 7856 - name: "labels" 7857 in: "query" 7858 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 7859 type: "string" 7860 - name: "networkmode" 7861 in: "query" 7862 description: | 7863 Sets the networking mode for the run commands during build. Supported 7864 standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. 7865 Any other value is taken as a custom network's name or ID to which this 7866 container should connect to. 7867 type: "string" 7868 - name: "Content-type" 7869 in: "header" 7870 type: "string" 7871 enum: 7872 - "application/x-tar" 7873 default: "application/x-tar" 7874 - name: "X-Registry-Config" 7875 in: "header" 7876 description: | 7877 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 7878 7879 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 7880 7881 ``` 7882 { 7883 "docker.example.com": { 7884 "username": "janedoe", 7885 "password": "hunter2" 7886 }, 7887 "https://index.docker.io/v1/": { 7888 "username": "mobydock", 7889 "password": "conta1n3rize14" 7890 } 7891 } 7892 ``` 7893 7894 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. 7895 type: "string" 7896 - name: "platform" 7897 in: "query" 7898 description: "Platform in the format os[/arch[/variant]]" 7899 type: "string" 7900 default: "" 7901 - name: "target" 7902 in: "query" 7903 description: "Target build stage" 7904 type: "string" 7905 default: "" 7906 - name: "outputs" 7907 in: "query" 7908 description: "BuildKit output configuration" 7909 type: "string" 7910 default: "" 7911 responses: 7912 200: 7913 description: "no error" 7914 400: 7915 description: "Bad parameter" 7916 schema: 7917 $ref: "#/definitions/ErrorResponse" 7918 500: 7919 description: "server error" 7920 schema: 7921 $ref: "#/definitions/ErrorResponse" 7922 tags: ["Image"] 7923 /build/prune: 7924 post: 7925 summary: "Delete builder cache" 7926 produces: 7927 - "application/json" 7928 operationId: "BuildPrune" 7929 parameters: 7930 - name: "keep-storage" 7931 in: "query" 7932 description: "Amount of disk space in bytes to keep for cache" 7933 type: "integer" 7934 format: "int64" 7935 - name: "all" 7936 in: "query" 7937 type: "boolean" 7938 description: "Remove all types of build cache" 7939 - name: "filters" 7940 in: "query" 7941 type: "string" 7942 description: | 7943 A JSON encoded value of the filters (a `map[string][]string`) to 7944 process on the list of build cache objects. 7945 7946 Available filters: 7947 7948 - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h') 7949 - `id=<id>` 7950 - `parent=<id>` 7951 - `type=<string>` 7952 - `description=<string>` 7953 - `inuse` 7954 - `shared` 7955 - `private` 7956 responses: 7957 200: 7958 description: "No error" 7959 schema: 7960 type: "object" 7961 title: "BuildPruneResponse" 7962 properties: 7963 CachesDeleted: 7964 type: "array" 7965 items: 7966 description: "ID of build cache object" 7967 type: "string" 7968 SpaceReclaimed: 7969 description: "Disk space reclaimed in bytes" 7970 type: "integer" 7971 format: "int64" 7972 500: 7973 description: "Server error" 7974 schema: 7975 $ref: "#/definitions/ErrorResponse" 7976 tags: ["Image"] 7977 /images/create: 7978 post: 7979 summary: "Create an image" 7980 description: "Create an image by either pulling it from a registry or importing it." 7981 operationId: "ImageCreate" 7982 consumes: 7983 - "text/plain" 7984 - "application/octet-stream" 7985 produces: 7986 - "application/json" 7987 responses: 7988 200: 7989 description: "no error" 7990 404: 7991 description: "repository does not exist or no read access" 7992 schema: 7993 $ref: "#/definitions/ErrorResponse" 7994 500: 7995 description: "server error" 7996 schema: 7997 $ref: "#/definitions/ErrorResponse" 7998 parameters: 7999 - name: "fromImage" 8000 in: "query" 8001 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." 8002 type: "string" 8003 - name: "fromSrc" 8004 in: "query" 8005 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." 8006 type: "string" 8007 - name: "repo" 8008 in: "query" 8009 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." 8010 type: "string" 8011 - name: "tag" 8012 in: "query" 8013 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 8014 type: "string" 8015 - name: "message" 8016 in: "query" 8017 description: "Set commit message for imported image." 8018 type: "string" 8019 - name: "inputImage" 8020 in: "body" 8021 description: "Image content if the value `-` has been specified in fromSrc query parameter" 8022 schema: 8023 type: "string" 8024 required: false 8025 - name: "X-Registry-Auth" 8026 in: "header" 8027 description: | 8028 A base64url-encoded auth configuration. 8029 8030 Refer to the [authentication section](#section/Authentication) for 8031 details. 8032 type: "string" 8033 - name: "changes" 8034 in: "query" 8035 description: | 8036 Apply `Dockerfile` instructions to the image that is created, 8037 for example: `changes=ENV DEBUG=true`. 8038 Note that `ENV DEBUG=true` should be URI component encoded. 8039 8040 Supported `Dockerfile` instructions: 8041 `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` 8042 type: "array" 8043 items: 8044 type: "string" 8045 - name: "platform" 8046 in: "query" 8047 description: "Platform in the format os[/arch[/variant]]" 8048 type: "string" 8049 default: "" 8050 tags: ["Image"] 8051 /images/{name}/json: 8052 get: 8053 summary: "Inspect an image" 8054 description: "Return low-level information about an image." 8055 operationId: "ImageInspect" 8056 produces: 8057 - "application/json" 8058 responses: 8059 200: 8060 description: "No error" 8061 schema: 8062 $ref: "#/definitions/ImageInspect" 8063 404: 8064 description: "No such image" 8065 schema: 8066 $ref: "#/definitions/ErrorResponse" 8067 examples: 8068 application/json: 8069 message: "No such image: someimage (tag: latest)" 8070 500: 8071 description: "Server error" 8072 schema: 8073 $ref: "#/definitions/ErrorResponse" 8074 parameters: 8075 - name: "name" 8076 in: "path" 8077 description: "Image name or id" 8078 type: "string" 8079 required: true 8080 tags: ["Image"] 8081 /images/{name}/history: 8082 get: 8083 summary: "Get the history of an image" 8084 description: "Return parent layers of an image." 8085 operationId: "ImageHistory" 8086 produces: ["application/json"] 8087 responses: 8088 200: 8089 description: "List of image layers" 8090 schema: 8091 type: "array" 8092 items: 8093 type: "object" 8094 x-go-name: HistoryResponseItem 8095 title: "HistoryResponseItem" 8096 description: "individual image layer information in response to ImageHistory operation" 8097 required: [Id, Created, CreatedBy, Tags, Size, Comment] 8098 properties: 8099 Id: 8100 type: "string" 8101 x-nullable: false 8102 Created: 8103 type: "integer" 8104 format: "int64" 8105 x-nullable: false 8106 CreatedBy: 8107 type: "string" 8108 x-nullable: false 8109 Tags: 8110 type: "array" 8111 items: 8112 type: "string" 8113 Size: 8114 type: "integer" 8115 format: "int64" 8116 x-nullable: false 8117 Comment: 8118 type: "string" 8119 x-nullable: false 8120 examples: 8121 application/json: 8122 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 8123 Created: 1398108230 8124 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 8125 Tags: 8126 - "ubuntu:lucid" 8127 - "ubuntu:10.04" 8128 Size: 182964289 8129 Comment: "" 8130 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 8131 Created: 1398108222 8132 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/" 8133 Tags: [] 8134 Size: 0 8135 Comment: "" 8136 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 8137 Created: 1371157430 8138 CreatedBy: "" 8139 Tags: 8140 - "scratch12:latest" 8141 - "scratch:latest" 8142 Size: 0 8143 Comment: "Imported from -" 8144 404: 8145 description: "No such image" 8146 schema: 8147 $ref: "#/definitions/ErrorResponse" 8148 500: 8149 description: "Server error" 8150 schema: 8151 $ref: "#/definitions/ErrorResponse" 8152 parameters: 8153 - name: "name" 8154 in: "path" 8155 description: "Image name or ID" 8156 type: "string" 8157 required: true 8158 tags: ["Image"] 8159 /images/{name}/push: 8160 post: 8161 summary: "Push an image" 8162 description: | 8163 Push an image to a registry. 8164 8165 If you wish to push an image on to a private registry, that image must 8166 already have a tag which references the registry. For example, 8167 `registry.example.com/myimage:latest`. 8168 8169 The push is cancelled if the HTTP connection is closed. 8170 operationId: "ImagePush" 8171 consumes: 8172 - "application/octet-stream" 8173 responses: 8174 200: 8175 description: "No error" 8176 404: 8177 description: "No such image" 8178 schema: 8179 $ref: "#/definitions/ErrorResponse" 8180 500: 8181 description: "Server error" 8182 schema: 8183 $ref: "#/definitions/ErrorResponse" 8184 parameters: 8185 - name: "name" 8186 in: "path" 8187 description: "Image name or ID." 8188 type: "string" 8189 required: true 8190 - name: "tag" 8191 in: "query" 8192 description: "The tag to associate with the image on the registry." 8193 type: "string" 8194 - name: "X-Registry-Auth" 8195 in: "header" 8196 description: | 8197 A base64url-encoded auth configuration. 8198 8199 Refer to the [authentication section](#section/Authentication) for 8200 details. 8201 type: "string" 8202 required: true 8203 tags: ["Image"] 8204 /images/{name}/tag: 8205 post: 8206 summary: "Tag an image" 8207 description: "Tag an image so that it becomes part of a repository." 8208 operationId: "ImageTag" 8209 responses: 8210 201: 8211 description: "No error" 8212 400: 8213 description: "Bad parameter" 8214 schema: 8215 $ref: "#/definitions/ErrorResponse" 8216 404: 8217 description: "No such image" 8218 schema: 8219 $ref: "#/definitions/ErrorResponse" 8220 409: 8221 description: "Conflict" 8222 schema: 8223 $ref: "#/definitions/ErrorResponse" 8224 500: 8225 description: "Server error" 8226 schema: 8227 $ref: "#/definitions/ErrorResponse" 8228 parameters: 8229 - name: "name" 8230 in: "path" 8231 description: "Image name or ID to tag." 8232 type: "string" 8233 required: true 8234 - name: "repo" 8235 in: "query" 8236 description: "The repository to tag in. For example, `someuser/someimage`." 8237 type: "string" 8238 - name: "tag" 8239 in: "query" 8240 description: "The name of the new tag." 8241 type: "string" 8242 tags: ["Image"] 8243 /images/{name}: 8244 delete: 8245 summary: "Remove an image" 8246 description: | 8247 Remove an image, along with any untagged parent images that were 8248 referenced by that image. 8249 8250 Images can't be removed if they have descendant images, are being 8251 used by a running container or are being used by a build. 8252 operationId: "ImageDelete" 8253 produces: ["application/json"] 8254 responses: 8255 200: 8256 description: "The image was deleted successfully" 8257 schema: 8258 type: "array" 8259 items: 8260 $ref: "#/definitions/ImageDeleteResponseItem" 8261 examples: 8262 application/json: 8263 - Untagged: "3e2f21a89f" 8264 - Deleted: "3e2f21a89f" 8265 - Deleted: "53b4f83ac9" 8266 404: 8267 description: "No such image" 8268 schema: 8269 $ref: "#/definitions/ErrorResponse" 8270 409: 8271 description: "Conflict" 8272 schema: 8273 $ref: "#/definitions/ErrorResponse" 8274 500: 8275 description: "Server error" 8276 schema: 8277 $ref: "#/definitions/ErrorResponse" 8278 parameters: 8279 - name: "name" 8280 in: "path" 8281 description: "Image name or ID" 8282 type: "string" 8283 required: true 8284 - name: "force" 8285 in: "query" 8286 description: "Remove the image even if it is being used by stopped containers or has other tags" 8287 type: "boolean" 8288 default: false 8289 - name: "noprune" 8290 in: "query" 8291 description: "Do not delete untagged parent images" 8292 type: "boolean" 8293 default: false 8294 tags: ["Image"] 8295 /images/search: 8296 get: 8297 summary: "Search images" 8298 description: "Search for an image on Docker Hub." 8299 operationId: "ImageSearch" 8300 produces: 8301 - "application/json" 8302 responses: 8303 200: 8304 description: "No error" 8305 schema: 8306 type: "array" 8307 items: 8308 type: "object" 8309 title: "ImageSearchResponseItem" 8310 properties: 8311 description: 8312 type: "string" 8313 is_official: 8314 type: "boolean" 8315 is_automated: 8316 type: "boolean" 8317 name: 8318 type: "string" 8319 star_count: 8320 type: "integer" 8321 examples: 8322 application/json: 8323 - description: "" 8324 is_official: false 8325 is_automated: false 8326 name: "wma55/u1210sshd" 8327 star_count: 0 8328 - description: "" 8329 is_official: false 8330 is_automated: false 8331 name: "jdswinbank/sshd" 8332 star_count: 0 8333 - description: "" 8334 is_official: false 8335 is_automated: false 8336 name: "vgauthier/sshd" 8337 star_count: 0 8338 500: 8339 description: "Server error" 8340 schema: 8341 $ref: "#/definitions/ErrorResponse" 8342 parameters: 8343 - name: "term" 8344 in: "query" 8345 description: "Term to search" 8346 type: "string" 8347 required: true 8348 - name: "limit" 8349 in: "query" 8350 description: "Maximum number of results to return" 8351 type: "integer" 8352 - name: "filters" 8353 in: "query" 8354 description: | 8355 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 8356 8357 - `is-automated=(true|false)` 8358 - `is-official=(true|false)` 8359 - `stars=<number>` Matches images that has at least 'number' stars. 8360 type: "string" 8361 tags: ["Image"] 8362 /images/prune: 8363 post: 8364 summary: "Delete unused images" 8365 produces: 8366 - "application/json" 8367 operationId: "ImagePrune" 8368 parameters: 8369 - name: "filters" 8370 in: "query" 8371 description: | 8372 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 8373 8374 - `dangling=<boolean>` When set to `true` (or `1`), prune only 8375 unused *and* untagged images. When set to `false` 8376 (or `0`), all unused images are pruned. 8377 - `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. 8378 - `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. 8379 type: "string" 8380 responses: 8381 200: 8382 description: "No error" 8383 schema: 8384 type: "object" 8385 title: "ImagePruneResponse" 8386 properties: 8387 ImagesDeleted: 8388 description: "Images that were deleted" 8389 type: "array" 8390 items: 8391 $ref: "#/definitions/ImageDeleteResponseItem" 8392 SpaceReclaimed: 8393 description: "Disk space reclaimed in bytes" 8394 type: "integer" 8395 format: "int64" 8396 500: 8397 description: "Server error" 8398 schema: 8399 $ref: "#/definitions/ErrorResponse" 8400 tags: ["Image"] 8401 /auth: 8402 post: 8403 summary: "Check auth configuration" 8404 description: | 8405 Validate credentials for a registry and, if available, get an identity 8406 token for accessing the registry without password. 8407 operationId: "SystemAuth" 8408 consumes: ["application/json"] 8409 produces: ["application/json"] 8410 responses: 8411 200: 8412 description: "An identity token was generated successfully." 8413 schema: 8414 type: "object" 8415 title: "SystemAuthResponse" 8416 required: [Status] 8417 properties: 8418 Status: 8419 description: "The status of the authentication" 8420 type: "string" 8421 x-nullable: false 8422 IdentityToken: 8423 description: "An opaque token used to authenticate a user after a successful login" 8424 type: "string" 8425 x-nullable: false 8426 examples: 8427 application/json: 8428 Status: "Login Succeeded" 8429 IdentityToken: "9cbaf023786cd7..." 8430 204: 8431 description: "No error" 8432 401: 8433 description: "Auth error" 8434 schema: 8435 $ref: "#/definitions/ErrorResponse" 8436 500: 8437 description: "Server error" 8438 schema: 8439 $ref: "#/definitions/ErrorResponse" 8440 parameters: 8441 - name: "authConfig" 8442 in: "body" 8443 description: "Authentication to check" 8444 schema: 8445 $ref: "#/definitions/AuthConfig" 8446 tags: ["System"] 8447 /info: 8448 get: 8449 summary: "Get system information" 8450 operationId: "SystemInfo" 8451 produces: 8452 - "application/json" 8453 responses: 8454 200: 8455 description: "No error" 8456 schema: 8457 $ref: "#/definitions/SystemInfo" 8458 500: 8459 description: "Server error" 8460 schema: 8461 $ref: "#/definitions/ErrorResponse" 8462 tags: ["System"] 8463 /version: 8464 get: 8465 summary: "Get version" 8466 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 8467 operationId: "SystemVersion" 8468 produces: ["application/json"] 8469 responses: 8470 200: 8471 description: "no error" 8472 schema: 8473 $ref: "#/definitions/SystemVersion" 8474 500: 8475 description: "server error" 8476 schema: 8477 $ref: "#/definitions/ErrorResponse" 8478 tags: ["System"] 8479 /_ping: 8480 get: 8481 summary: "Ping" 8482 description: "This is a dummy endpoint you can use to test if the server is accessible." 8483 operationId: "SystemPing" 8484 produces: ["text/plain"] 8485 responses: 8486 200: 8487 description: "no error" 8488 schema: 8489 type: "string" 8490 example: "OK" 8491 headers: 8492 API-Version: 8493 type: "string" 8494 description: "Max API Version the server supports" 8495 Builder-Version: 8496 type: "string" 8497 description: "Default version of docker image builder" 8498 Docker-Experimental: 8499 type: "boolean" 8500 description: "If the server is running with experimental mode enabled" 8501 Cache-Control: 8502 type: "string" 8503 default: "no-cache, no-store, must-revalidate" 8504 Pragma: 8505 type: "string" 8506 default: "no-cache" 8507 500: 8508 description: "server error" 8509 schema: 8510 $ref: "#/definitions/ErrorResponse" 8511 headers: 8512 Cache-Control: 8513 type: "string" 8514 default: "no-cache, no-store, must-revalidate" 8515 Pragma: 8516 type: "string" 8517 default: "no-cache" 8518 tags: ["System"] 8519 head: 8520 summary: "Ping" 8521 description: "This is a dummy endpoint you can use to test if the server is accessible." 8522 operationId: "SystemPingHead" 8523 produces: ["text/plain"] 8524 responses: 8525 200: 8526 description: "no error" 8527 schema: 8528 type: "string" 8529 example: "(empty)" 8530 headers: 8531 API-Version: 8532 type: "string" 8533 description: "Max API Version the server supports" 8534 Builder-Version: 8535 type: "string" 8536 description: "Default version of docker image builder" 8537 Docker-Experimental: 8538 type: "boolean" 8539 description: "If the server is running with experimental mode enabled" 8540 Cache-Control: 8541 type: "string" 8542 default: "no-cache, no-store, must-revalidate" 8543 Pragma: 8544 type: "string" 8545 default: "no-cache" 8546 500: 8547 description: "server error" 8548 schema: 8549 $ref: "#/definitions/ErrorResponse" 8550 tags: ["System"] 8551 /commit: 8552 post: 8553 summary: "Create a new image from a container" 8554 operationId: "ImageCommit" 8555 consumes: 8556 - "application/json" 8557 produces: 8558 - "application/json" 8559 responses: 8560 201: 8561 description: "no error" 8562 schema: 8563 $ref: "#/definitions/IdResponse" 8564 404: 8565 description: "no such container" 8566 schema: 8567 $ref: "#/definitions/ErrorResponse" 8568 examples: 8569 application/json: 8570 message: "No such container: c2ada9df5af8" 8571 500: 8572 description: "server error" 8573 schema: 8574 $ref: "#/definitions/ErrorResponse" 8575 parameters: 8576 - name: "containerConfig" 8577 in: "body" 8578 description: "The container configuration" 8579 schema: 8580 $ref: "#/definitions/ContainerConfig" 8581 - name: "container" 8582 in: "query" 8583 description: "The ID or name of the container to commit" 8584 type: "string" 8585 - name: "repo" 8586 in: "query" 8587 description: "Repository name for the created image" 8588 type: "string" 8589 - name: "tag" 8590 in: "query" 8591 description: "Tag name for the create image" 8592 type: "string" 8593 - name: "comment" 8594 in: "query" 8595 description: "Commit message" 8596 type: "string" 8597 - name: "author" 8598 in: "query" 8599 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 8600 type: "string" 8601 - name: "pause" 8602 in: "query" 8603 description: "Whether to pause the container before committing" 8604 type: "boolean" 8605 default: true 8606 - name: "changes" 8607 in: "query" 8608 description: "`Dockerfile` instructions to apply while committing" 8609 type: "string" 8610 tags: ["Image"] 8611 /events: 8612 get: 8613 summary: "Monitor events" 8614 description: | 8615 Stream real-time events from the server. 8616 8617 Various objects within Docker report events when something happens to them. 8618 8619 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` 8620 8621 Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` 8622 8623 Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` 8624 8625 Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` 8626 8627 The Docker daemon reports these events: `reload` 8628 8629 Services report these events: `create`, `update`, and `remove` 8630 8631 Nodes report these events: `create`, `update`, and `remove` 8632 8633 Secrets report these events: `create`, `update`, and `remove` 8634 8635 Configs report these events: `create`, `update`, and `remove` 8636 8637 The Builder reports `prune` events 8638 8639 operationId: "SystemEvents" 8640 produces: 8641 - "application/json" 8642 responses: 8643 200: 8644 description: "no error" 8645 schema: 8646 $ref: "#/definitions/EventMessage" 8647 400: 8648 description: "bad parameter" 8649 schema: 8650 $ref: "#/definitions/ErrorResponse" 8651 500: 8652 description: "server error" 8653 schema: 8654 $ref: "#/definitions/ErrorResponse" 8655 parameters: 8656 - name: "since" 8657 in: "query" 8658 description: "Show events created since this timestamp then stream new events." 8659 type: "string" 8660 - name: "until" 8661 in: "query" 8662 description: "Show events created until this timestamp then stop streaming." 8663 type: "string" 8664 - name: "filters" 8665 in: "query" 8666 description: | 8667 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 8668 8669 - `config=<string>` config name or ID 8670 - `container=<string>` container name or ID 8671 - `daemon=<string>` daemon name or ID 8672 - `event=<string>` event type 8673 - `image=<string>` image name or ID 8674 - `label=<string>` image or container label 8675 - `network=<string>` network name or ID 8676 - `node=<string>` node ID 8677 - `plugin`=<string> plugin name or ID 8678 - `scope`=<string> local or swarm 8679 - `secret=<string>` secret name or ID 8680 - `service=<string>` service name or ID 8681 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` 8682 - `volume=<string>` volume name 8683 type: "string" 8684 tags: ["System"] 8685 /system/df: 8686 get: 8687 summary: "Get data usage information" 8688 operationId: "SystemDataUsage" 8689 responses: 8690 200: 8691 description: "no error" 8692 schema: 8693 type: "object" 8694 title: "SystemDataUsageResponse" 8695 properties: 8696 LayersSize: 8697 type: "integer" 8698 format: "int64" 8699 Images: 8700 type: "array" 8701 items: 8702 $ref: "#/definitions/ImageSummary" 8703 Containers: 8704 type: "array" 8705 items: 8706 $ref: "#/definitions/ContainerSummary" 8707 Volumes: 8708 type: "array" 8709 items: 8710 $ref: "#/definitions/Volume" 8711 BuildCache: 8712 type: "array" 8713 items: 8714 $ref: "#/definitions/BuildCache" 8715 example: 8716 LayersSize: 1092588 8717 Images: 8718 - 8719 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8720 ParentId: "" 8721 RepoTags: 8722 - "busybox:latest" 8723 RepoDigests: 8724 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 8725 Created: 1466724217 8726 Size: 1092588 8727 SharedSize: 0 8728 VirtualSize: 1092588 8729 Labels: {} 8730 Containers: 1 8731 Containers: 8732 - 8733 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 8734 Names: 8735 - "/top" 8736 Image: "busybox" 8737 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8738 Command: "top" 8739 Created: 1472592424 8740 Ports: [] 8741 SizeRootFs: 1092588 8742 Labels: {} 8743 State: "exited" 8744 Status: "Exited (0) 56 minutes ago" 8745 HostConfig: 8746 NetworkMode: "default" 8747 NetworkSettings: 8748 Networks: 8749 bridge: 8750 IPAMConfig: null 8751 Links: null 8752 Aliases: null 8753 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 8754 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 8755 Gateway: "172.18.0.1" 8756 IPAddress: "172.18.0.2" 8757 IPPrefixLen: 16 8758 IPv6Gateway: "" 8759 GlobalIPv6Address: "" 8760 GlobalIPv6PrefixLen: 0 8761 MacAddress: "02:42:ac:12:00:02" 8762 Mounts: [] 8763 Volumes: 8764 - 8765 Name: "my-volume" 8766 Driver: "local" 8767 Mountpoint: "/var/lib/docker/volumes/my-volume/_data" 8768 Labels: null 8769 Scope: "local" 8770 Options: null 8771 UsageData: 8772 Size: 10920104 8773 RefCount: 2 8774 BuildCache: 8775 - 8776 ID: "hw53o5aio51xtltp5xjp8v7fx" 8777 Parent: "" 8778 Type: "regular" 8779 Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" 8780 InUse: false 8781 Shared: true 8782 Size: 0 8783 CreatedAt: "2021-06-28T13:31:01.474619385Z" 8784 LastUsedAt: "2021-07-07T22:02:32.738075951Z" 8785 UsageCount: 26 8786 - 8787 ID: "ndlpt0hhvkqcdfkputsk4cq9c" 8788 Parent: "ndlpt0hhvkqcdfkputsk4cq9c" 8789 Type: "regular" 8790 Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" 8791 InUse: false 8792 Shared: true 8793 Size: 51 8794 CreatedAt: "2021-06-28T13:31:03.002625487Z" 8795 LastUsedAt: "2021-07-07T22:02:32.773909517Z" 8796 UsageCount: 26 8797 500: 8798 description: "server error" 8799 schema: 8800 $ref: "#/definitions/ErrorResponse" 8801 tags: ["System"] 8802 /images/{name}/get: 8803 get: 8804 summary: "Export an image" 8805 description: | 8806 Get a tarball containing all images and metadata for a repository. 8807 8808 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. 8809 8810 ### Image tarball format 8811 8812 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 8813 8814 - `VERSION`: currently `1.0` - the file format version 8815 - `json`: detailed layer information, similar to `docker inspect layer_id` 8816 - `layer.tar`: A tarfile containing the filesystem changes in this layer 8817 8818 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 8819 8820 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. 8821 8822 ```json 8823 { 8824 "hello-world": { 8825 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 8826 } 8827 } 8828 ``` 8829 operationId: "ImageGet" 8830 produces: 8831 - "application/x-tar" 8832 responses: 8833 200: 8834 description: "no error" 8835 schema: 8836 type: "string" 8837 format: "binary" 8838 500: 8839 description: "server error" 8840 schema: 8841 $ref: "#/definitions/ErrorResponse" 8842 parameters: 8843 - name: "name" 8844 in: "path" 8845 description: "Image name or ID" 8846 type: "string" 8847 required: true 8848 tags: ["Image"] 8849 /images/get: 8850 get: 8851 summary: "Export several images" 8852 description: | 8853 Get a tarball containing all images and metadata for several image 8854 repositories. 8855 8856 For each value of the `names` parameter: if it is a specific name and 8857 tag (e.g. `ubuntu:latest`), then only that image (and its parents) are 8858 returned; if it is an image ID, similarly only that image (and its parents) 8859 are returned and there would be no names referenced in the 'repositories' 8860 file for this image ID. 8861 8862 For details on the format, see the [export image endpoint](#operation/ImageGet). 8863 operationId: "ImageGetAll" 8864 produces: 8865 - "application/x-tar" 8866 responses: 8867 200: 8868 description: "no error" 8869 schema: 8870 type: "string" 8871 format: "binary" 8872 500: 8873 description: "server error" 8874 schema: 8875 $ref: "#/definitions/ErrorResponse" 8876 parameters: 8877 - name: "names" 8878 in: "query" 8879 description: "Image names to filter by" 8880 type: "array" 8881 items: 8882 type: "string" 8883 tags: ["Image"] 8884 /images/load: 8885 post: 8886 summary: "Import images" 8887 description: | 8888 Load a set of images and tags into a repository. 8889 8890 For details on the format, see the [export image endpoint](#operation/ImageGet). 8891 operationId: "ImageLoad" 8892 consumes: 8893 - "application/x-tar" 8894 produces: 8895 - "application/json" 8896 responses: 8897 200: 8898 description: "no error" 8899 500: 8900 description: "server error" 8901 schema: 8902 $ref: "#/definitions/ErrorResponse" 8903 parameters: 8904 - name: "imagesTarball" 8905 in: "body" 8906 description: "Tar archive containing images" 8907 schema: 8908 type: "string" 8909 format: "binary" 8910 - name: "quiet" 8911 in: "query" 8912 description: "Suppress progress details during load." 8913 type: "boolean" 8914 default: false 8915 tags: ["Image"] 8916 /containers/{id}/exec: 8917 post: 8918 summary: "Create an exec instance" 8919 description: "Run a command inside a running container." 8920 operationId: "ContainerExec" 8921 consumes: 8922 - "application/json" 8923 produces: 8924 - "application/json" 8925 responses: 8926 201: 8927 description: "no error" 8928 schema: 8929 $ref: "#/definitions/IdResponse" 8930 404: 8931 description: "no such container" 8932 schema: 8933 $ref: "#/definitions/ErrorResponse" 8934 examples: 8935 application/json: 8936 message: "No such container: c2ada9df5af8" 8937 409: 8938 description: "container is paused" 8939 schema: 8940 $ref: "#/definitions/ErrorResponse" 8941 500: 8942 description: "Server error" 8943 schema: 8944 $ref: "#/definitions/ErrorResponse" 8945 parameters: 8946 - name: "execConfig" 8947 in: "body" 8948 description: "Exec configuration" 8949 schema: 8950 type: "object" 8951 title: "ExecConfig" 8952 properties: 8953 AttachStdin: 8954 type: "boolean" 8955 description: "Attach to `stdin` of the exec command." 8956 AttachStdout: 8957 type: "boolean" 8958 description: "Attach to `stdout` of the exec command." 8959 AttachStderr: 8960 type: "boolean" 8961 description: "Attach to `stderr` of the exec command." 8962 DetachKeys: 8963 type: "string" 8964 description: | 8965 Override the key sequence for detaching a container. Format is 8966 a single character `[a-Z]` or `ctrl-<value>` where `<value>` 8967 is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. 8968 Tty: 8969 type: "boolean" 8970 description: "Allocate a pseudo-TTY." 8971 Env: 8972 description: | 8973 A list of environment variables in the form `["VAR=value", ...]`. 8974 type: "array" 8975 items: 8976 type: "string" 8977 Cmd: 8978 type: "array" 8979 description: "Command to run, as a string or array of strings." 8980 items: 8981 type: "string" 8982 Privileged: 8983 type: "boolean" 8984 description: "Runs the exec process with extended privileges." 8985 default: false 8986 User: 8987 type: "string" 8988 description: | 8989 The user, and optionally, group to run the exec process inside 8990 the container. Format is one of: `user`, `user:group`, `uid`, 8991 or `uid:gid`. 8992 WorkingDir: 8993 type: "string" 8994 description: | 8995 The working directory for the exec process inside the container. 8996 example: 8997 AttachStdin: false 8998 AttachStdout: true 8999 AttachStderr: true 9000 DetachKeys: "ctrl-p,ctrl-q" 9001 Tty: false 9002 Cmd: 9003 - "date" 9004 Env: 9005 - "FOO=bar" 9006 - "BAZ=quux" 9007 required: true 9008 - name: "id" 9009 in: "path" 9010 description: "ID or name of container" 9011 type: "string" 9012 required: true 9013 tags: ["Exec"] 9014 /exec/{id}/start: 9015 post: 9016 summary: "Start an exec instance" 9017 description: | 9018 Starts a previously set up exec instance. If detach is true, this endpoint 9019 returns immediately after starting the command. Otherwise, it sets up an 9020 interactive session with the command. 9021 operationId: "ExecStart" 9022 consumes: 9023 - "application/json" 9024 produces: 9025 - "application/vnd.docker.raw-stream" 9026 responses: 9027 200: 9028 description: "No error" 9029 404: 9030 description: "No such exec instance" 9031 schema: 9032 $ref: "#/definitions/ErrorResponse" 9033 409: 9034 description: "Container is stopped or paused" 9035 schema: 9036 $ref: "#/definitions/ErrorResponse" 9037 parameters: 9038 - name: "execStartConfig" 9039 in: "body" 9040 schema: 9041 type: "object" 9042 title: "ExecStartConfig" 9043 properties: 9044 Detach: 9045 type: "boolean" 9046 description: "Detach from the command." 9047 Tty: 9048 type: "boolean" 9049 description: "Allocate a pseudo-TTY." 9050 example: 9051 Detach: false 9052 Tty: false 9053 - name: "id" 9054 in: "path" 9055 description: "Exec instance ID" 9056 required: true 9057 type: "string" 9058 tags: ["Exec"] 9059 /exec/{id}/resize: 9060 post: 9061 summary: "Resize an exec instance" 9062 description: | 9063 Resize the TTY session used by an exec instance. This endpoint only works 9064 if `tty` was specified as part of creating and starting the exec instance. 9065 operationId: "ExecResize" 9066 responses: 9067 200: 9068 description: "No error" 9069 400: 9070 description: "bad parameter" 9071 schema: 9072 $ref: "#/definitions/ErrorResponse" 9073 404: 9074 description: "No such exec instance" 9075 schema: 9076 $ref: "#/definitions/ErrorResponse" 9077 500: 9078 description: "Server error" 9079 schema: 9080 $ref: "#/definitions/ErrorResponse" 9081 parameters: 9082 - name: "id" 9083 in: "path" 9084 description: "Exec instance ID" 9085 required: true 9086 type: "string" 9087 - name: "h" 9088 in: "query" 9089 description: "Height of the TTY session in characters" 9090 type: "integer" 9091 - name: "w" 9092 in: "query" 9093 description: "Width of the TTY session in characters" 9094 type: "integer" 9095 tags: ["Exec"] 9096 /exec/{id}/json: 9097 get: 9098 summary: "Inspect an exec instance" 9099 description: "Return low-level information about an exec instance." 9100 operationId: "ExecInspect" 9101 produces: 9102 - "application/json" 9103 responses: 9104 200: 9105 description: "No error" 9106 schema: 9107 type: "object" 9108 title: "ExecInspectResponse" 9109 properties: 9110 CanRemove: 9111 type: "boolean" 9112 DetachKeys: 9113 type: "string" 9114 ID: 9115 type: "string" 9116 Running: 9117 type: "boolean" 9118 ExitCode: 9119 type: "integer" 9120 ProcessConfig: 9121 $ref: "#/definitions/ProcessConfig" 9122 OpenStdin: 9123 type: "boolean" 9124 OpenStderr: 9125 type: "boolean" 9126 OpenStdout: 9127 type: "boolean" 9128 ContainerID: 9129 type: "string" 9130 Pid: 9131 type: "integer" 9132 description: "The system process ID for the exec process." 9133 examples: 9134 application/json: 9135 CanRemove: false 9136 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 9137 DetachKeys: "" 9138 ExitCode: 2 9139 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 9140 OpenStderr: true 9141 OpenStdin: true 9142 OpenStdout: true 9143 ProcessConfig: 9144 arguments: 9145 - "-c" 9146 - "exit 2" 9147 entrypoint: "sh" 9148 privileged: false 9149 tty: true 9150 user: "1000" 9151 Running: false 9152 Pid: 42000 9153 404: 9154 description: "No such exec instance" 9155 schema: 9156 $ref: "#/definitions/ErrorResponse" 9157 500: 9158 description: "Server error" 9159 schema: 9160 $ref: "#/definitions/ErrorResponse" 9161 parameters: 9162 - name: "id" 9163 in: "path" 9164 description: "Exec instance ID" 9165 required: true 9166 type: "string" 9167 tags: ["Exec"] 9168 9169 /volumes: 9170 get: 9171 summary: "List volumes" 9172 operationId: "VolumeList" 9173 produces: ["application/json"] 9174 responses: 9175 200: 9176 description: "Summary volume data that matches the query" 9177 schema: 9178 $ref: "#/definitions/VolumeListResponse" 9179 500: 9180 description: "Server error" 9181 schema: 9182 $ref: "#/definitions/ErrorResponse" 9183 parameters: 9184 - name: "filters" 9185 in: "query" 9186 description: | 9187 JSON encoded value of the filters (a `map[string][]string`) to 9188 process on the volumes list. Available filters: 9189 9190 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9191 volumes that are not in use by a container. When set to `false` 9192 (or `0`), only volumes that are in use by one or more 9193 containers are returned. 9194 - `driver=<volume-driver-name>` Matches volumes based on their driver. 9195 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 9196 the presence of a `label` alone or a `label` and a value. 9197 - `name=<volume-name>` Matches all or part of a volume name. 9198 type: "string" 9199 format: "json" 9200 tags: ["Volume"] 9201 9202 /volumes/create: 9203 post: 9204 summary: "Create a volume" 9205 operationId: "VolumeCreate" 9206 consumes: ["application/json"] 9207 produces: ["application/json"] 9208 responses: 9209 201: 9210 description: "The volume was created successfully" 9211 schema: 9212 $ref: "#/definitions/Volume" 9213 500: 9214 description: "Server error" 9215 schema: 9216 $ref: "#/definitions/ErrorResponse" 9217 parameters: 9218 - name: "volumeConfig" 9219 in: "body" 9220 required: true 9221 description: "Volume configuration" 9222 schema: 9223 $ref: "#/definitions/VolumeCreateOptions" 9224 tags: ["Volume"] 9225 9226 /volumes/{name}: 9227 get: 9228 summary: "Inspect a volume" 9229 operationId: "VolumeInspect" 9230 produces: ["application/json"] 9231 responses: 9232 200: 9233 description: "No error" 9234 schema: 9235 $ref: "#/definitions/Volume" 9236 404: 9237 description: "No such volume" 9238 schema: 9239 $ref: "#/definitions/ErrorResponse" 9240 500: 9241 description: "Server error" 9242 schema: 9243 $ref: "#/definitions/ErrorResponse" 9244 parameters: 9245 - name: "name" 9246 in: "path" 9247 required: true 9248 description: "Volume name or ID" 9249 type: "string" 9250 tags: ["Volume"] 9251 9252 delete: 9253 summary: "Remove a volume" 9254 description: "Instruct the driver to remove the volume." 9255 operationId: "VolumeDelete" 9256 responses: 9257 204: 9258 description: "The volume was removed" 9259 404: 9260 description: "No such volume or volume driver" 9261 schema: 9262 $ref: "#/definitions/ErrorResponse" 9263 409: 9264 description: "Volume is in use and cannot be removed" 9265 schema: 9266 $ref: "#/definitions/ErrorResponse" 9267 500: 9268 description: "Server error" 9269 schema: 9270 $ref: "#/definitions/ErrorResponse" 9271 parameters: 9272 - name: "name" 9273 in: "path" 9274 required: true 9275 description: "Volume name or ID" 9276 type: "string" 9277 - name: "force" 9278 in: "query" 9279 description: "Force the removal of the volume" 9280 type: "boolean" 9281 default: false 9282 tags: ["Volume"] 9283 9284 /volumes/prune: 9285 post: 9286 summary: "Delete unused volumes" 9287 produces: 9288 - "application/json" 9289 operationId: "VolumePrune" 9290 parameters: 9291 - name: "filters" 9292 in: "query" 9293 description: | 9294 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 9295 9296 Available filters: 9297 - `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. 9298 type: "string" 9299 responses: 9300 200: 9301 description: "No error" 9302 schema: 9303 type: "object" 9304 title: "VolumePruneResponse" 9305 properties: 9306 VolumesDeleted: 9307 description: "Volumes that were deleted" 9308 type: "array" 9309 items: 9310 type: "string" 9311 SpaceReclaimed: 9312 description: "Disk space reclaimed in bytes" 9313 type: "integer" 9314 format: "int64" 9315 500: 9316 description: "Server error" 9317 schema: 9318 $ref: "#/definitions/ErrorResponse" 9319 tags: ["Volume"] 9320 /networks: 9321 get: 9322 summary: "List networks" 9323 description: | 9324 Returns a list of networks. For details on the format, see the 9325 [network inspect endpoint](#operation/NetworkInspect). 9326 9327 Note that it uses a different, smaller representation of a network than 9328 inspecting a single network. For example, the list of containers attached 9329 to the network is not propagated in API versions 1.28 and up. 9330 operationId: "NetworkList" 9331 produces: 9332 - "application/json" 9333 responses: 9334 200: 9335 description: "No error" 9336 schema: 9337 type: "array" 9338 items: 9339 $ref: "#/definitions/Network" 9340 examples: 9341 application/json: 9342 - Name: "bridge" 9343 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 9344 Created: "2016-10-19T06:21:00.416543526Z" 9345 Scope: "local" 9346 Driver: "bridge" 9347 EnableIPv6: false 9348 Internal: false 9349 Attachable: false 9350 Ingress: false 9351 IPAM: 9352 Driver: "default" 9353 Config: 9354 - 9355 Subnet: "172.17.0.0/16" 9356 Options: 9357 com.docker.network.bridge.default_bridge: "true" 9358 com.docker.network.bridge.enable_icc: "true" 9359 com.docker.network.bridge.enable_ip_masquerade: "true" 9360 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 9361 com.docker.network.bridge.name: "docker0" 9362 com.docker.network.driver.mtu: "1500" 9363 - Name: "none" 9364 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 9365 Created: "0001-01-01T00:00:00Z" 9366 Scope: "local" 9367 Driver: "null" 9368 EnableIPv6: false 9369 Internal: false 9370 Attachable: false 9371 Ingress: false 9372 IPAM: 9373 Driver: "default" 9374 Config: [] 9375 Containers: {} 9376 Options: {} 9377 - Name: "host" 9378 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 9379 Created: "0001-01-01T00:00:00Z" 9380 Scope: "local" 9381 Driver: "host" 9382 EnableIPv6: false 9383 Internal: false 9384 Attachable: false 9385 Ingress: false 9386 IPAM: 9387 Driver: "default" 9388 Config: [] 9389 Containers: {} 9390 Options: {} 9391 500: 9392 description: "Server error" 9393 schema: 9394 $ref: "#/definitions/ErrorResponse" 9395 parameters: 9396 - name: "filters" 9397 in: "query" 9398 description: | 9399 JSON encoded value of the filters (a `map[string][]string`) to process 9400 on the networks list. 9401 9402 Available filters: 9403 9404 - `dangling=<boolean>` When set to `true` (or `1`), returns all 9405 networks that are not in use by a container. When set to `false` 9406 (or `0`), only networks that are in use by one or more 9407 containers are returned. 9408 - `driver=<driver-name>` Matches a network's driver. 9409 - `id=<network-id>` Matches all or part of a network ID. 9410 - `label=<key>` or `label=<key>=<value>` of a network label. 9411 - `name=<network-name>` Matches all or part of a network name. 9412 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 9413 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 9414 type: "string" 9415 tags: ["Network"] 9416 9417 /networks/{id}: 9418 get: 9419 summary: "Inspect a network" 9420 operationId: "NetworkInspect" 9421 produces: 9422 - "application/json" 9423 responses: 9424 200: 9425 description: "No error" 9426 schema: 9427 $ref: "#/definitions/Network" 9428 404: 9429 description: "Network not found" 9430 schema: 9431 $ref: "#/definitions/ErrorResponse" 9432 500: 9433 description: "Server error" 9434 schema: 9435 $ref: "#/definitions/ErrorResponse" 9436 parameters: 9437 - name: "id" 9438 in: "path" 9439 description: "Network ID or name" 9440 required: true 9441 type: "string" 9442 - name: "verbose" 9443 in: "query" 9444 description: "Detailed inspect output for troubleshooting" 9445 type: "boolean" 9446 default: false 9447 - name: "scope" 9448 in: "query" 9449 description: "Filter the network by scope (swarm, global, or local)" 9450 type: "string" 9451 tags: ["Network"] 9452 9453 delete: 9454 summary: "Remove a network" 9455 operationId: "NetworkDelete" 9456 responses: 9457 204: 9458 description: "No error" 9459 403: 9460 description: "operation not supported for pre-defined networks" 9461 schema: 9462 $ref: "#/definitions/ErrorResponse" 9463 404: 9464 description: "no such network" 9465 schema: 9466 $ref: "#/definitions/ErrorResponse" 9467 500: 9468 description: "Server error" 9469 schema: 9470 $ref: "#/definitions/ErrorResponse" 9471 parameters: 9472 - name: "id" 9473 in: "path" 9474 description: "Network ID or name" 9475 required: true 9476 type: "string" 9477 tags: ["Network"] 9478 9479 /networks/create: 9480 post: 9481 summary: "Create a network" 9482 operationId: "NetworkCreate" 9483 consumes: 9484 - "application/json" 9485 produces: 9486 - "application/json" 9487 responses: 9488 201: 9489 description: "No error" 9490 schema: 9491 type: "object" 9492 title: "NetworkCreateResponse" 9493 properties: 9494 Id: 9495 description: "The ID of the created network." 9496 type: "string" 9497 Warning: 9498 type: "string" 9499 example: 9500 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 9501 Warning: "" 9502 400: 9503 description: "bad parameter" 9504 schema: 9505 $ref: "#/definitions/ErrorResponse" 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 - name: "force" 9971 in: "query" 9972 description: | 9973 Force disable a plugin even if still in use. 9974 required: false 9975 type: "boolean" 9976 tags: ["Plugin"] 9977 /plugins/{name}/upgrade: 9978 post: 9979 summary: "Upgrade a plugin" 9980 operationId: "PluginUpgrade" 9981 responses: 9982 204: 9983 description: "no error" 9984 404: 9985 description: "plugin not installed" 9986 schema: 9987 $ref: "#/definitions/ErrorResponse" 9988 500: 9989 description: "server error" 9990 schema: 9991 $ref: "#/definitions/ErrorResponse" 9992 parameters: 9993 - name: "name" 9994 in: "path" 9995 description: | 9996 The name of the plugin. The `:latest` tag is optional, and is the 9997 default if omitted. 9998 required: true 9999 type: "string" 10000 - name: "remote" 10001 in: "query" 10002 description: | 10003 Remote reference to upgrade to. 10004 10005 The `:latest` tag is optional, and is used as the default if omitted. 10006 required: true 10007 type: "string" 10008 - name: "X-Registry-Auth" 10009 in: "header" 10010 description: | 10011 A base64url-encoded auth configuration to use when pulling a plugin 10012 from a registry. 10013 10014 Refer to the [authentication section](#section/Authentication) for 10015 details. 10016 type: "string" 10017 - name: "body" 10018 in: "body" 10019 schema: 10020 type: "array" 10021 items: 10022 $ref: "#/definitions/PluginPrivilege" 10023 example: 10024 - Name: "network" 10025 Description: "" 10026 Value: 10027 - "host" 10028 - Name: "mount" 10029 Description: "" 10030 Value: 10031 - "/data" 10032 - Name: "device" 10033 Description: "" 10034 Value: 10035 - "/dev/cpu_dma_latency" 10036 tags: ["Plugin"] 10037 /plugins/create: 10038 post: 10039 summary: "Create a plugin" 10040 operationId: "PluginCreate" 10041 consumes: 10042 - "application/x-tar" 10043 responses: 10044 204: 10045 description: "no error" 10046 500: 10047 description: "server error" 10048 schema: 10049 $ref: "#/definitions/ErrorResponse" 10050 parameters: 10051 - name: "name" 10052 in: "query" 10053 description: | 10054 The name of the plugin. The `:latest` tag is optional, and is the 10055 default if omitted. 10056 required: true 10057 type: "string" 10058 - name: "tarContext" 10059 in: "body" 10060 description: "Path to tar containing plugin rootfs and manifest" 10061 schema: 10062 type: "string" 10063 format: "binary" 10064 tags: ["Plugin"] 10065 /plugins/{name}/push: 10066 post: 10067 summary: "Push a plugin" 10068 operationId: "PluginPush" 10069 description: | 10070 Push a plugin to the registry. 10071 parameters: 10072 - name: "name" 10073 in: "path" 10074 description: | 10075 The name of the plugin. The `:latest` tag is optional, and is the 10076 default if omitted. 10077 required: true 10078 type: "string" 10079 responses: 10080 200: 10081 description: "no error" 10082 404: 10083 description: "plugin not installed" 10084 schema: 10085 $ref: "#/definitions/ErrorResponse" 10086 500: 10087 description: "server error" 10088 schema: 10089 $ref: "#/definitions/ErrorResponse" 10090 tags: ["Plugin"] 10091 /plugins/{name}/set: 10092 post: 10093 summary: "Configure a plugin" 10094 operationId: "PluginSet" 10095 consumes: 10096 - "application/json" 10097 parameters: 10098 - name: "name" 10099 in: "path" 10100 description: | 10101 The name of the plugin. The `:latest` tag is optional, and is the 10102 default if omitted. 10103 required: true 10104 type: "string" 10105 - name: "body" 10106 in: "body" 10107 schema: 10108 type: "array" 10109 items: 10110 type: "string" 10111 example: ["DEBUG=1"] 10112 responses: 10113 204: 10114 description: "No error" 10115 404: 10116 description: "Plugin not installed" 10117 schema: 10118 $ref: "#/definitions/ErrorResponse" 10119 500: 10120 description: "Server error" 10121 schema: 10122 $ref: "#/definitions/ErrorResponse" 10123 tags: ["Plugin"] 10124 /nodes: 10125 get: 10126 summary: "List nodes" 10127 operationId: "NodeList" 10128 responses: 10129 200: 10130 description: "no error" 10131 schema: 10132 type: "array" 10133 items: 10134 $ref: "#/definitions/Node" 10135 500: 10136 description: "server error" 10137 schema: 10138 $ref: "#/definitions/ErrorResponse" 10139 503: 10140 description: "node is not part of a swarm" 10141 schema: 10142 $ref: "#/definitions/ErrorResponse" 10143 parameters: 10144 - name: "filters" 10145 in: "query" 10146 description: | 10147 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 10148 10149 Available filters: 10150 - `id=<node id>` 10151 - `label=<engine label>` 10152 - `membership=`(`accepted`|`pending`)` 10153 - `name=<node name>` 10154 - `node.label=<node label>` 10155 - `role=`(`manager`|`worker`)` 10156 type: "string" 10157 tags: ["Node"] 10158 /nodes/{id}: 10159 get: 10160 summary: "Inspect a node" 10161 operationId: "NodeInspect" 10162 responses: 10163 200: 10164 description: "no error" 10165 schema: 10166 $ref: "#/definitions/Node" 10167 404: 10168 description: "no such node" 10169 schema: 10170 $ref: "#/definitions/ErrorResponse" 10171 500: 10172 description: "server error" 10173 schema: 10174 $ref: "#/definitions/ErrorResponse" 10175 503: 10176 description: "node is not part of a swarm" 10177 schema: 10178 $ref: "#/definitions/ErrorResponse" 10179 parameters: 10180 - name: "id" 10181 in: "path" 10182 description: "The ID or name of the node" 10183 type: "string" 10184 required: true 10185 tags: ["Node"] 10186 delete: 10187 summary: "Delete a node" 10188 operationId: "NodeDelete" 10189 responses: 10190 200: 10191 description: "no error" 10192 404: 10193 description: "no such node" 10194 schema: 10195 $ref: "#/definitions/ErrorResponse" 10196 500: 10197 description: "server error" 10198 schema: 10199 $ref: "#/definitions/ErrorResponse" 10200 503: 10201 description: "node is not part of a swarm" 10202 schema: 10203 $ref: "#/definitions/ErrorResponse" 10204 parameters: 10205 - name: "id" 10206 in: "path" 10207 description: "The ID or name of the node" 10208 type: "string" 10209 required: true 10210 - name: "force" 10211 in: "query" 10212 description: "Force remove a node from the swarm" 10213 default: false 10214 type: "boolean" 10215 tags: ["Node"] 10216 /nodes/{id}/update: 10217 post: 10218 summary: "Update a node" 10219 operationId: "NodeUpdate" 10220 responses: 10221 200: 10222 description: "no error" 10223 400: 10224 description: "bad parameter" 10225 schema: 10226 $ref: "#/definitions/ErrorResponse" 10227 404: 10228 description: "no such node" 10229 schema: 10230 $ref: "#/definitions/ErrorResponse" 10231 500: 10232 description: "server error" 10233 schema: 10234 $ref: "#/definitions/ErrorResponse" 10235 503: 10236 description: "node is not part of a swarm" 10237 schema: 10238 $ref: "#/definitions/ErrorResponse" 10239 parameters: 10240 - name: "id" 10241 in: "path" 10242 description: "The ID of the node" 10243 type: "string" 10244 required: true 10245 - name: "body" 10246 in: "body" 10247 schema: 10248 $ref: "#/definitions/NodeSpec" 10249 - name: "version" 10250 in: "query" 10251 description: | 10252 The version number of the node object being updated. This is required 10253 to avoid conflicting writes. 10254 type: "integer" 10255 format: "int64" 10256 required: true 10257 tags: ["Node"] 10258 /swarm: 10259 get: 10260 summary: "Inspect swarm" 10261 operationId: "SwarmInspect" 10262 responses: 10263 200: 10264 description: "no error" 10265 schema: 10266 $ref: "#/definitions/Swarm" 10267 404: 10268 description: "no such swarm" 10269 schema: 10270 $ref: "#/definitions/ErrorResponse" 10271 500: 10272 description: "server error" 10273 schema: 10274 $ref: "#/definitions/ErrorResponse" 10275 503: 10276 description: "node is not part of a swarm" 10277 schema: 10278 $ref: "#/definitions/ErrorResponse" 10279 tags: ["Swarm"] 10280 /swarm/init: 10281 post: 10282 summary: "Initialize a new swarm" 10283 operationId: "SwarmInit" 10284 produces: 10285 - "application/json" 10286 - "text/plain" 10287 responses: 10288 200: 10289 description: "no error" 10290 schema: 10291 description: "The node ID" 10292 type: "string" 10293 example: "7v2t30z9blmxuhnyo6s4cpenp" 10294 400: 10295 description: "bad parameter" 10296 schema: 10297 $ref: "#/definitions/ErrorResponse" 10298 500: 10299 description: "server error" 10300 schema: 10301 $ref: "#/definitions/ErrorResponse" 10302 503: 10303 description: "node is already part of a swarm" 10304 schema: 10305 $ref: "#/definitions/ErrorResponse" 10306 parameters: 10307 - name: "body" 10308 in: "body" 10309 required: true 10310 schema: 10311 type: "object" 10312 title: "SwarmInitRequest" 10313 properties: 10314 ListenAddr: 10315 description: | 10316 Listen address used for inter-manager communication, as well 10317 as determining the networking interface used for the VXLAN 10318 Tunnel Endpoint (VTEP). This can either be an address/port 10319 combination in the form `192.168.1.1:4567`, or an interface 10320 followed by a port number, like `eth0:4567`. If the port number 10321 is omitted, the default swarm listening port is used. 10322 type: "string" 10323 AdvertiseAddr: 10324 description: | 10325 Externally reachable address advertised to other nodes. This 10326 can either be an address/port combination in the form 10327 `192.168.1.1:4567`, or an interface followed by a port number, 10328 like `eth0:4567`. If the port number is omitted, the port 10329 number from the listen address is used. If `AdvertiseAddr` is 10330 not specified, it will be automatically detected when possible. 10331 type: "string" 10332 DataPathAddr: 10333 description: | 10334 Address or interface to use for data path traffic (format: 10335 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10336 like `eth0`. If `DataPathAddr` is unspecified, the same address 10337 as `AdvertiseAddr` is used. 10338 10339 The `DataPathAddr` specifies the address that global scope 10340 network drivers will publish towards other nodes in order to 10341 reach the containers running on this node. Using this parameter 10342 it is possible to separate the container data traffic from the 10343 management traffic of the cluster. 10344 type: "string" 10345 DataPathPort: 10346 description: | 10347 DataPathPort specifies the data path port number for data traffic. 10348 Acceptable port range is 1024 to 49151. 10349 if no port is set or is set to 0, default port 4789 will be used. 10350 type: "integer" 10351 format: "uint32" 10352 DefaultAddrPool: 10353 description: | 10354 Default Address Pool specifies default subnet pools for global 10355 scope networks. 10356 type: "array" 10357 items: 10358 type: "string" 10359 example: ["10.10.0.0/16", "20.20.0.0/16"] 10360 ForceNewCluster: 10361 description: "Force creation of a new swarm." 10362 type: "boolean" 10363 SubnetSize: 10364 description: | 10365 SubnetSize specifies the subnet size of the networks created 10366 from the default subnet pool. 10367 type: "integer" 10368 format: "uint32" 10369 Spec: 10370 $ref: "#/definitions/SwarmSpec" 10371 example: 10372 ListenAddr: "0.0.0.0:2377" 10373 AdvertiseAddr: "192.168.1.1:2377" 10374 DataPathPort: 4789 10375 DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] 10376 SubnetSize: 24 10377 ForceNewCluster: false 10378 Spec: 10379 Orchestration: {} 10380 Raft: {} 10381 Dispatcher: {} 10382 CAConfig: {} 10383 EncryptionConfig: 10384 AutoLockManagers: false 10385 tags: ["Swarm"] 10386 /swarm/join: 10387 post: 10388 summary: "Join an existing swarm" 10389 operationId: "SwarmJoin" 10390 responses: 10391 200: 10392 description: "no error" 10393 400: 10394 description: "bad parameter" 10395 schema: 10396 $ref: "#/definitions/ErrorResponse" 10397 500: 10398 description: "server error" 10399 schema: 10400 $ref: "#/definitions/ErrorResponse" 10401 503: 10402 description: "node is already part of a swarm" 10403 schema: 10404 $ref: "#/definitions/ErrorResponse" 10405 parameters: 10406 - name: "body" 10407 in: "body" 10408 required: true 10409 schema: 10410 type: "object" 10411 title: "SwarmJoinRequest" 10412 properties: 10413 ListenAddr: 10414 description: | 10415 Listen address used for inter-manager communication if the node 10416 gets promoted to manager, as well as determining the networking 10417 interface used for the VXLAN Tunnel Endpoint (VTEP). 10418 type: "string" 10419 AdvertiseAddr: 10420 description: | 10421 Externally reachable address advertised to other nodes. This 10422 can either be an address/port combination in the form 10423 `192.168.1.1:4567`, or an interface followed by a port number, 10424 like `eth0:4567`. If the port number is omitted, the port 10425 number from the listen address is used. If `AdvertiseAddr` is 10426 not specified, it will be automatically detected when possible. 10427 type: "string" 10428 DataPathAddr: 10429 description: | 10430 Address or interface to use for data path traffic (format: 10431 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 10432 like `eth0`. If `DataPathAddr` is unspecified, the same address 10433 as `AdvertiseAddr` is used. 10434 10435 The `DataPathAddr` specifies the address that global scope 10436 network drivers will publish towards other nodes in order to 10437 reach the containers running on this node. Using this parameter 10438 it is possible to separate the container data traffic from the 10439 management traffic of the cluster. 10440 10441 type: "string" 10442 RemoteAddrs: 10443 description: | 10444 Addresses of manager nodes already participating in the swarm. 10445 type: "array" 10446 items: 10447 type: "string" 10448 JoinToken: 10449 description: "Secret token for joining this swarm." 10450 type: "string" 10451 example: 10452 ListenAddr: "0.0.0.0:2377" 10453 AdvertiseAddr: "192.168.1.1:2377" 10454 RemoteAddrs: 10455 - "node1:2377" 10456 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 10457 tags: ["Swarm"] 10458 /swarm/leave: 10459 post: 10460 summary: "Leave a swarm" 10461 operationId: "SwarmLeave" 10462 responses: 10463 200: 10464 description: "no error" 10465 500: 10466 description: "server error" 10467 schema: 10468 $ref: "#/definitions/ErrorResponse" 10469 503: 10470 description: "node is not part of a swarm" 10471 schema: 10472 $ref: "#/definitions/ErrorResponse" 10473 parameters: 10474 - name: "force" 10475 description: | 10476 Force leave swarm, even if this is the last manager or that it will 10477 break the cluster. 10478 in: "query" 10479 type: "boolean" 10480 default: false 10481 tags: ["Swarm"] 10482 /swarm/update: 10483 post: 10484 summary: "Update a swarm" 10485 operationId: "SwarmUpdate" 10486 responses: 10487 200: 10488 description: "no error" 10489 400: 10490 description: "bad parameter" 10491 schema: 10492 $ref: "#/definitions/ErrorResponse" 10493 500: 10494 description: "server error" 10495 schema: 10496 $ref: "#/definitions/ErrorResponse" 10497 503: 10498 description: "node is not part of a swarm" 10499 schema: 10500 $ref: "#/definitions/ErrorResponse" 10501 parameters: 10502 - name: "body" 10503 in: "body" 10504 required: true 10505 schema: 10506 $ref: "#/definitions/SwarmSpec" 10507 - name: "version" 10508 in: "query" 10509 description: | 10510 The version number of the swarm object being updated. This is 10511 required to avoid conflicting writes. 10512 type: "integer" 10513 format: "int64" 10514 required: true 10515 - name: "rotateWorkerToken" 10516 in: "query" 10517 description: "Rotate the worker join token." 10518 type: "boolean" 10519 default: false 10520 - name: "rotateManagerToken" 10521 in: "query" 10522 description: "Rotate the manager join token." 10523 type: "boolean" 10524 default: false 10525 - name: "rotateManagerUnlockKey" 10526 in: "query" 10527 description: "Rotate the manager unlock key." 10528 type: "boolean" 10529 default: false 10530 tags: ["Swarm"] 10531 /swarm/unlockkey: 10532 get: 10533 summary: "Get the unlock key" 10534 operationId: "SwarmUnlockkey" 10535 consumes: 10536 - "application/json" 10537 responses: 10538 200: 10539 description: "no error" 10540 schema: 10541 type: "object" 10542 title: "UnlockKeyResponse" 10543 properties: 10544 UnlockKey: 10545 description: "The swarm's unlock key." 10546 type: "string" 10547 example: 10548 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10549 500: 10550 description: "server error" 10551 schema: 10552 $ref: "#/definitions/ErrorResponse" 10553 503: 10554 description: "node is not part of a swarm" 10555 schema: 10556 $ref: "#/definitions/ErrorResponse" 10557 tags: ["Swarm"] 10558 /swarm/unlock: 10559 post: 10560 summary: "Unlock a locked manager" 10561 operationId: "SwarmUnlock" 10562 consumes: 10563 - "application/json" 10564 produces: 10565 - "application/json" 10566 parameters: 10567 - name: "body" 10568 in: "body" 10569 required: true 10570 schema: 10571 type: "object" 10572 title: "SwarmUnlockRequest" 10573 properties: 10574 UnlockKey: 10575 description: "The swarm's unlock key." 10576 type: "string" 10577 example: 10578 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10579 responses: 10580 200: 10581 description: "no error" 10582 500: 10583 description: "server error" 10584 schema: 10585 $ref: "#/definitions/ErrorResponse" 10586 503: 10587 description: "node is not part of a swarm" 10588 schema: 10589 $ref: "#/definitions/ErrorResponse" 10590 tags: ["Swarm"] 10591 /services: 10592 get: 10593 summary: "List services" 10594 operationId: "ServiceList" 10595 responses: 10596 200: 10597 description: "no error" 10598 schema: 10599 type: "array" 10600 items: 10601 $ref: "#/definitions/Service" 10602 500: 10603 description: "server error" 10604 schema: 10605 $ref: "#/definitions/ErrorResponse" 10606 503: 10607 description: "node is not part of a swarm" 10608 schema: 10609 $ref: "#/definitions/ErrorResponse" 10610 parameters: 10611 - name: "filters" 10612 in: "query" 10613 type: "string" 10614 description: | 10615 A JSON encoded value of the filters (a `map[string][]string`) to 10616 process on the services list. 10617 10618 Available filters: 10619 10620 - `id=<service id>` 10621 - `label=<service label>` 10622 - `mode=["replicated"|"global"]` 10623 - `name=<service name>` 10624 - name: "status" 10625 in: "query" 10626 type: "boolean" 10627 description: | 10628 Include service status, with count of running and desired tasks. 10629 tags: ["Service"] 10630 /services/create: 10631 post: 10632 summary: "Create a service" 10633 operationId: "ServiceCreate" 10634 consumes: 10635 - "application/json" 10636 produces: 10637 - "application/json" 10638 responses: 10639 201: 10640 description: "no error" 10641 schema: 10642 type: "object" 10643 title: "ServiceCreateResponse" 10644 properties: 10645 ID: 10646 description: "The ID of the created service." 10647 type: "string" 10648 Warning: 10649 description: "Optional warning message" 10650 type: "string" 10651 example: 10652 ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" 10653 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 10654 400: 10655 description: "bad parameter" 10656 schema: 10657 $ref: "#/definitions/ErrorResponse" 10658 403: 10659 description: "network is not eligible for services" 10660 schema: 10661 $ref: "#/definitions/ErrorResponse" 10662 409: 10663 description: "name conflicts with an existing service" 10664 schema: 10665 $ref: "#/definitions/ErrorResponse" 10666 500: 10667 description: "server error" 10668 schema: 10669 $ref: "#/definitions/ErrorResponse" 10670 503: 10671 description: "node is not part of a swarm" 10672 schema: 10673 $ref: "#/definitions/ErrorResponse" 10674 parameters: 10675 - name: "body" 10676 in: "body" 10677 required: true 10678 schema: 10679 allOf: 10680 - $ref: "#/definitions/ServiceSpec" 10681 - type: "object" 10682 example: 10683 Name: "web" 10684 TaskTemplate: 10685 ContainerSpec: 10686 Image: "nginx:alpine" 10687 Mounts: 10688 - 10689 ReadOnly: true 10690 Source: "web-data" 10691 Target: "/usr/share/nginx/html" 10692 Type: "volume" 10693 VolumeOptions: 10694 DriverConfig: {} 10695 Labels: 10696 com.example.something: "something-value" 10697 Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] 10698 User: "33" 10699 DNSConfig: 10700 Nameservers: ["8.8.8.8"] 10701 Search: ["example.org"] 10702 Options: ["timeout:3"] 10703 Secrets: 10704 - 10705 File: 10706 Name: "www.example.org.key" 10707 UID: "33" 10708 GID: "33" 10709 Mode: 384 10710 SecretID: "fpjqlhnwb19zds35k8wn80lq9" 10711 SecretName: "example_org_domain_key" 10712 LogDriver: 10713 Name: "json-file" 10714 Options: 10715 max-file: "3" 10716 max-size: "10M" 10717 Placement: {} 10718 Resources: 10719 Limits: 10720 MemoryBytes: 104857600 10721 Reservations: {} 10722 RestartPolicy: 10723 Condition: "on-failure" 10724 Delay: 10000000000 10725 MaxAttempts: 10 10726 Mode: 10727 Replicated: 10728 Replicas: 4 10729 UpdateConfig: 10730 Parallelism: 2 10731 Delay: 1000000000 10732 FailureAction: "pause" 10733 Monitor: 15000000000 10734 MaxFailureRatio: 0.15 10735 RollbackConfig: 10736 Parallelism: 1 10737 Delay: 1000000000 10738 FailureAction: "pause" 10739 Monitor: 15000000000 10740 MaxFailureRatio: 0.15 10741 EndpointSpec: 10742 Ports: 10743 - 10744 Protocol: "tcp" 10745 PublishedPort: 8080 10746 TargetPort: 80 10747 Labels: 10748 foo: "bar" 10749 - name: "X-Registry-Auth" 10750 in: "header" 10751 description: | 10752 A base64url-encoded auth configuration for pulling from private 10753 registries. 10754 10755 Refer to the [authentication section](#section/Authentication) for 10756 details. 10757 type: "string" 10758 tags: ["Service"] 10759 /services/{id}: 10760 get: 10761 summary: "Inspect a service" 10762 operationId: "ServiceInspect" 10763 responses: 10764 200: 10765 description: "no error" 10766 schema: 10767 $ref: "#/definitions/Service" 10768 404: 10769 description: "no such service" 10770 schema: 10771 $ref: "#/definitions/ErrorResponse" 10772 500: 10773 description: "server error" 10774 schema: 10775 $ref: "#/definitions/ErrorResponse" 10776 503: 10777 description: "node is not part of a swarm" 10778 schema: 10779 $ref: "#/definitions/ErrorResponse" 10780 parameters: 10781 - name: "id" 10782 in: "path" 10783 description: "ID or name of service." 10784 required: true 10785 type: "string" 10786 - name: "insertDefaults" 10787 in: "query" 10788 description: "Fill empty fields with default values." 10789 type: "boolean" 10790 default: false 10791 tags: ["Service"] 10792 delete: 10793 summary: "Delete a service" 10794 operationId: "ServiceDelete" 10795 responses: 10796 200: 10797 description: "no error" 10798 404: 10799 description: "no such service" 10800 schema: 10801 $ref: "#/definitions/ErrorResponse" 10802 500: 10803 description: "server error" 10804 schema: 10805 $ref: "#/definitions/ErrorResponse" 10806 503: 10807 description: "node is not part of a swarm" 10808 schema: 10809 $ref: "#/definitions/ErrorResponse" 10810 parameters: 10811 - name: "id" 10812 in: "path" 10813 description: "ID or name of service." 10814 required: true 10815 type: "string" 10816 tags: ["Service"] 10817 /services/{id}/update: 10818 post: 10819 summary: "Update a service" 10820 operationId: "ServiceUpdate" 10821 consumes: ["application/json"] 10822 produces: ["application/json"] 10823 responses: 10824 200: 10825 description: "no error" 10826 schema: 10827 $ref: "#/definitions/ServiceUpdateResponse" 10828 400: 10829 description: "bad parameter" 10830 schema: 10831 $ref: "#/definitions/ErrorResponse" 10832 404: 10833 description: "no such service" 10834 schema: 10835 $ref: "#/definitions/ErrorResponse" 10836 500: 10837 description: "server error" 10838 schema: 10839 $ref: "#/definitions/ErrorResponse" 10840 503: 10841 description: "node is not part of a swarm" 10842 schema: 10843 $ref: "#/definitions/ErrorResponse" 10844 parameters: 10845 - name: "id" 10846 in: "path" 10847 description: "ID or name of service." 10848 required: true 10849 type: "string" 10850 - name: "body" 10851 in: "body" 10852 required: true 10853 schema: 10854 allOf: 10855 - $ref: "#/definitions/ServiceSpec" 10856 - type: "object" 10857 example: 10858 Name: "top" 10859 TaskTemplate: 10860 ContainerSpec: 10861 Image: "busybox" 10862 Args: 10863 - "top" 10864 Resources: 10865 Limits: {} 10866 Reservations: {} 10867 RestartPolicy: 10868 Condition: "any" 10869 MaxAttempts: 0 10870 Placement: {} 10871 ForceUpdate: 0 10872 Mode: 10873 Replicated: 10874 Replicas: 1 10875 UpdateConfig: 10876 Parallelism: 2 10877 Delay: 1000000000 10878 FailureAction: "pause" 10879 Monitor: 15000000000 10880 MaxFailureRatio: 0.15 10881 RollbackConfig: 10882 Parallelism: 1 10883 Delay: 1000000000 10884 FailureAction: "pause" 10885 Monitor: 15000000000 10886 MaxFailureRatio: 0.15 10887 EndpointSpec: 10888 Mode: "vip" 10889 10890 - name: "version" 10891 in: "query" 10892 description: | 10893 The version number of the service object being updated. This is 10894 required to avoid conflicting writes. 10895 This version number should be the value as currently set on the 10896 service *before* the update. You can find the current version by 10897 calling `GET /services/{id}` 10898 required: true 10899 type: "integer" 10900 - name: "registryAuthFrom" 10901 in: "query" 10902 description: | 10903 If the `X-Registry-Auth` header is not specified, this parameter 10904 indicates where to find registry authorization credentials. 10905 type: "string" 10906 enum: ["spec", "previous-spec"] 10907 default: "spec" 10908 - name: "rollback" 10909 in: "query" 10910 description: | 10911 Set to this parameter to `previous` to cause a server-side rollback 10912 to the previous service spec. The supplied spec will be ignored in 10913 this case. 10914 type: "string" 10915 - name: "X-Registry-Auth" 10916 in: "header" 10917 description: | 10918 A base64url-encoded auth configuration for pulling from private 10919 registries. 10920 10921 Refer to the [authentication section](#section/Authentication) for 10922 details. 10923 type: "string" 10924 10925 tags: ["Service"] 10926 /services/{id}/logs: 10927 get: 10928 summary: "Get service logs" 10929 description: | 10930 Get `stdout` and `stderr` logs from a service. See also 10931 [`/containers/{id}/logs`](#operation/ContainerLogs). 10932 10933 **Note**: This endpoint works only for services with the `local`, 10934 `json-file` or `journald` logging drivers. 10935 operationId: "ServiceLogs" 10936 responses: 10937 200: 10938 description: "logs returned as a stream in response body" 10939 schema: 10940 type: "string" 10941 format: "binary" 10942 404: 10943 description: "no such service" 10944 schema: 10945 $ref: "#/definitions/ErrorResponse" 10946 examples: 10947 application/json: 10948 message: "No such service: c2ada9df5af8" 10949 500: 10950 description: "server error" 10951 schema: 10952 $ref: "#/definitions/ErrorResponse" 10953 503: 10954 description: "node is not part of a swarm" 10955 schema: 10956 $ref: "#/definitions/ErrorResponse" 10957 parameters: 10958 - name: "id" 10959 in: "path" 10960 required: true 10961 description: "ID or name of the service" 10962 type: "string" 10963 - name: "details" 10964 in: "query" 10965 description: "Show service context and extra details provided to logs." 10966 type: "boolean" 10967 default: false 10968 - name: "follow" 10969 in: "query" 10970 description: "Keep connection after returning logs." 10971 type: "boolean" 10972 default: false 10973 - name: "stdout" 10974 in: "query" 10975 description: "Return logs from `stdout`" 10976 type: "boolean" 10977 default: false 10978 - name: "stderr" 10979 in: "query" 10980 description: "Return logs from `stderr`" 10981 type: "boolean" 10982 default: false 10983 - name: "since" 10984 in: "query" 10985 description: "Only return logs since this time, as a UNIX timestamp" 10986 type: "integer" 10987 default: 0 10988 - name: "timestamps" 10989 in: "query" 10990 description: "Add timestamps to every log line" 10991 type: "boolean" 10992 default: false 10993 - name: "tail" 10994 in: "query" 10995 description: | 10996 Only return this number of log lines from the end of the logs. 10997 Specify as an integer or `all` to output all log lines. 10998 type: "string" 10999 default: "all" 11000 tags: ["Service"] 11001 /tasks: 11002 get: 11003 summary: "List tasks" 11004 operationId: "TaskList" 11005 produces: 11006 - "application/json" 11007 responses: 11008 200: 11009 description: "no error" 11010 schema: 11011 type: "array" 11012 items: 11013 $ref: "#/definitions/Task" 11014 example: 11015 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 11016 Version: 11017 Index: 71 11018 CreatedAt: "2016-06-07T21:07:31.171892745Z" 11019 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 11020 Spec: 11021 ContainerSpec: 11022 Image: "redis" 11023 Resources: 11024 Limits: {} 11025 Reservations: {} 11026 RestartPolicy: 11027 Condition: "any" 11028 MaxAttempts: 0 11029 Placement: {} 11030 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11031 Slot: 1 11032 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11033 Status: 11034 Timestamp: "2016-06-07T21:07:31.290032978Z" 11035 State: "running" 11036 Message: "started" 11037 ContainerStatus: 11038 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 11039 PID: 677 11040 DesiredState: "running" 11041 NetworksAttachments: 11042 - Network: 11043 ID: "4qvuz4ko70xaltuqbt8956gd1" 11044 Version: 11045 Index: 18 11046 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11047 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11048 Spec: 11049 Name: "ingress" 11050 Labels: 11051 com.docker.swarm.internal: "true" 11052 DriverConfiguration: {} 11053 IPAMOptions: 11054 Driver: {} 11055 Configs: 11056 - Subnet: "10.255.0.0/16" 11057 Gateway: "10.255.0.1" 11058 DriverState: 11059 Name: "overlay" 11060 Options: 11061 com.docker.network.driver.overlay.vxlanid_list: "256" 11062 IPAMOptions: 11063 Driver: 11064 Name: "default" 11065 Configs: 11066 - Subnet: "10.255.0.0/16" 11067 Gateway: "10.255.0.1" 11068 Addresses: 11069 - "10.255.0.10/16" 11070 - ID: "1yljwbmlr8er2waf8orvqpwms" 11071 Version: 11072 Index: 30 11073 CreatedAt: "2016-06-07T21:07:30.019104782Z" 11074 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 11075 Name: "hopeful_cori" 11076 Spec: 11077 ContainerSpec: 11078 Image: "redis" 11079 Resources: 11080 Limits: {} 11081 Reservations: {} 11082 RestartPolicy: 11083 Condition: "any" 11084 MaxAttempts: 0 11085 Placement: {} 11086 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 11087 Slot: 1 11088 NodeID: "60gvrl6tm78dmak4yl7srz94v" 11089 Status: 11090 Timestamp: "2016-06-07T21:07:30.202183143Z" 11091 State: "shutdown" 11092 Message: "shutdown" 11093 ContainerStatus: 11094 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 11095 DesiredState: "shutdown" 11096 NetworksAttachments: 11097 - Network: 11098 ID: "4qvuz4ko70xaltuqbt8956gd1" 11099 Version: 11100 Index: 18 11101 CreatedAt: "2016-06-07T20:31:11.912919752Z" 11102 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 11103 Spec: 11104 Name: "ingress" 11105 Labels: 11106 com.docker.swarm.internal: "true" 11107 DriverConfiguration: {} 11108 IPAMOptions: 11109 Driver: {} 11110 Configs: 11111 - Subnet: "10.255.0.0/16" 11112 Gateway: "10.255.0.1" 11113 DriverState: 11114 Name: "overlay" 11115 Options: 11116 com.docker.network.driver.overlay.vxlanid_list: "256" 11117 IPAMOptions: 11118 Driver: 11119 Name: "default" 11120 Configs: 11121 - Subnet: "10.255.0.0/16" 11122 Gateway: "10.255.0.1" 11123 Addresses: 11124 - "10.255.0.5/16" 11125 500: 11126 description: "server error" 11127 schema: 11128 $ref: "#/definitions/ErrorResponse" 11129 503: 11130 description: "node is not part of a swarm" 11131 schema: 11132 $ref: "#/definitions/ErrorResponse" 11133 parameters: 11134 - name: "filters" 11135 in: "query" 11136 type: "string" 11137 description: | 11138 A JSON encoded value of the filters (a `map[string][]string`) to 11139 process on the tasks list. 11140 11141 Available filters: 11142 11143 - `desired-state=(running | shutdown | accepted)` 11144 - `id=<task id>` 11145 - `label=key` or `label="key=value"` 11146 - `name=<task name>` 11147 - `node=<node id or name>` 11148 - `service=<service name>` 11149 tags: ["Task"] 11150 /tasks/{id}: 11151 get: 11152 summary: "Inspect a task" 11153 operationId: "TaskInspect" 11154 produces: 11155 - "application/json" 11156 responses: 11157 200: 11158 description: "no error" 11159 schema: 11160 $ref: "#/definitions/Task" 11161 404: 11162 description: "no such task" 11163 schema: 11164 $ref: "#/definitions/ErrorResponse" 11165 500: 11166 description: "server error" 11167 schema: 11168 $ref: "#/definitions/ErrorResponse" 11169 503: 11170 description: "node is not part of a swarm" 11171 schema: 11172 $ref: "#/definitions/ErrorResponse" 11173 parameters: 11174 - name: "id" 11175 in: "path" 11176 description: "ID of the task" 11177 required: true 11178 type: "string" 11179 tags: ["Task"] 11180 /tasks/{id}/logs: 11181 get: 11182 summary: "Get task logs" 11183 description: | 11184 Get `stdout` and `stderr` logs from a task. 11185 See also [`/containers/{id}/logs`](#operation/ContainerLogs). 11186 11187 **Note**: This endpoint works only for services with the `local`, 11188 `json-file` or `journald` logging drivers. 11189 operationId: "TaskLogs" 11190 responses: 11191 200: 11192 description: "logs returned as a stream in response body" 11193 schema: 11194 type: "string" 11195 format: "binary" 11196 404: 11197 description: "no such task" 11198 schema: 11199 $ref: "#/definitions/ErrorResponse" 11200 examples: 11201 application/json: 11202 message: "No such task: c2ada9df5af8" 11203 500: 11204 description: "server error" 11205 schema: 11206 $ref: "#/definitions/ErrorResponse" 11207 503: 11208 description: "node is not part of a swarm" 11209 schema: 11210 $ref: "#/definitions/ErrorResponse" 11211 parameters: 11212 - name: "id" 11213 in: "path" 11214 required: true 11215 description: "ID of the task" 11216 type: "string" 11217 - name: "details" 11218 in: "query" 11219 description: "Show task context and extra details provided to logs." 11220 type: "boolean" 11221 default: false 11222 - name: "follow" 11223 in: "query" 11224 description: "Keep connection after returning logs." 11225 type: "boolean" 11226 default: false 11227 - name: "stdout" 11228 in: "query" 11229 description: "Return logs from `stdout`" 11230 type: "boolean" 11231 default: false 11232 - name: "stderr" 11233 in: "query" 11234 description: "Return logs from `stderr`" 11235 type: "boolean" 11236 default: false 11237 - name: "since" 11238 in: "query" 11239 description: "Only return logs since this time, as a UNIX timestamp" 11240 type: "integer" 11241 default: 0 11242 - name: "timestamps" 11243 in: "query" 11244 description: "Add timestamps to every log line" 11245 type: "boolean" 11246 default: false 11247 - name: "tail" 11248 in: "query" 11249 description: | 11250 Only return this number of log lines from the end of the logs. 11251 Specify as an integer or `all` to output all log lines. 11252 type: "string" 11253 default: "all" 11254 tags: ["Task"] 11255 /secrets: 11256 get: 11257 summary: "List secrets" 11258 operationId: "SecretList" 11259 produces: 11260 - "application/json" 11261 responses: 11262 200: 11263 description: "no error" 11264 schema: 11265 type: "array" 11266 items: 11267 $ref: "#/definitions/Secret" 11268 example: 11269 - ID: "blt1owaxmitz71s9v5zh81zun" 11270 Version: 11271 Index: 85 11272 CreatedAt: "2017-07-20T13:55:28.678958722Z" 11273 UpdatedAt: "2017-07-20T13:55:28.678958722Z" 11274 Spec: 11275 Name: "mysql-passwd" 11276 Labels: 11277 some.label: "some.value" 11278 Driver: 11279 Name: "secret-bucket" 11280 Options: 11281 OptionA: "value for driver option A" 11282 OptionB: "value for driver option B" 11283 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 11284 Version: 11285 Index: 11 11286 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11287 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11288 Spec: 11289 Name: "app-dev.crt" 11290 Labels: 11291 foo: "bar" 11292 500: 11293 description: "server error" 11294 schema: 11295 $ref: "#/definitions/ErrorResponse" 11296 503: 11297 description: "node is not part of a swarm" 11298 schema: 11299 $ref: "#/definitions/ErrorResponse" 11300 parameters: 11301 - name: "filters" 11302 in: "query" 11303 type: "string" 11304 description: | 11305 A JSON encoded value of the filters (a `map[string][]string`) to 11306 process on the secrets list. 11307 11308 Available filters: 11309 11310 - `id=<secret id>` 11311 - `label=<key> or label=<key>=value` 11312 - `name=<secret name>` 11313 - `names=<secret name>` 11314 tags: ["Secret"] 11315 /secrets/create: 11316 post: 11317 summary: "Create a secret" 11318 operationId: "SecretCreate" 11319 consumes: 11320 - "application/json" 11321 produces: 11322 - "application/json" 11323 responses: 11324 201: 11325 description: "no error" 11326 schema: 11327 $ref: "#/definitions/IdResponse" 11328 409: 11329 description: "name conflicts with an existing object" 11330 schema: 11331 $ref: "#/definitions/ErrorResponse" 11332 500: 11333 description: "server error" 11334 schema: 11335 $ref: "#/definitions/ErrorResponse" 11336 503: 11337 description: "node is not part of a swarm" 11338 schema: 11339 $ref: "#/definitions/ErrorResponse" 11340 parameters: 11341 - name: "body" 11342 in: "body" 11343 schema: 11344 allOf: 11345 - $ref: "#/definitions/SecretSpec" 11346 - type: "object" 11347 example: 11348 Name: "app-key.crt" 11349 Labels: 11350 foo: "bar" 11351 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11352 Driver: 11353 Name: "secret-bucket" 11354 Options: 11355 OptionA: "value for driver option A" 11356 OptionB: "value for driver option B" 11357 tags: ["Secret"] 11358 /secrets/{id}: 11359 get: 11360 summary: "Inspect a secret" 11361 operationId: "SecretInspect" 11362 produces: 11363 - "application/json" 11364 responses: 11365 200: 11366 description: "no error" 11367 schema: 11368 $ref: "#/definitions/Secret" 11369 examples: 11370 application/json: 11371 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11372 Version: 11373 Index: 11 11374 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11375 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11376 Spec: 11377 Name: "app-dev.crt" 11378 Labels: 11379 foo: "bar" 11380 Driver: 11381 Name: "secret-bucket" 11382 Options: 11383 OptionA: "value for driver option A" 11384 OptionB: "value for driver option B" 11385 11386 404: 11387 description: "secret not found" 11388 schema: 11389 $ref: "#/definitions/ErrorResponse" 11390 500: 11391 description: "server error" 11392 schema: 11393 $ref: "#/definitions/ErrorResponse" 11394 503: 11395 description: "node is not part of a swarm" 11396 schema: 11397 $ref: "#/definitions/ErrorResponse" 11398 parameters: 11399 - name: "id" 11400 in: "path" 11401 required: true 11402 type: "string" 11403 description: "ID of the secret" 11404 tags: ["Secret"] 11405 delete: 11406 summary: "Delete a secret" 11407 operationId: "SecretDelete" 11408 produces: 11409 - "application/json" 11410 responses: 11411 204: 11412 description: "no error" 11413 404: 11414 description: "secret not found" 11415 schema: 11416 $ref: "#/definitions/ErrorResponse" 11417 500: 11418 description: "server error" 11419 schema: 11420 $ref: "#/definitions/ErrorResponse" 11421 503: 11422 description: "node is not part of a swarm" 11423 schema: 11424 $ref: "#/definitions/ErrorResponse" 11425 parameters: 11426 - name: "id" 11427 in: "path" 11428 required: true 11429 type: "string" 11430 description: "ID of the secret" 11431 tags: ["Secret"] 11432 /secrets/{id}/update: 11433 post: 11434 summary: "Update a Secret" 11435 operationId: "SecretUpdate" 11436 responses: 11437 200: 11438 description: "no error" 11439 400: 11440 description: "bad parameter" 11441 schema: 11442 $ref: "#/definitions/ErrorResponse" 11443 404: 11444 description: "no such secret" 11445 schema: 11446 $ref: "#/definitions/ErrorResponse" 11447 500: 11448 description: "server error" 11449 schema: 11450 $ref: "#/definitions/ErrorResponse" 11451 503: 11452 description: "node is not part of a swarm" 11453 schema: 11454 $ref: "#/definitions/ErrorResponse" 11455 parameters: 11456 - name: "id" 11457 in: "path" 11458 description: "The ID or name of the secret" 11459 type: "string" 11460 required: true 11461 - name: "body" 11462 in: "body" 11463 schema: 11464 $ref: "#/definitions/SecretSpec" 11465 description: | 11466 The spec of the secret to update. Currently, only the Labels field 11467 can be updated. All other fields must remain unchanged from the 11468 [SecretInspect endpoint](#operation/SecretInspect) response values. 11469 - name: "version" 11470 in: "query" 11471 description: | 11472 The version number of the secret object being updated. This is 11473 required to avoid conflicting writes. 11474 type: "integer" 11475 format: "int64" 11476 required: true 11477 tags: ["Secret"] 11478 /configs: 11479 get: 11480 summary: "List configs" 11481 operationId: "ConfigList" 11482 produces: 11483 - "application/json" 11484 responses: 11485 200: 11486 description: "no error" 11487 schema: 11488 type: "array" 11489 items: 11490 $ref: "#/definitions/Config" 11491 example: 11492 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 11493 Version: 11494 Index: 11 11495 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11496 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11497 Spec: 11498 Name: "server.conf" 11499 500: 11500 description: "server error" 11501 schema: 11502 $ref: "#/definitions/ErrorResponse" 11503 503: 11504 description: "node is not part of a swarm" 11505 schema: 11506 $ref: "#/definitions/ErrorResponse" 11507 parameters: 11508 - name: "filters" 11509 in: "query" 11510 type: "string" 11511 description: | 11512 A JSON encoded value of the filters (a `map[string][]string`) to 11513 process on the configs list. 11514 11515 Available filters: 11516 11517 - `id=<config id>` 11518 - `label=<key> or label=<key>=value` 11519 - `name=<config name>` 11520 - `names=<config name>` 11521 tags: ["Config"] 11522 /configs/create: 11523 post: 11524 summary: "Create a config" 11525 operationId: "ConfigCreate" 11526 consumes: 11527 - "application/json" 11528 produces: 11529 - "application/json" 11530 responses: 11531 201: 11532 description: "no error" 11533 schema: 11534 $ref: "#/definitions/IdResponse" 11535 409: 11536 description: "name conflicts with an existing object" 11537 schema: 11538 $ref: "#/definitions/ErrorResponse" 11539 500: 11540 description: "server error" 11541 schema: 11542 $ref: "#/definitions/ErrorResponse" 11543 503: 11544 description: "node is not part of a swarm" 11545 schema: 11546 $ref: "#/definitions/ErrorResponse" 11547 parameters: 11548 - name: "body" 11549 in: "body" 11550 schema: 11551 allOf: 11552 - $ref: "#/definitions/ConfigSpec" 11553 - type: "object" 11554 example: 11555 Name: "server.conf" 11556 Labels: 11557 foo: "bar" 11558 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11559 tags: ["Config"] 11560 /configs/{id}: 11561 get: 11562 summary: "Inspect a config" 11563 operationId: "ConfigInspect" 11564 produces: 11565 - "application/json" 11566 responses: 11567 200: 11568 description: "no error" 11569 schema: 11570 $ref: "#/definitions/Config" 11571 examples: 11572 application/json: 11573 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11574 Version: 11575 Index: 11 11576 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11577 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11578 Spec: 11579 Name: "app-dev.crt" 11580 404: 11581 description: "config not found" 11582 schema: 11583 $ref: "#/definitions/ErrorResponse" 11584 500: 11585 description: "server error" 11586 schema: 11587 $ref: "#/definitions/ErrorResponse" 11588 503: 11589 description: "node is not part of a swarm" 11590 schema: 11591 $ref: "#/definitions/ErrorResponse" 11592 parameters: 11593 - name: "id" 11594 in: "path" 11595 required: true 11596 type: "string" 11597 description: "ID of the config" 11598 tags: ["Config"] 11599 delete: 11600 summary: "Delete a config" 11601 operationId: "ConfigDelete" 11602 produces: 11603 - "application/json" 11604 responses: 11605 204: 11606 description: "no error" 11607 404: 11608 description: "config not found" 11609 schema: 11610 $ref: "#/definitions/ErrorResponse" 11611 500: 11612 description: "server error" 11613 schema: 11614 $ref: "#/definitions/ErrorResponse" 11615 503: 11616 description: "node is not part of a swarm" 11617 schema: 11618 $ref: "#/definitions/ErrorResponse" 11619 parameters: 11620 - name: "id" 11621 in: "path" 11622 required: true 11623 type: "string" 11624 description: "ID of the config" 11625 tags: ["Config"] 11626 /configs/{id}/update: 11627 post: 11628 summary: "Update a Config" 11629 operationId: "ConfigUpdate" 11630 responses: 11631 200: 11632 description: "no error" 11633 400: 11634 description: "bad parameter" 11635 schema: 11636 $ref: "#/definitions/ErrorResponse" 11637 404: 11638 description: "no such config" 11639 schema: 11640 $ref: "#/definitions/ErrorResponse" 11641 500: 11642 description: "server error" 11643 schema: 11644 $ref: "#/definitions/ErrorResponse" 11645 503: 11646 description: "node is not part of a swarm" 11647 schema: 11648 $ref: "#/definitions/ErrorResponse" 11649 parameters: 11650 - name: "id" 11651 in: "path" 11652 description: "The ID or name of the config" 11653 type: "string" 11654 required: true 11655 - name: "body" 11656 in: "body" 11657 schema: 11658 $ref: "#/definitions/ConfigSpec" 11659 description: | 11660 The spec of the config to update. Currently, only the Labels field 11661 can be updated. All other fields must remain unchanged from the 11662 [ConfigInspect endpoint](#operation/ConfigInspect) response values. 11663 - name: "version" 11664 in: "query" 11665 description: | 11666 The version number of the config object being updated. This is 11667 required to avoid conflicting writes. 11668 type: "integer" 11669 format: "int64" 11670 required: true 11671 tags: ["Config"] 11672 /distribution/{name}/json: 11673 get: 11674 summary: "Get image information from the registry" 11675 description: | 11676 Return image digest and platform information by contacting the registry. 11677 operationId: "DistributionInspect" 11678 produces: 11679 - "application/json" 11680 responses: 11681 200: 11682 description: "descriptor and platform information" 11683 schema: 11684 $ref: "#/definitions/DistributionInspect" 11685 401: 11686 description: "Failed authentication or no image found" 11687 schema: 11688 $ref: "#/definitions/ErrorResponse" 11689 examples: 11690 application/json: 11691 message: "No such image: someimage (tag: latest)" 11692 500: 11693 description: "Server error" 11694 schema: 11695 $ref: "#/definitions/ErrorResponse" 11696 parameters: 11697 - name: "name" 11698 in: "path" 11699 description: "Image name or id" 11700 type: "string" 11701 required: true 11702 tags: ["Distribution"] 11703 /session: 11704 post: 11705 summary: "Initialize interactive session" 11706 description: | 11707 Start a new interactive session with a server. Session allows server to 11708 call back to the client for advanced capabilities. 11709 11710 ### Hijacking 11711 11712 This endpoint hijacks the HTTP connection to HTTP2 transport that allows 11713 the client to expose gPRC services on that connection. 11714 11715 For example, the client sends this request to upgrade the connection: 11716 11717 ``` 11718 POST /session HTTP/1.1 11719 Upgrade: h2c 11720 Connection: Upgrade 11721 ``` 11722 11723 The Docker daemon responds with a `101 UPGRADED` response follow with 11724 the raw stream: 11725 11726 ``` 11727 HTTP/1.1 101 UPGRADED 11728 Connection: Upgrade 11729 Upgrade: h2c 11730 ``` 11731 operationId: "Session" 11732 produces: 11733 - "application/vnd.docker.raw-stream" 11734 responses: 11735 101: 11736 description: "no error, hijacking successful" 11737 400: 11738 description: "bad parameter" 11739 schema: 11740 $ref: "#/definitions/ErrorResponse" 11741 500: 11742 description: "server error" 11743 schema: 11744 $ref: "#/definitions/ErrorResponse" 11745 tags: ["Session"]