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