github.com/rawahars/moby@v24.0.4+incompatible/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://golang.org/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://golang.org/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 4817 > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) 4818 > returns the Swarm version instead of the daemon version, for example 4819 > `swarm/1.2.8`. 4820 type: "string" 4821 example: "17.06.0-ce" 4822 ClusterStore: 4823 description: | 4824 URL of the distributed storage backend. 4825 4826 4827 The storage backend is used for multihost networking (to store 4828 network and endpoint information) and by the node discovery mechanism. 4829 4830 <p><br /></p> 4831 4832 > **Note**: This field is only propagated when using standalone Swarm 4833 > mode, and overlay networking using an external k/v store. Overlay 4834 > networks with Swarm mode enabled use the built-in raft store, and 4835 > this field will be empty. 4836 type: "string" 4837 example: "consul://consul.corp.example.com:8600/some/path" 4838 ClusterAdvertise: 4839 description: | 4840 The network endpoint that the Engine advertises for the purpose of 4841 node discovery. ClusterAdvertise is a `host:port` combination on which 4842 the daemon is reachable by other hosts. 4843 4844 <p><br /></p> 4845 4846 > **Note**: This field is only propagated when using standalone Swarm 4847 > mode, and overlay networking using an external k/v store. Overlay 4848 > networks with Swarm mode enabled use the built-in raft store, and 4849 > this field will be empty. 4850 type: "string" 4851 example: "node5.corp.example.com:8000" 4852 Runtimes: 4853 description: | 4854 List of [OCI compliant](https://github.com/opencontainers/runtime-spec) 4855 runtimes configured on the daemon. Keys hold the "name" used to 4856 reference the runtime. 4857 4858 The Docker daemon relies on an OCI compliant runtime (invoked via the 4859 `containerd` daemon) as its interface to the Linux kernel namespaces, 4860 cgroups, and SELinux. 4861 4862 The default runtime is `runc`, and automatically configured. Additional 4863 runtimes can be configured by the user and will be listed here. 4864 type: "object" 4865 additionalProperties: 4866 $ref: "#/definitions/Runtime" 4867 default: 4868 runc: 4869 path: "runc" 4870 example: 4871 runc: 4872 path: "runc" 4873 runc-master: 4874 path: "/go/bin/runc" 4875 custom: 4876 path: "/usr/local/bin/my-oci-runtime" 4877 runtimeArgs: ["--debug", "--systemd-cgroup=false"] 4878 DefaultRuntime: 4879 description: | 4880 Name of the default OCI runtime that is used when starting containers. 4881 4882 The default can be overridden per-container at create time. 4883 type: "string" 4884 default: "runc" 4885 example: "runc" 4886 Swarm: 4887 $ref: "#/definitions/SwarmInfo" 4888 LiveRestoreEnabled: 4889 description: | 4890 Indicates if live restore is enabled. 4891 4892 If enabled, containers are kept running when the daemon is shutdown 4893 or upon daemon start if running containers are detected. 4894 type: "boolean" 4895 default: false 4896 example: false 4897 Isolation: 4898 description: | 4899 Represents the isolation technology to use as a default for containers. 4900 The supported values are platform-specific. 4901 4902 If no isolation value is specified on daemon start, on Windows client, 4903 the default is `hyperv`, and on Windows server, the default is `process`. 4904 4905 This option is currently not used on other platforms. 4906 default: "default" 4907 type: "string" 4908 enum: 4909 - "default" 4910 - "hyperv" 4911 - "process" 4912 InitBinary: 4913 description: | 4914 Name and, optional, path of the `docker-init` binary. 4915 4916 If the path is omitted, the daemon searches the host's `$PATH` for the 4917 binary and uses the first result. 4918 type: "string" 4919 example: "docker-init" 4920 ContainerdCommit: 4921 $ref: "#/definitions/Commit" 4922 RuncCommit: 4923 $ref: "#/definitions/Commit" 4924 InitCommit: 4925 $ref: "#/definitions/Commit" 4926 SecurityOptions: 4927 description: | 4928 List of security features that are enabled on the daemon, such as 4929 apparmor, seccomp, SELinux, and user-namespaces (userns). 4930 4931 Additional configuration options for each security feature may 4932 be present, and are included as a comma-separated list of key/value 4933 pairs. 4934 type: "array" 4935 items: 4936 type: "string" 4937 example: 4938 - "name=apparmor" 4939 - "name=seccomp,profile=default" 4940 - "name=selinux" 4941 - "name=userns" 4942 ProductLicense: 4943 description: | 4944 Reports a summary of the product license on the daemon. 4945 4946 If a commercial license has been applied to the daemon, information 4947 such as number of nodes, and expiration are included. 4948 type: "string" 4949 example: "Community Engine" 4950 Warnings: 4951 description: | 4952 List of warnings / informational messages about missing features, or 4953 issues related to the daemon configuration. 4954 4955 These messages can be printed by the client as information to the user. 4956 type: "array" 4957 items: 4958 type: "string" 4959 example: 4960 - "WARNING: No memory limit support" 4961 - "WARNING: bridge-nf-call-iptables is disabled" 4962 - "WARNING: bridge-nf-call-ip6tables is disabled" 4963 4964 4965 # PluginsInfo is a temp struct holding Plugins name 4966 # registered with docker daemon. It is used by Info struct 4967 PluginsInfo: 4968 description: | 4969 Available plugins per type. 4970 4971 <p><br /></p> 4972 4973 > **Note**: Only unmanaged (V1) plugins are included in this list. 4974 > V1 plugins are "lazily" loaded, and are not returned in this list 4975 > if there is no resource using the plugin. 4976 type: "object" 4977 properties: 4978 Volume: 4979 description: "Names of available volume-drivers, and network-driver plugins." 4980 type: "array" 4981 items: 4982 type: "string" 4983 example: ["local"] 4984 Network: 4985 description: "Names of available network-drivers, and network-driver plugins." 4986 type: "array" 4987 items: 4988 type: "string" 4989 example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] 4990 Authorization: 4991 description: "Names of available authorization plugins." 4992 type: "array" 4993 items: 4994 type: "string" 4995 example: ["img-authz-plugin", "hbm"] 4996 Log: 4997 description: "Names of available logging-drivers, and logging-driver plugins." 4998 type: "array" 4999 items: 5000 type: "string" 5001 example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] 5002 5003 5004 RegistryServiceConfig: 5005 description: | 5006 RegistryServiceConfig stores daemon registry services configuration. 5007 type: "object" 5008 x-nullable: true 5009 properties: 5010 AllowNondistributableArtifactsCIDRs: 5011 description: | 5012 List of IP ranges to which nondistributable artifacts can be pushed, 5013 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). 5014 5015 Some images (for example, Windows base images) contain artifacts 5016 whose distribution is restricted by license. When these images are 5017 pushed to a registry, restricted artifacts are not included. 5018 5019 This configuration override this behavior, and enables the daemon to 5020 push nondistributable artifacts to all registries whose resolved IP 5021 address is within the subnet described by the CIDR syntax. 5022 5023 This option is useful when pushing images containing 5024 nondistributable artifacts to a registry on an air-gapped network so 5025 hosts on that network can pull the images without connecting to 5026 another server. 5027 5028 > **Warning**: Nondistributable artifacts typically have restrictions 5029 > on how and where they can be distributed and shared. Only use this 5030 > feature to push artifacts to private registries and ensure that you 5031 > are in compliance with any terms that cover redistributing 5032 > nondistributable artifacts. 5033 5034 type: "array" 5035 items: 5036 type: "string" 5037 example: ["::1/128", "127.0.0.0/8"] 5038 AllowNondistributableArtifactsHostnames: 5039 description: | 5040 List of registry hostnames to which nondistributable artifacts can be 5041 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. 5042 5043 Some images (for example, Windows base images) contain artifacts 5044 whose distribution is restricted by license. When these images are 5045 pushed to a registry, restricted artifacts are not included. 5046 5047 This configuration override this behavior for the specified 5048 registries. 5049 5050 This option is useful when pushing images containing 5051 nondistributable artifacts to a registry on an air-gapped network so 5052 hosts on that network can pull the images without connecting to 5053 another server. 5054 5055 > **Warning**: Nondistributable artifacts typically have restrictions 5056 > on how and where they can be distributed and shared. Only use this 5057 > feature to push artifacts to private registries and ensure that you 5058 > are in compliance with any terms that cover redistributing 5059 > nondistributable artifacts. 5060 type: "array" 5061 items: 5062 type: "string" 5063 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] 5064 InsecureRegistryCIDRs: 5065 description: | 5066 List of IP ranges of insecure registries, using the CIDR syntax 5067 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries 5068 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates 5069 from unknown CAs) communication. 5070 5071 By default, local registries (`127.0.0.0/8`) are configured as 5072 insecure. All other registries are secure. Communicating with an 5073 insecure registry is not possible if the daemon assumes that registry 5074 is secure. 5075 5076 This configuration override this behavior, insecure communication with 5077 registries whose resolved IP address is within the subnet described by 5078 the CIDR syntax. 5079 5080 Registries can also be marked insecure by hostname. Those registries 5081 are listed under `IndexConfigs` and have their `Secure` field set to 5082 `false`. 5083 5084 > **Warning**: Using this option can be useful when running a local 5085 > registry, but introduces security vulnerabilities. This option 5086 > should therefore ONLY be used for testing purposes. For increased 5087 > security, users should add their CA to their system's list of trusted 5088 > CAs instead of enabling this option. 5089 type: "array" 5090 items: 5091 type: "string" 5092 example: ["::1/128", "127.0.0.0/8"] 5093 IndexConfigs: 5094 type: "object" 5095 additionalProperties: 5096 $ref: "#/definitions/IndexInfo" 5097 example: 5098 "127.0.0.1:5000": 5099 "Name": "127.0.0.1:5000" 5100 "Mirrors": [] 5101 "Secure": false 5102 "Official": false 5103 "[2001:db8:a0b:12f0::1]:80": 5104 "Name": "[2001:db8:a0b:12f0::1]:80" 5105 "Mirrors": [] 5106 "Secure": false 5107 "Official": false 5108 "docker.io": 5109 Name: "docker.io" 5110 Mirrors: ["https://hub-mirror.corp.example.com:5000/"] 5111 Secure: true 5112 Official: true 5113 "registry.internal.corp.example.com:3000": 5114 Name: "registry.internal.corp.example.com:3000" 5115 Mirrors: [] 5116 Secure: false 5117 Official: false 5118 Mirrors: 5119 description: | 5120 List of registry URLs that act as a mirror for the official 5121 (`docker.io`) registry. 5122 5123 type: "array" 5124 items: 5125 type: "string" 5126 example: 5127 - "https://hub-mirror.corp.example.com:5000/" 5128 - "https://[2001:db8:a0b:12f0::1]/" 5129 5130 IndexInfo: 5131 description: 5132 IndexInfo contains information about a registry. 5133 type: "object" 5134 x-nullable: true 5135 properties: 5136 Name: 5137 description: | 5138 Name of the registry, such as "docker.io". 5139 type: "string" 5140 example: "docker.io" 5141 Mirrors: 5142 description: | 5143 List of mirrors, expressed as URIs. 5144 type: "array" 5145 items: 5146 type: "string" 5147 example: 5148 - "https://hub-mirror.corp.example.com:5000/" 5149 - "https://registry-2.docker.io/" 5150 - "https://registry-3.docker.io/" 5151 Secure: 5152 description: | 5153 Indicates if the registry is part of the list of insecure 5154 registries. 5155 5156 If `false`, the registry is insecure. Insecure registries accept 5157 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from 5158 unknown CAs) communication. 5159 5160 > **Warning**: Insecure registries can be useful when running a local 5161 > registry. However, because its use creates security vulnerabilities 5162 > it should ONLY be enabled for testing purposes. For increased 5163 > security, users should add their CA to their system's list of 5164 > trusted CAs instead of enabling this option. 5165 type: "boolean" 5166 example: true 5167 Official: 5168 description: | 5169 Indicates whether this is an official registry (i.e., Docker Hub / docker.io) 5170 type: "boolean" 5171 example: true 5172 5173 Runtime: 5174 description: | 5175 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) 5176 runtime. 5177 5178 The runtime is invoked by the daemon via the `containerd` daemon. OCI 5179 runtimes act as an interface to the Linux kernel namespaces, cgroups, 5180 and SELinux. 5181 type: "object" 5182 properties: 5183 path: 5184 description: | 5185 Name and, optional, path, of the OCI executable binary. 5186 5187 If the path is omitted, the daemon searches the host's `$PATH` for the 5188 binary and uses the first result. 5189 type: "string" 5190 example: "/usr/local/bin/my-oci-runtime" 5191 runtimeArgs: 5192 description: | 5193 List of command-line arguments to pass to the runtime when invoked. 5194 type: "array" 5195 x-nullable: true 5196 items: 5197 type: "string" 5198 example: ["--debug", "--systemd-cgroup=false"] 5199 5200 Commit: 5201 description: | 5202 Commit holds the Git-commit (SHA1) that a binary was built from, as 5203 reported in the version-string of external tools, such as `containerd`, 5204 or `runC`. 5205 type: "object" 5206 properties: 5207 ID: 5208 description: "Actual commit ID of external tool." 5209 type: "string" 5210 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" 5211 Expected: 5212 description: | 5213 Commit ID of external tool expected by dockerd as set at build time. 5214 type: "string" 5215 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" 5216 5217 SwarmInfo: 5218 description: | 5219 Represents generic information about swarm. 5220 type: "object" 5221 properties: 5222 NodeID: 5223 description: "Unique identifier of for this node in the swarm." 5224 type: "string" 5225 default: "" 5226 example: "k67qz4598weg5unwwffg6z1m1" 5227 NodeAddr: 5228 description: | 5229 IP address at which this node can be reached by other nodes in the 5230 swarm. 5231 type: "string" 5232 default: "" 5233 example: "10.0.0.46" 5234 LocalNodeState: 5235 $ref: "#/definitions/LocalNodeState" 5236 ControlAvailable: 5237 type: "boolean" 5238 default: false 5239 example: true 5240 Error: 5241 type: "string" 5242 default: "" 5243 RemoteManagers: 5244 description: | 5245 List of ID's and addresses of other managers in the swarm. 5246 type: "array" 5247 default: null 5248 x-nullable: true 5249 items: 5250 $ref: "#/definitions/PeerNode" 5251 example: 5252 - NodeID: "71izy0goik036k48jg985xnds" 5253 Addr: "10.0.0.158:2377" 5254 - NodeID: "79y6h1o4gv8n120drcprv5nmc" 5255 Addr: "10.0.0.159:2377" 5256 - NodeID: "k67qz4598weg5unwwffg6z1m1" 5257 Addr: "10.0.0.46:2377" 5258 Nodes: 5259 description: "Total number of nodes in the swarm." 5260 type: "integer" 5261 x-nullable: true 5262 example: 4 5263 Managers: 5264 description: "Total number of managers in the swarm." 5265 type: "integer" 5266 x-nullable: true 5267 example: 3 5268 Cluster: 5269 $ref: "#/definitions/ClusterInfo" 5270 5271 LocalNodeState: 5272 description: "Current local status of this node." 5273 type: "string" 5274 default: "" 5275 enum: 5276 - "" 5277 - "inactive" 5278 - "pending" 5279 - "active" 5280 - "error" 5281 - "locked" 5282 example: "active" 5283 5284 PeerNode: 5285 description: "Represents a peer-node in the swarm" 5286 type: "object" 5287 properties: 5288 NodeID: 5289 description: "Unique identifier of for this node in the swarm." 5290 type: "string" 5291 Addr: 5292 description: | 5293 IP address and ports at which this node can be reached. 5294 type: "string" 5295 5296 NetworkAttachmentConfig: 5297 description: | 5298 Specifies how a service should be attached to a particular network. 5299 type: "object" 5300 properties: 5301 Target: 5302 description: | 5303 The target network for attachment. Must be a network name or ID. 5304 type: "string" 5305 Aliases: 5306 description: | 5307 Discoverable alternate names for the service on this network. 5308 type: "array" 5309 items: 5310 type: "string" 5311 DriverOpts: 5312 description: | 5313 Driver attachment options for the network target. 5314 type: "object" 5315 additionalProperties: 5316 type: "string" 5317 5318 paths: 5319 /containers/json: 5320 get: 5321 summary: "List containers" 5322 description: | 5323 Returns a list of containers. For details on the format, see the 5324 [inspect endpoint](#operation/ContainerInspect). 5325 5326 Note that it uses a different, smaller representation of a container 5327 than inspecting a single container. For example, the list of linked 5328 containers is not propagated . 5329 operationId: "ContainerList" 5330 produces: 5331 - "application/json" 5332 parameters: 5333 - name: "all" 5334 in: "query" 5335 description: | 5336 Return all containers. By default, only running containers are shown. 5337 type: "boolean" 5338 default: false 5339 - name: "limit" 5340 in: "query" 5341 description: | 5342 Return this number of most recently created containers, including 5343 non-running ones. 5344 type: "integer" 5345 - name: "size" 5346 in: "query" 5347 description: | 5348 Return the size of container as fields `SizeRw` and `SizeRootFs`. 5349 type: "boolean" 5350 default: false 5351 - name: "filters" 5352 in: "query" 5353 description: | 5354 Filters to process on the container list, encoded as JSON (a 5355 `map[string][]string`). For example, `{"status": ["paused"]}` will 5356 only return paused containers. 5357 5358 Available filters: 5359 5360 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 5361 - `before`=(`<container id>` or `<container name>`) 5362 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5363 - `exited=<int>` containers with exit code of `<int>` 5364 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 5365 - `id=<ID>` a container's ID 5366 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 5367 - `is-task=`(`true`|`false`) 5368 - `label=key` or `label="key=value"` of a container label 5369 - `name=<name>` a container's name 5370 - `network`=(`<network id>` or `<network name>`) 5371 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5372 - `since`=(`<container id>` or `<container name>`) 5373 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 5374 - `volume`=(`<volume name>` or `<mount point destination>`) 5375 type: "string" 5376 responses: 5377 200: 5378 description: "no error" 5379 schema: 5380 $ref: "#/definitions/ContainerSummary" 5381 examples: 5382 application/json: 5383 - Id: "8dfafdbc3a40" 5384 Names: 5385 - "/boring_feynman" 5386 Image: "ubuntu:latest" 5387 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5388 Command: "echo 1" 5389 Created: 1367854155 5390 State: "Exited" 5391 Status: "Exit 0" 5392 Ports: 5393 - PrivatePort: 2222 5394 PublicPort: 3333 5395 Type: "tcp" 5396 Labels: 5397 com.example.vendor: "Acme" 5398 com.example.license: "GPL" 5399 com.example.version: "1.0" 5400 SizeRw: 12288 5401 SizeRootFs: 0 5402 HostConfig: 5403 NetworkMode: "default" 5404 NetworkSettings: 5405 Networks: 5406 bridge: 5407 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5408 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 5409 Gateway: "172.17.0.1" 5410 IPAddress: "172.17.0.2" 5411 IPPrefixLen: 16 5412 IPv6Gateway: "" 5413 GlobalIPv6Address: "" 5414 GlobalIPv6PrefixLen: 0 5415 MacAddress: "02:42:ac:11:00:02" 5416 Mounts: 5417 - Name: "fac362...80535" 5418 Source: "/data" 5419 Destination: "/data" 5420 Driver: "local" 5421 Mode: "ro,Z" 5422 RW: false 5423 Propagation: "" 5424 - Id: "9cd87474be90" 5425 Names: 5426 - "/coolName" 5427 Image: "ubuntu:latest" 5428 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5429 Command: "echo 222222" 5430 Created: 1367854155 5431 State: "Exited" 5432 Status: "Exit 0" 5433 Ports: [] 5434 Labels: {} 5435 SizeRw: 12288 5436 SizeRootFs: 0 5437 HostConfig: 5438 NetworkMode: "default" 5439 NetworkSettings: 5440 Networks: 5441 bridge: 5442 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5443 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 5444 Gateway: "172.17.0.1" 5445 IPAddress: "172.17.0.8" 5446 IPPrefixLen: 16 5447 IPv6Gateway: "" 5448 GlobalIPv6Address: "" 5449 GlobalIPv6PrefixLen: 0 5450 MacAddress: "02:42:ac:11:00:08" 5451 Mounts: [] 5452 - Id: "3176a2479c92" 5453 Names: 5454 - "/sleepy_dog" 5455 Image: "ubuntu:latest" 5456 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5457 Command: "echo 3333333333333333" 5458 Created: 1367854154 5459 State: "Exited" 5460 Status: "Exit 0" 5461 Ports: [] 5462 Labels: {} 5463 SizeRw: 12288 5464 SizeRootFs: 0 5465 HostConfig: 5466 NetworkMode: "default" 5467 NetworkSettings: 5468 Networks: 5469 bridge: 5470 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5471 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 5472 Gateway: "172.17.0.1" 5473 IPAddress: "172.17.0.6" 5474 IPPrefixLen: 16 5475 IPv6Gateway: "" 5476 GlobalIPv6Address: "" 5477 GlobalIPv6PrefixLen: 0 5478 MacAddress: "02:42:ac:11:00:06" 5479 Mounts: [] 5480 - Id: "4cb07b47f9fb" 5481 Names: 5482 - "/running_cat" 5483 Image: "ubuntu:latest" 5484 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5485 Command: "echo 444444444444444444444444444444444" 5486 Created: 1367854152 5487 State: "Exited" 5488 Status: "Exit 0" 5489 Ports: [] 5490 Labels: {} 5491 SizeRw: 12288 5492 SizeRootFs: 0 5493 HostConfig: 5494 NetworkMode: "default" 5495 NetworkSettings: 5496 Networks: 5497 bridge: 5498 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5499 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 5500 Gateway: "172.17.0.1" 5501 IPAddress: "172.17.0.5" 5502 IPPrefixLen: 16 5503 IPv6Gateway: "" 5504 GlobalIPv6Address: "" 5505 GlobalIPv6PrefixLen: 0 5506 MacAddress: "02:42:ac:11:00:05" 5507 Mounts: [] 5508 400: 5509 description: "bad parameter" 5510 schema: 5511 $ref: "#/definitions/ErrorResponse" 5512 500: 5513 description: "server error" 5514 schema: 5515 $ref: "#/definitions/ErrorResponse" 5516 tags: ["Container"] 5517 /containers/create: 5518 post: 5519 summary: "Create a container" 5520 operationId: "ContainerCreate" 5521 consumes: 5522 - "application/json" 5523 - "application/octet-stream" 5524 produces: 5525 - "application/json" 5526 parameters: 5527 - name: "name" 5528 in: "query" 5529 description: | 5530 Assign the specified name to the container. Must match 5531 `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. 5532 type: "string" 5533 pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" 5534 - name: "body" 5535 in: "body" 5536 description: "Container to create" 5537 schema: 5538 allOf: 5539 - $ref: "#/definitions/ContainerConfig" 5540 - type: "object" 5541 properties: 5542 HostConfig: 5543 $ref: "#/definitions/HostConfig" 5544 NetworkingConfig: 5545 $ref: "#/definitions/NetworkingConfig" 5546 example: 5547 Hostname: "" 5548 Domainname: "" 5549 User: "" 5550 AttachStdin: false 5551 AttachStdout: true 5552 AttachStderr: true 5553 Tty: false 5554 OpenStdin: false 5555 StdinOnce: false 5556 Env: 5557 - "FOO=bar" 5558 - "BAZ=quux" 5559 Cmd: 5560 - "date" 5561 Entrypoint: "" 5562 Image: "ubuntu" 5563 Labels: 5564 com.example.vendor: "Acme" 5565 com.example.license: "GPL" 5566 com.example.version: "1.0" 5567 Volumes: 5568 /volumes/data: {} 5569 WorkingDir: "" 5570 NetworkDisabled: false 5571 MacAddress: "12:34:56:78:9a:bc" 5572 ExposedPorts: 5573 22/tcp: {} 5574 StopSignal: "SIGTERM" 5575 StopTimeout: 10 5576 HostConfig: 5577 Binds: 5578 - "/tmp:/tmp" 5579 Links: 5580 - "redis3:redis" 5581 Memory: 0 5582 MemorySwap: 0 5583 MemoryReservation: 0 5584 KernelMemory: 0 5585 NanoCpus: 500000 5586 CpuPercent: 80 5587 CpuShares: 512 5588 CpuPeriod: 100000 5589 CpuRealtimePeriod: 1000000 5590 CpuRealtimeRuntime: 10000 5591 CpuQuota: 50000 5592 CpusetCpus: "0,1" 5593 CpusetMems: "0,1" 5594 MaximumIOps: 0 5595 MaximumIOBps: 0 5596 BlkioWeight: 300 5597 BlkioWeightDevice: 5598 - {} 5599 BlkioDeviceReadBps: 5600 - {} 5601 BlkioDeviceReadIOps: 5602 - {} 5603 BlkioDeviceWriteBps: 5604 - {} 5605 BlkioDeviceWriteIOps: 5606 - {} 5607 MemorySwappiness: 60 5608 OomKillDisable: false 5609 OomScoreAdj: 500 5610 PidMode: "" 5611 PidsLimit: -1 5612 PortBindings: 5613 22/tcp: 5614 - HostPort: "11022" 5615 PublishAllPorts: false 5616 Privileged: false 5617 ReadonlyRootfs: false 5618 Dns: 5619 - "8.8.8.8" 5620 DnsOptions: 5621 - "" 5622 DnsSearch: 5623 - "" 5624 VolumesFrom: 5625 - "parent" 5626 - "other:ro" 5627 CapAdd: 5628 - "NET_ADMIN" 5629 CapDrop: 5630 - "MKNOD" 5631 GroupAdd: 5632 - "newgroup" 5633 RestartPolicy: 5634 Name: "" 5635 MaximumRetryCount: 0 5636 AutoRemove: true 5637 NetworkMode: "bridge" 5638 Devices: [] 5639 Ulimits: 5640 - {} 5641 LogConfig: 5642 Type: "json-file" 5643 Config: {} 5644 SecurityOpt: [] 5645 StorageOpt: {} 5646 CgroupParent: "" 5647 VolumeDriver: "" 5648 ShmSize: 67108864 5649 NetworkingConfig: 5650 EndpointsConfig: 5651 isolated_nw: 5652 IPAMConfig: 5653 IPv4Address: "172.20.30.33" 5654 IPv6Address: "2001:db8:abcd::3033" 5655 LinkLocalIPs: 5656 - "169.254.34.68" 5657 - "fe80::3468" 5658 Links: 5659 - "container_1" 5660 - "container_2" 5661 Aliases: 5662 - "server_x" 5663 - "server_y" 5664 5665 required: true 5666 responses: 5667 201: 5668 description: "Container created successfully" 5669 schema: 5670 type: "object" 5671 title: "ContainerCreateResponse" 5672 description: "OK response to ContainerCreate operation" 5673 required: [Id, Warnings] 5674 properties: 5675 Id: 5676 description: "The ID of the created container" 5677 type: "string" 5678 x-nullable: false 5679 Warnings: 5680 description: "Warnings encountered when creating the container" 5681 type: "array" 5682 x-nullable: false 5683 items: 5684 type: "string" 5685 examples: 5686 application/json: 5687 Id: "e90e34656806" 5688 Warnings: [] 5689 400: 5690 description: "bad parameter" 5691 schema: 5692 $ref: "#/definitions/ErrorResponse" 5693 404: 5694 description: "no such image" 5695 schema: 5696 $ref: "#/definitions/ErrorResponse" 5697 examples: 5698 application/json: 5699 message: "No such image: c2ada9df5af8" 5700 409: 5701 description: "conflict" 5702 schema: 5703 $ref: "#/definitions/ErrorResponse" 5704 500: 5705 description: "server error" 5706 schema: 5707 $ref: "#/definitions/ErrorResponse" 5708 tags: ["Container"] 5709 /containers/{id}/json: 5710 get: 5711 summary: "Inspect a container" 5712 description: "Return low-level information about a container." 5713 operationId: "ContainerInspect" 5714 produces: 5715 - "application/json" 5716 responses: 5717 200: 5718 description: "no error" 5719 schema: 5720 type: "object" 5721 title: "ContainerInspectResponse" 5722 properties: 5723 Id: 5724 description: "The ID of the container" 5725 type: "string" 5726 Created: 5727 description: "The time the container was created" 5728 type: "string" 5729 Path: 5730 description: "The path to the command being run" 5731 type: "string" 5732 Args: 5733 description: "The arguments to the command being run" 5734 type: "array" 5735 items: 5736 type: "string" 5737 State: 5738 $ref: "#/definitions/ContainerState" 5739 Image: 5740 description: "The container's image ID" 5741 type: "string" 5742 ResolvConfPath: 5743 type: "string" 5744 HostnamePath: 5745 type: "string" 5746 HostsPath: 5747 type: "string" 5748 LogPath: 5749 type: "string" 5750 Name: 5751 type: "string" 5752 RestartCount: 5753 type: "integer" 5754 Driver: 5755 type: "string" 5756 MountLabel: 5757 type: "string" 5758 ProcessLabel: 5759 type: "string" 5760 AppArmorProfile: 5761 type: "string" 5762 ExecIDs: 5763 description: "IDs of exec instances that are running in the container." 5764 type: "array" 5765 items: 5766 type: "string" 5767 x-nullable: true 5768 HostConfig: 5769 $ref: "#/definitions/HostConfig" 5770 GraphDriver: 5771 $ref: "#/definitions/GraphDriverData" 5772 SizeRw: 5773 description: | 5774 The size of files that have been created or changed by this 5775 container. 5776 type: "integer" 5777 format: "int64" 5778 SizeRootFs: 5779 description: "The total size of all the files in this container." 5780 type: "integer" 5781 format: "int64" 5782 Mounts: 5783 type: "array" 5784 items: 5785 $ref: "#/definitions/MountPoint" 5786 Config: 5787 $ref: "#/definitions/ContainerConfig" 5788 NetworkSettings: 5789 $ref: "#/definitions/NetworkSettings" 5790 examples: 5791 application/json: 5792 AppArmorProfile: "" 5793 Args: 5794 - "-c" 5795 - "exit 9" 5796 Config: 5797 AttachStderr: true 5798 AttachStdin: false 5799 AttachStdout: true 5800 Cmd: 5801 - "/bin/sh" 5802 - "-c" 5803 - "exit 9" 5804 Domainname: "" 5805 Env: 5806 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 5807 Healthcheck: 5808 Test: ["CMD-SHELL", "exit 0"] 5809 Hostname: "ba033ac44011" 5810 Image: "ubuntu" 5811 Labels: 5812 com.example.vendor: "Acme" 5813 com.example.license: "GPL" 5814 com.example.version: "1.0" 5815 MacAddress: "" 5816 NetworkDisabled: false 5817 OpenStdin: false 5818 StdinOnce: false 5819 Tty: false 5820 User: "" 5821 Volumes: 5822 /volumes/data: {} 5823 WorkingDir: "" 5824 StopSignal: "SIGTERM" 5825 StopTimeout: 10 5826 Created: "2015-01-06T15:47:31.485331387Z" 5827 Driver: "devicemapper" 5828 ExecIDs: 5829 - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" 5830 - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" 5831 HostConfig: 5832 MaximumIOps: 0 5833 MaximumIOBps: 0 5834 BlkioWeight: 0 5835 BlkioWeightDevice: 5836 - {} 5837 BlkioDeviceReadBps: 5838 - {} 5839 BlkioDeviceWriteBps: 5840 - {} 5841 BlkioDeviceReadIOps: 5842 - {} 5843 BlkioDeviceWriteIOps: 5844 - {} 5845 ContainerIDFile: "" 5846 CpusetCpus: "" 5847 CpusetMems: "" 5848 CpuPercent: 80 5849 CpuShares: 0 5850 CpuPeriod: 100000 5851 CpuRealtimePeriod: 1000000 5852 CpuRealtimeRuntime: 10000 5853 Devices: [] 5854 IpcMode: "" 5855 Memory: 0 5856 MemorySwap: 0 5857 MemoryReservation: 0 5858 KernelMemory: 0 5859 OomKillDisable: false 5860 OomScoreAdj: 500 5861 NetworkMode: "bridge" 5862 PidMode: "" 5863 PortBindings: {} 5864 Privileged: false 5865 ReadonlyRootfs: false 5866 PublishAllPorts: false 5867 RestartPolicy: 5868 MaximumRetryCount: 2 5869 Name: "on-failure" 5870 LogConfig: 5871 Type: "json-file" 5872 Sysctls: 5873 net.ipv4.ip_forward: "1" 5874 Ulimits: 5875 - {} 5876 VolumeDriver: "" 5877 ShmSize: 67108864 5878 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 5879 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 5880 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 5881 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 5882 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 5883 MountLabel: "" 5884 Name: "/boring_euclid" 5885 NetworkSettings: 5886 Bridge: "" 5887 SandboxID: "" 5888 HairpinMode: false 5889 LinkLocalIPv6Address: "" 5890 LinkLocalIPv6PrefixLen: 0 5891 SandboxKey: "" 5892 EndpointID: "" 5893 Gateway: "" 5894 GlobalIPv6Address: "" 5895 GlobalIPv6PrefixLen: 0 5896 IPAddress: "" 5897 IPPrefixLen: 0 5898 IPv6Gateway: "" 5899 MacAddress: "" 5900 Networks: 5901 bridge: 5902 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5903 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 5904 Gateway: "172.17.0.1" 5905 IPAddress: "172.17.0.2" 5906 IPPrefixLen: 16 5907 IPv6Gateway: "" 5908 GlobalIPv6Address: "" 5909 GlobalIPv6PrefixLen: 0 5910 MacAddress: "02:42:ac:12:00:02" 5911 Path: "/bin/sh" 5912 ProcessLabel: "" 5913 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 5914 RestartCount: 1 5915 State: 5916 Error: "" 5917 ExitCode: 9 5918 FinishedAt: "2015-01-06T15:47:32.080254511Z" 5919 Health: 5920 Status: "healthy" 5921 FailingStreak: 0 5922 Log: 5923 - Start: "2019-12-22T10:59:05.6385933Z" 5924 End: "2019-12-22T10:59:05.8078452Z" 5925 ExitCode: 0 5926 Output: "" 5927 OOMKilled: false 5928 Dead: false 5929 Paused: false 5930 Pid: 0 5931 Restarting: false 5932 Running: true 5933 StartedAt: "2015-01-06T15:47:32.072697474Z" 5934 Status: "running" 5935 Mounts: 5936 - Name: "fac362...80535" 5937 Source: "/data" 5938 Destination: "/data" 5939 Driver: "local" 5940 Mode: "ro,Z" 5941 RW: false 5942 Propagation: "" 5943 404: 5944 description: "no such container" 5945 schema: 5946 $ref: "#/definitions/ErrorResponse" 5947 examples: 5948 application/json: 5949 message: "No such container: c2ada9df5af8" 5950 500: 5951 description: "server error" 5952 schema: 5953 $ref: "#/definitions/ErrorResponse" 5954 parameters: 5955 - name: "id" 5956 in: "path" 5957 required: true 5958 description: "ID or name of the container" 5959 type: "string" 5960 - name: "size" 5961 in: "query" 5962 type: "boolean" 5963 default: false 5964 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 5965 tags: ["Container"] 5966 /containers/{id}/top: 5967 get: 5968 summary: "List processes running inside a container" 5969 description: | 5970 On Unix systems, this is done by running the `ps` command. This endpoint 5971 is not supported on Windows. 5972 operationId: "ContainerTop" 5973 responses: 5974 200: 5975 description: "no error" 5976 schema: 5977 type: "object" 5978 title: "ContainerTopResponse" 5979 description: "OK response to ContainerTop operation" 5980 properties: 5981 Titles: 5982 description: "The ps column titles" 5983 type: "array" 5984 items: 5985 type: "string" 5986 Processes: 5987 description: | 5988 Each process running in the container, where each is process 5989 is an array of values corresponding to the titles. 5990 type: "array" 5991 items: 5992 type: "array" 5993 items: 5994 type: "string" 5995 examples: 5996 application/json: 5997 Titles: 5998 - "UID" 5999 - "PID" 6000 - "PPID" 6001 - "C" 6002 - "STIME" 6003 - "TTY" 6004 - "TIME" 6005 - "CMD" 6006 Processes: 6007 - 6008 - "root" 6009 - "13642" 6010 - "882" 6011 - "0" 6012 - "17:03" 6013 - "pts/0" 6014 - "00:00:00" 6015 - "/bin/bash" 6016 - 6017 - "root" 6018 - "13735" 6019 - "13642" 6020 - "0" 6021 - "17:06" 6022 - "pts/0" 6023 - "00:00:00" 6024 - "sleep 10" 6025 404: 6026 description: "no such container" 6027 schema: 6028 $ref: "#/definitions/ErrorResponse" 6029 examples: 6030 application/json: 6031 message: "No such container: c2ada9df5af8" 6032 500: 6033 description: "server error" 6034 schema: 6035 $ref: "#/definitions/ErrorResponse" 6036 parameters: 6037 - name: "id" 6038 in: "path" 6039 required: true 6040 description: "ID or name of the container" 6041 type: "string" 6042 - name: "ps_args" 6043 in: "query" 6044 description: "The arguments to pass to `ps`. For example, `aux`" 6045 type: "string" 6046 default: "-ef" 6047 tags: ["Container"] 6048 /containers/{id}/logs: 6049 get: 6050 summary: "Get container logs" 6051 description: | 6052 Get `stdout` and `stderr` logs from a container. 6053 6054 Note: This endpoint works only for containers with the `json-file` or 6055 `journald` logging driver. 6056 operationId: "ContainerLogs" 6057 responses: 6058 101: 6059 description: "logs returned as a stream" 6060 schema: 6061 type: "string" 6062 format: "binary" 6063 200: 6064 description: "logs returned as a string in response body" 6065 schema: 6066 type: "string" 6067 404: 6068 description: "no such container" 6069 schema: 6070 $ref: "#/definitions/ErrorResponse" 6071 examples: 6072 application/json: 6073 message: "No such container: c2ada9df5af8" 6074 500: 6075 description: "server error" 6076 schema: 6077 $ref: "#/definitions/ErrorResponse" 6078 parameters: 6079 - name: "id" 6080 in: "path" 6081 required: true 6082 description: "ID or name of the container" 6083 type: "string" 6084 - name: "follow" 6085 in: "query" 6086 description: | 6087 Return the logs as a stream. 6088 6089 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). 6090 type: "boolean" 6091 default: false 6092 - name: "stdout" 6093 in: "query" 6094 description: "Return logs from `stdout`" 6095 type: "boolean" 6096 default: false 6097 - name: "stderr" 6098 in: "query" 6099 description: "Return logs from `stderr`" 6100 type: "boolean" 6101 default: false 6102 - name: "since" 6103 in: "query" 6104 description: "Only return logs since this time, as a UNIX timestamp" 6105 type: "integer" 6106 default: 0 6107 - name: "until" 6108 in: "query" 6109 description: "Only return logs before this time, as a UNIX timestamp" 6110 type: "integer" 6111 default: 0 6112 - name: "timestamps" 6113 in: "query" 6114 description: "Add timestamps to every log line" 6115 type: "boolean" 6116 default: false 6117 - name: "tail" 6118 in: "query" 6119 description: | 6120 Only return this number of log lines from the end of the logs. 6121 Specify as an integer or `all` to output all log lines. 6122 type: "string" 6123 default: "all" 6124 tags: ["Container"] 6125 /containers/{id}/changes: 6126 get: 6127 summary: "Get changes on a container’s filesystem" 6128 description: | 6129 Returns which files in a container's filesystem have been added, deleted, 6130 or modified. The `Kind` of modification can be one of: 6131 6132 - `0`: Modified 6133 - `1`: Added 6134 - `2`: Deleted 6135 operationId: "ContainerChanges" 6136 produces: ["application/json"] 6137 responses: 6138 200: 6139 description: "The list of changes" 6140 schema: 6141 type: "array" 6142 items: 6143 type: "object" 6144 x-go-name: "ContainerChangeResponseItem" 6145 title: "ContainerChangeResponseItem" 6146 description: "change item in response to ContainerChanges operation" 6147 required: [Path, Kind] 6148 properties: 6149 Path: 6150 description: "Path to file that has changed" 6151 type: "string" 6152 x-nullable: false 6153 Kind: 6154 description: "Kind of change" 6155 type: "integer" 6156 format: "uint8" 6157 enum: [0, 1, 2] 6158 x-nullable: false 6159 examples: 6160 application/json: 6161 - Path: "/dev" 6162 Kind: 0 6163 - Path: "/dev/kmsg" 6164 Kind: 1 6165 - Path: "/test" 6166 Kind: 1 6167 404: 6168 description: "no such container" 6169 schema: 6170 $ref: "#/definitions/ErrorResponse" 6171 examples: 6172 application/json: 6173 message: "No such container: c2ada9df5af8" 6174 500: 6175 description: "server error" 6176 schema: 6177 $ref: "#/definitions/ErrorResponse" 6178 parameters: 6179 - name: "id" 6180 in: "path" 6181 required: true 6182 description: "ID or name of the container" 6183 type: "string" 6184 tags: ["Container"] 6185 /containers/{id}/export: 6186 get: 6187 summary: "Export a container" 6188 description: "Export the contents of a container as a tarball." 6189 operationId: "ContainerExport" 6190 produces: 6191 - "application/octet-stream" 6192 responses: 6193 200: 6194 description: "no error" 6195 404: 6196 description: "no such container" 6197 schema: 6198 $ref: "#/definitions/ErrorResponse" 6199 examples: 6200 application/json: 6201 message: "No such container: c2ada9df5af8" 6202 500: 6203 description: "server error" 6204 schema: 6205 $ref: "#/definitions/ErrorResponse" 6206 parameters: 6207 - name: "id" 6208 in: "path" 6209 required: true 6210 description: "ID or name of the container" 6211 type: "string" 6212 tags: ["Container"] 6213 /containers/{id}/stats: 6214 get: 6215 summary: "Get container stats based on resource usage" 6216 description: | 6217 This endpoint returns a live stream of a container’s resource usage 6218 statistics. 6219 6220 The `precpu_stats` is the CPU statistic of the *previous* read, and is 6221 used to calculate the CPU usage percentage. It is not an exact copy 6222 of the `cpu_stats` field. 6223 6224 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 6225 nil then for compatibility with older daemons the length of the 6226 corresponding `cpu_usage.percpu_usage` array should be used. 6227 6228 To calculate the values shown by the `stats` command of the docker cli tool 6229 the following formulas can be used: 6230 * used_memory = `memory_stats.usage - memory_stats.stats.cache` 6231 * available_memory = `memory_stats.limit` 6232 * Memory usage % = `(used_memory / available_memory) * 100.0` 6233 * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` 6234 * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` 6235 * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` 6236 * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` 6237 operationId: "ContainerStats" 6238 produces: ["application/json"] 6239 responses: 6240 200: 6241 description: "no error" 6242 schema: 6243 type: "object" 6244 examples: 6245 application/json: 6246 read: "2015-01-08T22:57:31.547920715Z" 6247 pids_stats: 6248 current: 3 6249 networks: 6250 eth0: 6251 rx_bytes: 5338 6252 rx_dropped: 0 6253 rx_errors: 0 6254 rx_packets: 36 6255 tx_bytes: 648 6256 tx_dropped: 0 6257 tx_errors: 0 6258 tx_packets: 8 6259 eth5: 6260 rx_bytes: 4641 6261 rx_dropped: 0 6262 rx_errors: 0 6263 rx_packets: 26 6264 tx_bytes: 690 6265 tx_dropped: 0 6266 tx_errors: 0 6267 tx_packets: 9 6268 memory_stats: 6269 stats: 6270 total_pgmajfault: 0 6271 cache: 0 6272 mapped_file: 0 6273 total_inactive_file: 0 6274 pgpgout: 414 6275 rss: 6537216 6276 total_mapped_file: 0 6277 writeback: 0 6278 unevictable: 0 6279 pgpgin: 477 6280 total_unevictable: 0 6281 pgmajfault: 0 6282 total_rss: 6537216 6283 total_rss_huge: 6291456 6284 total_writeback: 0 6285 total_inactive_anon: 0 6286 rss_huge: 6291456 6287 hierarchical_memory_limit: 67108864 6288 total_pgfault: 964 6289 total_active_file: 0 6290 active_anon: 6537216 6291 total_active_anon: 6537216 6292 total_pgpgout: 414 6293 total_cache: 0 6294 inactive_anon: 0 6295 active_file: 0 6296 pgfault: 964 6297 inactive_file: 0 6298 total_pgpgin: 477 6299 max_usage: 6651904 6300 usage: 6537216 6301 failcnt: 0 6302 limit: 67108864 6303 blkio_stats: {} 6304 cpu_stats: 6305 cpu_usage: 6306 percpu_usage: 6307 - 8646879 6308 - 24472255 6309 - 36438778 6310 - 30657443 6311 usage_in_usermode: 50000000 6312 total_usage: 100215355 6313 usage_in_kernelmode: 30000000 6314 system_cpu_usage: 739306590000000 6315 online_cpus: 4 6316 throttling_data: 6317 periods: 0 6318 throttled_periods: 0 6319 throttled_time: 0 6320 precpu_stats: 6321 cpu_usage: 6322 percpu_usage: 6323 - 8646879 6324 - 24350896 6325 - 36438778 6326 - 30657443 6327 usage_in_usermode: 50000000 6328 total_usage: 100093996 6329 usage_in_kernelmode: 30000000 6330 system_cpu_usage: 9492140000000 6331 online_cpus: 4 6332 throttling_data: 6333 periods: 0 6334 throttled_periods: 0 6335 throttled_time: 0 6336 404: 6337 description: "no such container" 6338 schema: 6339 $ref: "#/definitions/ErrorResponse" 6340 examples: 6341 application/json: 6342 message: "No such container: c2ada9df5af8" 6343 500: 6344 description: "server error" 6345 schema: 6346 $ref: "#/definitions/ErrorResponse" 6347 parameters: 6348 - name: "id" 6349 in: "path" 6350 required: true 6351 description: "ID or name of the container" 6352 type: "string" 6353 - name: "stream" 6354 in: "query" 6355 description: | 6356 Stream the output. If false, the stats will be output once and then 6357 it will disconnect. 6358 type: "boolean" 6359 default: true 6360 tags: ["Container"] 6361 /containers/{id}/resize: 6362 post: 6363 summary: "Resize a container TTY" 6364 description: "Resize the TTY for a container." 6365 operationId: "ContainerResize" 6366 consumes: 6367 - "application/octet-stream" 6368 produces: 6369 - "text/plain" 6370 responses: 6371 200: 6372 description: "no error" 6373 404: 6374 description: "no such container" 6375 schema: 6376 $ref: "#/definitions/ErrorResponse" 6377 examples: 6378 application/json: 6379 message: "No such container: c2ada9df5af8" 6380 500: 6381 description: "cannot resize container" 6382 schema: 6383 $ref: "#/definitions/ErrorResponse" 6384 parameters: 6385 - name: "id" 6386 in: "path" 6387 required: true 6388 description: "ID or name of the container" 6389 type: "string" 6390 - name: "h" 6391 in: "query" 6392 description: "Height of the TTY session in characters" 6393 type: "integer" 6394 - name: "w" 6395 in: "query" 6396 description: "Width of the TTY session in characters" 6397 type: "integer" 6398 tags: ["Container"] 6399 /containers/{id}/start: 6400 post: 6401 summary: "Start a container" 6402 operationId: "ContainerStart" 6403 responses: 6404 204: 6405 description: "no error" 6406 304: 6407 description: "container already started" 6408 404: 6409 description: "no such container" 6410 schema: 6411 $ref: "#/definitions/ErrorResponse" 6412 examples: 6413 application/json: 6414 message: "No such container: c2ada9df5af8" 6415 500: 6416 description: "server error" 6417 schema: 6418 $ref: "#/definitions/ErrorResponse" 6419 parameters: 6420 - name: "id" 6421 in: "path" 6422 required: true 6423 description: "ID or name of the container" 6424 type: "string" 6425 - name: "detachKeys" 6426 in: "query" 6427 description: | 6428 Override the key sequence for detaching a container. Format is a 6429 single character `[a-Z]` or `ctrl-<value>` where `<value>` is one 6430 of: `a-z`, `@`, `^`, `[`, `,` or `_`. 6431 type: "string" 6432 tags: ["Container"] 6433 /containers/{id}/stop: 6434 post: 6435 summary: "Stop a container" 6436 operationId: "ContainerStop" 6437 responses: 6438 204: 6439 description: "no error" 6440 304: 6441 description: "container already stopped" 6442 404: 6443 description: "no such container" 6444 schema: 6445 $ref: "#/definitions/ErrorResponse" 6446 examples: 6447 application/json: 6448 message: "No such container: c2ada9df5af8" 6449 500: 6450 description: "server error" 6451 schema: 6452 $ref: "#/definitions/ErrorResponse" 6453 parameters: 6454 - name: "id" 6455 in: "path" 6456 required: true 6457 description: "ID or name of the container" 6458 type: "string" 6459 - name: "t" 6460 in: "query" 6461 description: "Number of seconds to wait before killing the container" 6462 type: "integer" 6463 tags: ["Container"] 6464 /containers/{id}/restart: 6465 post: 6466 summary: "Restart a container" 6467 operationId: "ContainerRestart" 6468 responses: 6469 204: 6470 description: "no error" 6471 404: 6472 description: "no such container" 6473 schema: 6474 $ref: "#/definitions/ErrorResponse" 6475 examples: 6476 application/json: 6477 message: "No such container: c2ada9df5af8" 6478 500: 6479 description: "server error" 6480 schema: 6481 $ref: "#/definitions/ErrorResponse" 6482 parameters: 6483 - name: "id" 6484 in: "path" 6485 required: true 6486 description: "ID or name of the container" 6487 type: "string" 6488 - name: "t" 6489 in: "query" 6490 description: "Number of seconds to wait before killing the container" 6491 type: "integer" 6492 tags: ["Container"] 6493 /containers/{id}/kill: 6494 post: 6495 summary: "Kill a container" 6496 description: | 6497 Send a POSIX signal to a container, defaulting to killing to the 6498 container. 6499 operationId: "ContainerKill" 6500 responses: 6501 204: 6502 description: "no error" 6503 404: 6504 description: "no such container" 6505 schema: 6506 $ref: "#/definitions/ErrorResponse" 6507 examples: 6508 application/json: 6509 message: "No such container: c2ada9df5af8" 6510 409: 6511 description: "container is not running" 6512 schema: 6513 $ref: "#/definitions/ErrorResponse" 6514 examples: 6515 application/json: 6516 message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 6517 500: 6518 description: "server error" 6519 schema: 6520 $ref: "#/definitions/ErrorResponse" 6521 parameters: 6522 - name: "id" 6523 in: "path" 6524 required: true 6525 description: "ID or name of the container" 6526 type: "string" 6527 - name: "signal" 6528 in: "query" 6529 description: | 6530 Signal to send to the container as an integer or string (e.g. `SIGINT`). 6531 type: "string" 6532 default: "SIGKILL" 6533 tags: ["Container"] 6534 /containers/{id}/update: 6535 post: 6536 summary: "Update a container" 6537 description: | 6538 Change various configuration options of a container without having to 6539 recreate it. 6540 operationId: "ContainerUpdate" 6541 consumes: ["application/json"] 6542 produces: ["application/json"] 6543 responses: 6544 200: 6545 description: "The container has been updated." 6546 schema: 6547 type: "object" 6548 title: "ContainerUpdateResponse" 6549 description: "OK response to ContainerUpdate operation" 6550 properties: 6551 Warnings: 6552 type: "array" 6553 items: 6554 type: "string" 6555 404: 6556 description: "no such container" 6557 schema: 6558 $ref: "#/definitions/ErrorResponse" 6559 examples: 6560 application/json: 6561 message: "No such container: c2ada9df5af8" 6562 500: 6563 description: "server error" 6564 schema: 6565 $ref: "#/definitions/ErrorResponse" 6566 parameters: 6567 - name: "id" 6568 in: "path" 6569 required: true 6570 description: "ID or name of the container" 6571 type: "string" 6572 - name: "update" 6573 in: "body" 6574 required: true 6575 schema: 6576 allOf: 6577 - $ref: "#/definitions/Resources" 6578 - type: "object" 6579 properties: 6580 RestartPolicy: 6581 $ref: "#/definitions/RestartPolicy" 6582 example: 6583 BlkioWeight: 300 6584 CpuShares: 512 6585 CpuPeriod: 100000 6586 CpuQuota: 50000 6587 CpuRealtimePeriod: 1000000 6588 CpuRealtimeRuntime: 10000 6589 CpusetCpus: "0,1" 6590 CpusetMems: "0" 6591 Memory: 314572800 6592 MemorySwap: 514288000 6593 MemoryReservation: 209715200 6594 KernelMemory: 52428800 6595 RestartPolicy: 6596 MaximumRetryCount: 4 6597 Name: "on-failure" 6598 tags: ["Container"] 6599 /containers/{id}/rename: 6600 post: 6601 summary: "Rename a container" 6602 operationId: "ContainerRename" 6603 responses: 6604 204: 6605 description: "no error" 6606 404: 6607 description: "no such container" 6608 schema: 6609 $ref: "#/definitions/ErrorResponse" 6610 examples: 6611 application/json: 6612 message: "No such container: c2ada9df5af8" 6613 409: 6614 description: "name already in use" 6615 schema: 6616 $ref: "#/definitions/ErrorResponse" 6617 500: 6618 description: "server error" 6619 schema: 6620 $ref: "#/definitions/ErrorResponse" 6621 parameters: 6622 - name: "id" 6623 in: "path" 6624 required: true 6625 description: "ID or name of the container" 6626 type: "string" 6627 - name: "name" 6628 in: "query" 6629 required: true 6630 description: "New name for the container" 6631 type: "string" 6632 tags: ["Container"] 6633 /containers/{id}/pause: 6634 post: 6635 summary: "Pause a container" 6636 description: | 6637 Use the freezer cgroup to suspend all processes in a container. 6638 6639 Traditionally, when suspending a process the `SIGSTOP` signal is used, 6640 which is observable by the process being suspended. With the freezer 6641 cgroup the process is unaware, and unable to capture, that it is being 6642 suspended, and subsequently resumed. 6643 operationId: "ContainerPause" 6644 responses: 6645 204: 6646 description: "no error" 6647 404: 6648 description: "no such container" 6649 schema: 6650 $ref: "#/definitions/ErrorResponse" 6651 examples: 6652 application/json: 6653 message: "No such container: c2ada9df5af8" 6654 500: 6655 description: "server error" 6656 schema: 6657 $ref: "#/definitions/ErrorResponse" 6658 parameters: 6659 - name: "id" 6660 in: "path" 6661 required: true 6662 description: "ID or name of the container" 6663 type: "string" 6664 tags: ["Container"] 6665 /containers/{id}/unpause: 6666 post: 6667 summary: "Unpause a container" 6668 description: "Resume a container which has been paused." 6669 operationId: "ContainerUnpause" 6670 responses: 6671 204: 6672 description: "no error" 6673 404: 6674 description: "no such container" 6675 schema: 6676 $ref: "#/definitions/ErrorResponse" 6677 examples: 6678 application/json: 6679 message: "No such container: c2ada9df5af8" 6680 500: 6681 description: "server error" 6682 schema: 6683 $ref: "#/definitions/ErrorResponse" 6684 parameters: 6685 - name: "id" 6686 in: "path" 6687 required: true 6688 description: "ID or name of the container" 6689 type: "string" 6690 tags: ["Container"] 6691 /containers/{id}/attach: 6692 post: 6693 summary: "Attach to a container" 6694 description: | 6695 Attach to a container to read its output or send it input. You can attach 6696 to the same container multiple times and you can reattach to containers 6697 that have been detached. 6698 6699 Either the `stream` or `logs` parameter must be `true` for this endpoint 6700 to do anything. 6701 6702 See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) 6703 for more details. 6704 6705 ### Hijacking 6706 6707 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, 6708 and `stderr` on the same socket. 6709 6710 This is the response from the daemon for an attach request: 6711 6712 ``` 6713 HTTP/1.1 200 OK 6714 Content-Type: application/vnd.docker.raw-stream 6715 6716 [STREAM] 6717 ``` 6718 6719 After the headers and two new lines, the TCP connection can now be used 6720 for raw, bidirectional communication between the client and server. 6721 6722 To hint potential proxies about connection hijacking, the Docker client 6723 can also optionally send connection upgrade headers. 6724 6725 For example, the client sends this request to upgrade the connection: 6726 6727 ``` 6728 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 6729 Upgrade: tcp 6730 Connection: Upgrade 6731 ``` 6732 6733 The Docker daemon will respond with a `101 UPGRADED` response, and will 6734 similarly follow with the raw stream: 6735 6736 ``` 6737 HTTP/1.1 101 UPGRADED 6738 Content-Type: application/vnd.docker.raw-stream 6739 Connection: Upgrade 6740 Upgrade: tcp 6741 6742 [STREAM] 6743 ``` 6744 6745 ### Stream format 6746 6747 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), 6748 the stream over the hijacked connected is multiplexed to separate out 6749 `stdout` and `stderr`. The stream consists of a series of frames, each 6750 containing a header and a payload. 6751 6752 The header contains the information which the stream writes (`stdout` or 6753 `stderr`). It also contains the size of the associated frame encoded in 6754 the last four bytes (`uint32`). 6755 6756 It is encoded on the first eight bytes like this: 6757 6758 ```go 6759 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 6760 ``` 6761 6762 `STREAM_TYPE` can be: 6763 6764 - 0: `stdin` (is written on `stdout`) 6765 - 1: `stdout` 6766 - 2: `stderr` 6767 6768 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size 6769 encoded as big endian. 6770 6771 Following the header is the payload, which is the specified number of 6772 bytes of `STREAM_TYPE`. 6773 6774 The simplest way to implement this protocol is the following: 6775 6776 1. Read 8 bytes. 6777 2. Choose `stdout` or `stderr` depending on the first byte. 6778 3. Extract the frame size from the last four bytes. 6779 4. Read the extracted size and output it on the correct output. 6780 5. Goto 1. 6781 6782 ### Stream format when using a TTY 6783 6784 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), 6785 the stream is not multiplexed. The data exchanged over the hijacked 6786 connection is simply the raw data from the process PTY and client's 6787 `stdin`. 6788 6789 operationId: "ContainerAttach" 6790 produces: 6791 - "application/vnd.docker.raw-stream" 6792 responses: 6793 101: 6794 description: "no error, hints proxy about hijacking" 6795 200: 6796 description: "no error, no upgrade header found" 6797 400: 6798 description: "bad parameter" 6799 schema: 6800 $ref: "#/definitions/ErrorResponse" 6801 404: 6802 description: "no such container" 6803 schema: 6804 $ref: "#/definitions/ErrorResponse" 6805 examples: 6806 application/json: 6807 message: "No such container: c2ada9df5af8" 6808 500: 6809 description: "server error" 6810 schema: 6811 $ref: "#/definitions/ErrorResponse" 6812 parameters: 6813 - name: "id" 6814 in: "path" 6815 required: true 6816 description: "ID or name of the container" 6817 type: "string" 6818 - name: "detachKeys" 6819 in: "query" 6820 description: | 6821 Override the key sequence for detaching a container.Format is a single 6822 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 6823 `@`, `^`, `[`, `,` or `_`. 6824 type: "string" 6825 - name: "logs" 6826 in: "query" 6827 description: | 6828 Replay previous logs from the container. 6829 6830 This is useful for attaching to a container that has started and you 6831 want to output everything since the container started. 6832 6833 If `stream` is also enabled, once all the previous output has been 6834 returned, it will seamlessly transition into streaming current 6835 output. 6836 type: "boolean" 6837 default: false 6838 - name: "stream" 6839 in: "query" 6840 description: | 6841 Stream attached streams from the time the request was made onwards. 6842 type: "boolean" 6843 default: false 6844 - name: "stdin" 6845 in: "query" 6846 description: "Attach to `stdin`" 6847 type: "boolean" 6848 default: false 6849 - name: "stdout" 6850 in: "query" 6851 description: "Attach to `stdout`" 6852 type: "boolean" 6853 default: false 6854 - name: "stderr" 6855 in: "query" 6856 description: "Attach to `stderr`" 6857 type: "boolean" 6858 default: false 6859 tags: ["Container"] 6860 /containers/{id}/attach/ws: 6861 get: 6862 summary: "Attach to a container via a websocket" 6863 operationId: "ContainerAttachWebsocket" 6864 responses: 6865 101: 6866 description: "no error, hints proxy about hijacking" 6867 200: 6868 description: "no error, no upgrade header found" 6869 400: 6870 description: "bad parameter" 6871 schema: 6872 $ref: "#/definitions/ErrorResponse" 6873 404: 6874 description: "no such container" 6875 schema: 6876 $ref: "#/definitions/ErrorResponse" 6877 examples: 6878 application/json: 6879 message: "No such container: c2ada9df5af8" 6880 500: 6881 description: "server error" 6882 schema: 6883 $ref: "#/definitions/ErrorResponse" 6884 parameters: 6885 - name: "id" 6886 in: "path" 6887 required: true 6888 description: "ID or name of the container" 6889 type: "string" 6890 - name: "detachKeys" 6891 in: "query" 6892 description: | 6893 Override the key sequence for detaching a container.Format is a single 6894 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 6895 `@`, `^`, `[`, `,`, or `_`. 6896 type: "string" 6897 - name: "logs" 6898 in: "query" 6899 description: "Return logs" 6900 type: "boolean" 6901 default: false 6902 - name: "stream" 6903 in: "query" 6904 description: "Return stream" 6905 type: "boolean" 6906 default: false 6907 tags: ["Container"] 6908 /containers/{id}/wait: 6909 post: 6910 summary: "Wait for a container" 6911 description: "Block until a container stops, then returns the exit code." 6912 operationId: "ContainerWait" 6913 produces: ["application/json"] 6914 responses: 6915 200: 6916 description: "The container has exit." 6917 schema: 6918 $ref: "#/definitions/ContainerWaitResponse" 6919 400: 6920 description: "bad parameter" 6921 schema: 6922 $ref: "#/definitions/ErrorResponse" 6923 404: 6924 description: "no such container" 6925 schema: 6926 $ref: "#/definitions/ErrorResponse" 6927 examples: 6928 application/json: 6929 message: "No such container: c2ada9df5af8" 6930 500: 6931 description: "server error" 6932 schema: 6933 $ref: "#/definitions/ErrorResponse" 6934 parameters: 6935 - name: "id" 6936 in: "path" 6937 required: true 6938 description: "ID or name of the container" 6939 type: "string" 6940 - name: "condition" 6941 in: "query" 6942 description: | 6943 Wait until a container state reaches the given condition. 6944 6945 Defaults to `not-running` if omitted or empty. 6946 type: "string" 6947 enum: 6948 - "not-running" 6949 - "next-exit" 6950 - "removed" 6951 default: "not-running" 6952 tags: ["Container"] 6953 /containers/{id}: 6954 delete: 6955 summary: "Remove a container" 6956 operationId: "ContainerDelete" 6957 responses: 6958 204: 6959 description: "no error" 6960 400: 6961 description: "bad parameter" 6962 schema: 6963 $ref: "#/definitions/ErrorResponse" 6964 404: 6965 description: "no such container" 6966 schema: 6967 $ref: "#/definitions/ErrorResponse" 6968 examples: 6969 application/json: 6970 message: "No such container: c2ada9df5af8" 6971 409: 6972 description: "conflict" 6973 schema: 6974 $ref: "#/definitions/ErrorResponse" 6975 examples: 6976 application/json: 6977 message: | 6978 You cannot remove a running container: c2ada9df5af8. Stop the 6979 container before attempting removal or force remove 6980 500: 6981 description: "server error" 6982 schema: 6983 $ref: "#/definitions/ErrorResponse" 6984 parameters: 6985 - name: "id" 6986 in: "path" 6987 required: true 6988 description: "ID or name of the container" 6989 type: "string" 6990 - name: "v" 6991 in: "query" 6992 description: "Remove anonymous volumes associated with the container." 6993 type: "boolean" 6994 default: false 6995 - name: "force" 6996 in: "query" 6997 description: "If the container is running, kill it before removing it." 6998 type: "boolean" 6999 default: false 7000 - name: "link" 7001 in: "query" 7002 description: "Remove the specified link associated with the container." 7003 type: "boolean" 7004 default: false 7005 tags: ["Container"] 7006 /containers/{id}/archive: 7007 head: 7008 summary: "Get information about files in a container" 7009 description: | 7010 A response header `X-Docker-Container-Path-Stat` is returned, containing 7011 a base64 - encoded JSON object with some filesystem header information 7012 about the path. 7013 operationId: "ContainerArchiveInfo" 7014 responses: 7015 200: 7016 description: "no error" 7017 headers: 7018 X-Docker-Container-Path-Stat: 7019 type: "string" 7020 description: | 7021 A base64 - encoded JSON object with some filesystem header 7022 information about the path 7023 400: 7024 description: "Bad parameter" 7025 schema: 7026 $ref: "#/definitions/ErrorResponse" 7027 404: 7028 description: "Container or path does not exist" 7029 schema: 7030 $ref: "#/definitions/ErrorResponse" 7031 examples: 7032 application/json: 7033 message: "No such container: c2ada9df5af8" 7034 500: 7035 description: "Server error" 7036 schema: 7037 $ref: "#/definitions/ErrorResponse" 7038 parameters: 7039 - name: "id" 7040 in: "path" 7041 required: true 7042 description: "ID or name of the container" 7043 type: "string" 7044 - name: "path" 7045 in: "query" 7046 required: true 7047 description: "Resource in the container’s filesystem to archive." 7048 type: "string" 7049 tags: ["Container"] 7050 get: 7051 summary: "Get an archive of a filesystem resource in a container" 7052 description: "Get a tar archive of a resource in the filesystem of container id." 7053 operationId: "ContainerArchive" 7054 produces: ["application/x-tar"] 7055 responses: 7056 200: 7057 description: "no error" 7058 400: 7059 description: "Bad parameter" 7060 schema: 7061 $ref: "#/definitions/ErrorResponse" 7062 404: 7063 description: "Container or path does not exist" 7064 schema: 7065 $ref: "#/definitions/ErrorResponse" 7066 examples: 7067 application/json: 7068 message: "No such container: c2ada9df5af8" 7069 500: 7070 description: "server error" 7071 schema: 7072 $ref: "#/definitions/ErrorResponse" 7073 parameters: 7074 - name: "id" 7075 in: "path" 7076 required: true 7077 description: "ID or name of the container" 7078 type: "string" 7079 - name: "path" 7080 in: "query" 7081 required: true 7082 description: "Resource in the container’s filesystem to archive." 7083 type: "string" 7084 tags: ["Container"] 7085 put: 7086 summary: "Extract an archive of files or folders to a directory in a container" 7087 description: | 7088 Upload a tar archive to be extracted to a path in the filesystem of container id. 7089 `path` parameter is asserted to be a directory. If it exists as a file, 400 error 7090 will be returned with message "not a directory". 7091 operationId: "PutContainerArchive" 7092 consumes: ["application/x-tar", "application/octet-stream"] 7093 responses: 7094 200: 7095 description: "The content was extracted successfully" 7096 400: 7097 description: "Bad parameter" 7098 schema: 7099 $ref: "#/definitions/ErrorResponse" 7100 examples: 7101 application/json: 7102 message: "not a directory" 7103 403: 7104 description: "Permission denied, the volume or container rootfs is marked as read-only." 7105 schema: 7106 $ref: "#/definitions/ErrorResponse" 7107 404: 7108 description: "No such container or path does not exist inside the container" 7109 schema: 7110 $ref: "#/definitions/ErrorResponse" 7111 examples: 7112 application/json: 7113 message: "No such container: c2ada9df5af8" 7114 500: 7115 description: "Server error" 7116 schema: 7117 $ref: "#/definitions/ErrorResponse" 7118 parameters: 7119 - name: "id" 7120 in: "path" 7121 required: true 7122 description: "ID or name of the container" 7123 type: "string" 7124 - name: "path" 7125 in: "query" 7126 required: true 7127 description: "Path to a directory in the container to extract the archive’s contents into. " 7128 type: "string" 7129 - name: "noOverwriteDirNonDir" 7130 in: "query" 7131 description: | 7132 If `1`, `true`, or `True` then it will be an error if unpacking the 7133 given content would cause an existing directory to be replaced with 7134 a non-directory and vice versa. 7135 type: "string" 7136 - name: "copyUIDGID" 7137 in: "query" 7138 description: | 7139 If `1`, `true`, then it will copy UID/GID maps to the dest file or 7140 dir 7141 type: "string" 7142 - name: "inputStream" 7143 in: "body" 7144 required: true 7145 description: | 7146 The input stream must be a tar archive compressed with one of the 7147 following algorithms: `identity` (no compression), `gzip`, `bzip2`, 7148 or `xz`. 7149 schema: 7150 type: "string" 7151 format: "binary" 7152 tags: ["Container"] 7153 /containers/prune: 7154 post: 7155 summary: "Delete stopped containers" 7156 produces: 7157 - "application/json" 7158 operationId: "ContainerPrune" 7159 parameters: 7160 - name: "filters" 7161 in: "query" 7162 description: | 7163 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 7164 7165 Available filters: 7166 - `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. 7167 - `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. 7168 type: "string" 7169 responses: 7170 200: 7171 description: "No error" 7172 schema: 7173 type: "object" 7174 title: "ContainerPruneResponse" 7175 properties: 7176 ContainersDeleted: 7177 description: "Container IDs that were deleted" 7178 type: "array" 7179 items: 7180 type: "string" 7181 SpaceReclaimed: 7182 description: "Disk space reclaimed in bytes" 7183 type: "integer" 7184 format: "int64" 7185 500: 7186 description: "Server error" 7187 schema: 7188 $ref: "#/definitions/ErrorResponse" 7189 tags: ["Container"] 7190 /images/json: 7191 get: 7192 summary: "List Images" 7193 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." 7194 operationId: "ImageList" 7195 produces: 7196 - "application/json" 7197 responses: 7198 200: 7199 description: "Summary image data for the images matching the query" 7200 schema: 7201 type: "array" 7202 items: 7203 $ref: "#/definitions/ImageSummary" 7204 500: 7205 description: "server error" 7206 schema: 7207 $ref: "#/definitions/ErrorResponse" 7208 parameters: 7209 - name: "all" 7210 in: "query" 7211 description: "Show all images. Only images from a final layer (no children) are shown by default." 7212 type: "boolean" 7213 default: false 7214 - name: "filters" 7215 in: "query" 7216 description: | 7217 A JSON encoded value of the filters (a `map[string][]string`) to 7218 process on the images list. 7219 7220 Available filters: 7221 7222 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7223 - `dangling=true` 7224 - `label=key` or `label="key=value"` of an image label 7225 - `reference`=(`<image-name>[:<tag>]`) 7226 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 7227 type: "string" 7228 - name: "digests" 7229 in: "query" 7230 description: "Show digest information as a `RepoDigests` field on each image." 7231 type: "boolean" 7232 default: false 7233 tags: ["Image"] 7234 /build: 7235 post: 7236 summary: "Build an image" 7237 description: | 7238 Build an image from a tar archive with a `Dockerfile` in it. 7239 7240 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/). 7241 7242 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. 7243 7244 The build is canceled if the client drops the connection by quitting or being killed. 7245 operationId: "ImageBuild" 7246 consumes: 7247 - "application/octet-stream" 7248 produces: 7249 - "application/json" 7250 parameters: 7251 - name: "inputStream" 7252 in: "body" 7253 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 7254 schema: 7255 type: "string" 7256 format: "binary" 7257 - name: "dockerfile" 7258 in: "query" 7259 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 7260 type: "string" 7261 default: "Dockerfile" 7262 - name: "t" 7263 in: "query" 7264 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." 7265 type: "string" 7266 - name: "extrahosts" 7267 in: "query" 7268 description: "Extra hosts to add to /etc/hosts" 7269 type: "string" 7270 - name: "remote" 7271 in: "query" 7272 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." 7273 type: "string" 7274 - name: "q" 7275 in: "query" 7276 description: "Suppress verbose build output." 7277 type: "boolean" 7278 default: false 7279 - name: "nocache" 7280 in: "query" 7281 description: "Do not use the cache when building the image." 7282 type: "boolean" 7283 default: false 7284 - name: "cachefrom" 7285 in: "query" 7286 description: "JSON array of images used for build cache resolution." 7287 type: "string" 7288 - name: "pull" 7289 in: "query" 7290 description: "Attempt to pull the image even if an older image exists locally." 7291 type: "string" 7292 - name: "rm" 7293 in: "query" 7294 description: "Remove intermediate containers after a successful build." 7295 type: "boolean" 7296 default: true 7297 - name: "forcerm" 7298 in: "query" 7299 description: "Always remove intermediate containers, even upon failure." 7300 type: "boolean" 7301 default: false 7302 - name: "memory" 7303 in: "query" 7304 description: "Set memory limit for build." 7305 type: "integer" 7306 - name: "memswap" 7307 in: "query" 7308 description: "Total memory (memory + swap). Set as `-1` to disable swap." 7309 type: "integer" 7310 - name: "cpushares" 7311 in: "query" 7312 description: "CPU shares (relative weight)." 7313 type: "integer" 7314 - name: "cpusetcpus" 7315 in: "query" 7316 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 7317 type: "string" 7318 - name: "cpuperiod" 7319 in: "query" 7320 description: "The length of a CPU period in microseconds." 7321 type: "integer" 7322 - name: "cpuquota" 7323 in: "query" 7324 description: "Microseconds of CPU time that the container can get in a CPU period." 7325 type: "integer" 7326 - name: "buildargs" 7327 in: "query" 7328 description: > 7329 JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker 7330 uses the buildargs as the environment context for commands run via the `Dockerfile` RUN 7331 instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for 7332 passing secret values. 7333 7334 7335 For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the 7336 query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. 7337 7338 7339 [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) 7340 type: "string" 7341 - name: "shmsize" 7342 in: "query" 7343 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 7344 type: "integer" 7345 - name: "squash" 7346 in: "query" 7347 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 7348 type: "boolean" 7349 - name: "labels" 7350 in: "query" 7351 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 7352 type: "string" 7353 - name: "networkmode" 7354 in: "query" 7355 description: | 7356 Sets the networking mode for the run commands during build. Supported 7357 standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. 7358 Any other value is taken as a custom network's name or ID to which this 7359 container should connect to. 7360 type: "string" 7361 - name: "Content-type" 7362 in: "header" 7363 type: "string" 7364 enum: 7365 - "application/x-tar" 7366 default: "application/x-tar" 7367 - name: "X-Registry-Config" 7368 in: "header" 7369 description: | 7370 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 7371 7372 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 7373 7374 ``` 7375 { 7376 "docker.example.com": { 7377 "username": "janedoe", 7378 "password": "hunter2" 7379 }, 7380 "https://index.docker.io/v1/": { 7381 "username": "mobydock", 7382 "password": "conta1n3rize14" 7383 } 7384 } 7385 ``` 7386 7387 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. 7388 type: "string" 7389 - name: "platform" 7390 in: "query" 7391 description: "Platform in the format os[/arch[/variant]]" 7392 type: "string" 7393 default: "" 7394 - name: "target" 7395 in: "query" 7396 description: "Target build stage" 7397 type: "string" 7398 default: "" 7399 responses: 7400 200: 7401 description: "no error" 7402 400: 7403 description: "Bad parameter" 7404 schema: 7405 $ref: "#/definitions/ErrorResponse" 7406 500: 7407 description: "server error" 7408 schema: 7409 $ref: "#/definitions/ErrorResponse" 7410 tags: ["Image"] 7411 /build/prune: 7412 post: 7413 summary: "Delete builder cache" 7414 produces: 7415 - "application/json" 7416 operationId: "BuildPrune" 7417 parameters: 7418 - name: "keep-storage" 7419 in: "query" 7420 description: "Amount of disk space in bytes to keep for cache" 7421 type: "integer" 7422 format: "int64" 7423 - name: "all" 7424 in: "query" 7425 type: "boolean" 7426 description: "Remove all types of build cache" 7427 - name: "filters" 7428 in: "query" 7429 type: "string" 7430 description: | 7431 A JSON encoded value of the filters (a `map[string][]string`) to 7432 process on the list of build cache objects. 7433 7434 Available filters: 7435 7436 - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h') 7437 - `id=<id>` 7438 - `parent=<id>` 7439 - `type=<string>` 7440 - `description=<string>` 7441 - `inuse` 7442 - `shared` 7443 - `private` 7444 responses: 7445 200: 7446 description: "No error" 7447 schema: 7448 type: "object" 7449 title: "BuildPruneResponse" 7450 properties: 7451 CachesDeleted: 7452 type: "array" 7453 items: 7454 description: "ID of build cache object" 7455 type: "string" 7456 SpaceReclaimed: 7457 description: "Disk space reclaimed in bytes" 7458 type: "integer" 7459 format: "int64" 7460 500: 7461 description: "Server error" 7462 schema: 7463 $ref: "#/definitions/ErrorResponse" 7464 tags: ["Image"] 7465 /images/create: 7466 post: 7467 summary: "Create an image" 7468 description: "Create an image by either pulling it from a registry or importing it." 7469 operationId: "ImageCreate" 7470 consumes: 7471 - "text/plain" 7472 - "application/octet-stream" 7473 produces: 7474 - "application/json" 7475 responses: 7476 200: 7477 description: "no error" 7478 404: 7479 description: "repository does not exist or no read access" 7480 schema: 7481 $ref: "#/definitions/ErrorResponse" 7482 500: 7483 description: "server error" 7484 schema: 7485 $ref: "#/definitions/ErrorResponse" 7486 parameters: 7487 - name: "fromImage" 7488 in: "query" 7489 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." 7490 type: "string" 7491 - name: "fromSrc" 7492 in: "query" 7493 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." 7494 type: "string" 7495 - name: "repo" 7496 in: "query" 7497 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." 7498 type: "string" 7499 - name: "tag" 7500 in: "query" 7501 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 7502 type: "string" 7503 - name: "message" 7504 in: "query" 7505 description: "Set commit message for imported image." 7506 type: "string" 7507 - name: "inputImage" 7508 in: "body" 7509 description: "Image content if the value `-` has been specified in fromSrc query parameter" 7510 schema: 7511 type: "string" 7512 required: false 7513 - name: "X-Registry-Auth" 7514 in: "header" 7515 description: | 7516 A base64url-encoded auth configuration. 7517 7518 Refer to the [authentication section](#section/Authentication) for 7519 details. 7520 type: "string" 7521 - name: "platform" 7522 in: "query" 7523 description: "Platform in the format os[/arch[/variant]]" 7524 type: "string" 7525 default: "" 7526 tags: ["Image"] 7527 /images/{name}/json: 7528 get: 7529 summary: "Inspect an image" 7530 description: "Return low-level information about an image." 7531 operationId: "ImageInspect" 7532 produces: 7533 - "application/json" 7534 responses: 7535 200: 7536 description: "No error" 7537 schema: 7538 $ref: "#/definitions/ImageInspect" 7539 404: 7540 description: "No such image" 7541 schema: 7542 $ref: "#/definitions/ErrorResponse" 7543 examples: 7544 application/json: 7545 message: "No such image: someimage (tag: latest)" 7546 500: 7547 description: "Server error" 7548 schema: 7549 $ref: "#/definitions/ErrorResponse" 7550 parameters: 7551 - name: "name" 7552 in: "path" 7553 description: "Image name or id" 7554 type: "string" 7555 required: true 7556 tags: ["Image"] 7557 /images/{name}/history: 7558 get: 7559 summary: "Get the history of an image" 7560 description: "Return parent layers of an image." 7561 operationId: "ImageHistory" 7562 produces: ["application/json"] 7563 responses: 7564 200: 7565 description: "List of image layers" 7566 schema: 7567 type: "array" 7568 items: 7569 type: "object" 7570 x-go-name: HistoryResponseItem 7571 title: "HistoryResponseItem" 7572 description: "individual image layer information in response to ImageHistory operation" 7573 required: [Id, Created, CreatedBy, Tags, Size, Comment] 7574 properties: 7575 Id: 7576 type: "string" 7577 x-nullable: false 7578 Created: 7579 type: "integer" 7580 format: "int64" 7581 x-nullable: false 7582 CreatedBy: 7583 type: "string" 7584 x-nullable: false 7585 Tags: 7586 type: "array" 7587 items: 7588 type: "string" 7589 Size: 7590 type: "integer" 7591 format: "int64" 7592 x-nullable: false 7593 Comment: 7594 type: "string" 7595 x-nullable: false 7596 examples: 7597 application/json: 7598 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 7599 Created: 1398108230 7600 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 7601 Tags: 7602 - "ubuntu:lucid" 7603 - "ubuntu:10.04" 7604 Size: 182964289 7605 Comment: "" 7606 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 7607 Created: 1398108222 7608 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/" 7609 Tags: [] 7610 Size: 0 7611 Comment: "" 7612 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 7613 Created: 1371157430 7614 CreatedBy: "" 7615 Tags: 7616 - "scratch12:latest" 7617 - "scratch:latest" 7618 Size: 0 7619 Comment: "Imported from -" 7620 404: 7621 description: "No such image" 7622 schema: 7623 $ref: "#/definitions/ErrorResponse" 7624 500: 7625 description: "Server error" 7626 schema: 7627 $ref: "#/definitions/ErrorResponse" 7628 parameters: 7629 - name: "name" 7630 in: "path" 7631 description: "Image name or ID" 7632 type: "string" 7633 required: true 7634 tags: ["Image"] 7635 /images/{name}/push: 7636 post: 7637 summary: "Push an image" 7638 description: | 7639 Push an image to a registry. 7640 7641 If you wish to push an image on to a private registry, that image must 7642 already have a tag which references the registry. For example, 7643 `registry.example.com/myimage:latest`. 7644 7645 The push is cancelled if the HTTP connection is closed. 7646 operationId: "ImagePush" 7647 consumes: 7648 - "application/octet-stream" 7649 responses: 7650 200: 7651 description: "No error" 7652 404: 7653 description: "No such image" 7654 schema: 7655 $ref: "#/definitions/ErrorResponse" 7656 500: 7657 description: "Server error" 7658 schema: 7659 $ref: "#/definitions/ErrorResponse" 7660 parameters: 7661 - name: "name" 7662 in: "path" 7663 description: "Image name or ID." 7664 type: "string" 7665 required: true 7666 - name: "tag" 7667 in: "query" 7668 description: "The tag to associate with the image on the registry." 7669 type: "string" 7670 - name: "X-Registry-Auth" 7671 in: "header" 7672 description: | 7673 A base64url-encoded auth configuration. 7674 7675 Refer to the [authentication section](#section/Authentication) for 7676 details. 7677 type: "string" 7678 required: true 7679 tags: ["Image"] 7680 /images/{name}/tag: 7681 post: 7682 summary: "Tag an image" 7683 description: "Tag an image so that it becomes part of a repository." 7684 operationId: "ImageTag" 7685 responses: 7686 201: 7687 description: "No error" 7688 400: 7689 description: "Bad parameter" 7690 schema: 7691 $ref: "#/definitions/ErrorResponse" 7692 404: 7693 description: "No such image" 7694 schema: 7695 $ref: "#/definitions/ErrorResponse" 7696 409: 7697 description: "Conflict" 7698 schema: 7699 $ref: "#/definitions/ErrorResponse" 7700 500: 7701 description: "Server error" 7702 schema: 7703 $ref: "#/definitions/ErrorResponse" 7704 parameters: 7705 - name: "name" 7706 in: "path" 7707 description: "Image name or ID to tag." 7708 type: "string" 7709 required: true 7710 - name: "repo" 7711 in: "query" 7712 description: "The repository to tag in. For example, `someuser/someimage`." 7713 type: "string" 7714 - name: "tag" 7715 in: "query" 7716 description: "The name of the new tag." 7717 type: "string" 7718 tags: ["Image"] 7719 /images/{name}: 7720 delete: 7721 summary: "Remove an image" 7722 description: | 7723 Remove an image, along with any untagged parent images that were 7724 referenced by that image. 7725 7726 Images can't be removed if they have descendant images, are being 7727 used by a running container or are being used by a build. 7728 operationId: "ImageDelete" 7729 produces: ["application/json"] 7730 responses: 7731 200: 7732 description: "The image was deleted successfully" 7733 schema: 7734 type: "array" 7735 items: 7736 $ref: "#/definitions/ImageDeleteResponseItem" 7737 examples: 7738 application/json: 7739 - Untagged: "3e2f21a89f" 7740 - Deleted: "3e2f21a89f" 7741 - Deleted: "53b4f83ac9" 7742 404: 7743 description: "No such image" 7744 schema: 7745 $ref: "#/definitions/ErrorResponse" 7746 409: 7747 description: "Conflict" 7748 schema: 7749 $ref: "#/definitions/ErrorResponse" 7750 500: 7751 description: "Server error" 7752 schema: 7753 $ref: "#/definitions/ErrorResponse" 7754 parameters: 7755 - name: "name" 7756 in: "path" 7757 description: "Image name or ID" 7758 type: "string" 7759 required: true 7760 - name: "force" 7761 in: "query" 7762 description: "Remove the image even if it is being used by stopped containers or has other tags" 7763 type: "boolean" 7764 default: false 7765 - name: "noprune" 7766 in: "query" 7767 description: "Do not delete untagged parent images" 7768 type: "boolean" 7769 default: false 7770 tags: ["Image"] 7771 /images/search: 7772 get: 7773 summary: "Search images" 7774 description: "Search for an image on Docker Hub." 7775 operationId: "ImageSearch" 7776 produces: 7777 - "application/json" 7778 responses: 7779 200: 7780 description: "No error" 7781 schema: 7782 type: "array" 7783 items: 7784 type: "object" 7785 title: "ImageSearchResponseItem" 7786 properties: 7787 description: 7788 type: "string" 7789 is_official: 7790 type: "boolean" 7791 is_automated: 7792 type: "boolean" 7793 name: 7794 type: "string" 7795 star_count: 7796 type: "integer" 7797 examples: 7798 application/json: 7799 - description: "" 7800 is_official: false 7801 is_automated: false 7802 name: "wma55/u1210sshd" 7803 star_count: 0 7804 - description: "" 7805 is_official: false 7806 is_automated: false 7807 name: "jdswinbank/sshd" 7808 star_count: 0 7809 - description: "" 7810 is_official: false 7811 is_automated: false 7812 name: "vgauthier/sshd" 7813 star_count: 0 7814 500: 7815 description: "Server error" 7816 schema: 7817 $ref: "#/definitions/ErrorResponse" 7818 parameters: 7819 - name: "term" 7820 in: "query" 7821 description: "Term to search" 7822 type: "string" 7823 required: true 7824 - name: "limit" 7825 in: "query" 7826 description: "Maximum number of results to return" 7827 type: "integer" 7828 - name: "filters" 7829 in: "query" 7830 description: | 7831 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 7832 7833 - `is-automated=(true|false)` 7834 - `is-official=(true|false)` 7835 - `stars=<number>` Matches images that has at least 'number' stars. 7836 type: "string" 7837 tags: ["Image"] 7838 /images/prune: 7839 post: 7840 summary: "Delete unused images" 7841 produces: 7842 - "application/json" 7843 operationId: "ImagePrune" 7844 parameters: 7845 - name: "filters" 7846 in: "query" 7847 description: | 7848 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 7849 7850 - `dangling=<boolean>` When set to `true` (or `1`), prune only 7851 unused *and* untagged images. When set to `false` 7852 (or `0`), all unused images are pruned. 7853 - `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. 7854 - `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. 7855 type: "string" 7856 responses: 7857 200: 7858 description: "No error" 7859 schema: 7860 type: "object" 7861 title: "ImagePruneResponse" 7862 properties: 7863 ImagesDeleted: 7864 description: "Images that were deleted" 7865 type: "array" 7866 items: 7867 $ref: "#/definitions/ImageDeleteResponseItem" 7868 SpaceReclaimed: 7869 description: "Disk space reclaimed in bytes" 7870 type: "integer" 7871 format: "int64" 7872 500: 7873 description: "Server error" 7874 schema: 7875 $ref: "#/definitions/ErrorResponse" 7876 tags: ["Image"] 7877 /auth: 7878 post: 7879 summary: "Check auth configuration" 7880 description: | 7881 Validate credentials for a registry and, if available, get an identity 7882 token for accessing the registry without password. 7883 operationId: "SystemAuth" 7884 consumes: ["application/json"] 7885 produces: ["application/json"] 7886 responses: 7887 200: 7888 description: "An identity token was generated successfully." 7889 schema: 7890 type: "object" 7891 title: "SystemAuthResponse" 7892 required: [Status] 7893 properties: 7894 Status: 7895 description: "The status of the authentication" 7896 type: "string" 7897 x-nullable: false 7898 IdentityToken: 7899 description: "An opaque token used to authenticate a user after a successful login" 7900 type: "string" 7901 x-nullable: false 7902 examples: 7903 application/json: 7904 Status: "Login Succeeded" 7905 IdentityToken: "9cbaf023786cd7..." 7906 204: 7907 description: "No error" 7908 401: 7909 description: "Auth error" 7910 schema: 7911 $ref: "#/definitions/ErrorResponse" 7912 500: 7913 description: "Server error" 7914 schema: 7915 $ref: "#/definitions/ErrorResponse" 7916 parameters: 7917 - name: "authConfig" 7918 in: "body" 7919 description: "Authentication to check" 7920 schema: 7921 $ref: "#/definitions/AuthConfig" 7922 tags: ["System"] 7923 /info: 7924 get: 7925 summary: "Get system information" 7926 operationId: "SystemInfo" 7927 produces: 7928 - "application/json" 7929 responses: 7930 200: 7931 description: "No error" 7932 schema: 7933 $ref: "#/definitions/SystemInfo" 7934 500: 7935 description: "Server error" 7936 schema: 7937 $ref: "#/definitions/ErrorResponse" 7938 tags: ["System"] 7939 /version: 7940 get: 7941 summary: "Get version" 7942 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 7943 operationId: "SystemVersion" 7944 produces: ["application/json"] 7945 responses: 7946 200: 7947 description: "no error" 7948 schema: 7949 $ref: "#/definitions/SystemVersion" 7950 500: 7951 description: "server error" 7952 schema: 7953 $ref: "#/definitions/ErrorResponse" 7954 tags: ["System"] 7955 /_ping: 7956 get: 7957 summary: "Ping" 7958 description: "This is a dummy endpoint you can use to test if the server is accessible." 7959 operationId: "SystemPing" 7960 produces: ["text/plain"] 7961 responses: 7962 200: 7963 description: "no error" 7964 schema: 7965 type: "string" 7966 example: "OK" 7967 headers: 7968 API-Version: 7969 type: "string" 7970 description: "Max API Version the server supports" 7971 Builder-Version: 7972 type: "string" 7973 description: "Default version of docker image builder" 7974 Docker-Experimental: 7975 type: "boolean" 7976 description: "If the server is running with experimental mode enabled" 7977 500: 7978 description: "server error" 7979 schema: 7980 $ref: "#/definitions/ErrorResponse" 7981 tags: ["System"] 7982 /commit: 7983 post: 7984 summary: "Create a new image from a container" 7985 operationId: "ImageCommit" 7986 consumes: 7987 - "application/json" 7988 produces: 7989 - "application/json" 7990 responses: 7991 201: 7992 description: "no error" 7993 schema: 7994 $ref: "#/definitions/IdResponse" 7995 404: 7996 description: "no such container" 7997 schema: 7998 $ref: "#/definitions/ErrorResponse" 7999 examples: 8000 application/json: 8001 message: "No such container: c2ada9df5af8" 8002 500: 8003 description: "server error" 8004 schema: 8005 $ref: "#/definitions/ErrorResponse" 8006 parameters: 8007 - name: "containerConfig" 8008 in: "body" 8009 description: "The container configuration" 8010 schema: 8011 $ref: "#/definitions/ContainerConfig" 8012 - name: "container" 8013 in: "query" 8014 description: "The ID or name of the container to commit" 8015 type: "string" 8016 - name: "repo" 8017 in: "query" 8018 description: "Repository name for the created image" 8019 type: "string" 8020 - name: "tag" 8021 in: "query" 8022 description: "Tag name for the create image" 8023 type: "string" 8024 - name: "comment" 8025 in: "query" 8026 description: "Commit message" 8027 type: "string" 8028 - name: "author" 8029 in: "query" 8030 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 8031 type: "string" 8032 - name: "pause" 8033 in: "query" 8034 description: "Whether to pause the container before committing" 8035 type: "boolean" 8036 default: true 8037 - name: "changes" 8038 in: "query" 8039 description: "`Dockerfile` instructions to apply while committing" 8040 type: "string" 8041 tags: ["Image"] 8042 /events: 8043 get: 8044 summary: "Monitor events" 8045 description: | 8046 Stream real-time events from the server. 8047 8048 Various objects within Docker report events when something happens to them. 8049 8050 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` 8051 8052 Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag` 8053 8054 Volumes report these events: `create`, `mount`, `unmount`, and `destroy` 8055 8056 Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove` 8057 8058 The Docker daemon reports these events: `reload` 8059 8060 Services report these events: `create`, `update`, and `remove` 8061 8062 Nodes report these events: `create`, `update`, and `remove` 8063 8064 Secrets report these events: `create`, `update`, and `remove` 8065 8066 Configs report these events: `create`, `update`, and `remove` 8067 8068 operationId: "SystemEvents" 8069 produces: 8070 - "application/json" 8071 responses: 8072 200: 8073 description: "no error" 8074 schema: 8075 type: "object" 8076 title: "SystemEventsResponse" 8077 properties: 8078 Type: 8079 description: "The type of object emitting the event" 8080 type: "string" 8081 Action: 8082 description: "The type of event" 8083 type: "string" 8084 Actor: 8085 type: "object" 8086 properties: 8087 ID: 8088 description: "The ID of the object emitting the event" 8089 type: "string" 8090 Attributes: 8091 description: "Various key/value attributes of the object, depending on its type" 8092 type: "object" 8093 additionalProperties: 8094 type: "string" 8095 time: 8096 description: "Timestamp of event" 8097 type: "integer" 8098 timeNano: 8099 description: "Timestamp of event, with nanosecond accuracy" 8100 type: "integer" 8101 format: "int64" 8102 examples: 8103 application/json: 8104 Type: "container" 8105 Action: "create" 8106 Actor: 8107 ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 8108 Attributes: 8109 com.example.some-label: "some-label-value" 8110 image: "alpine" 8111 name: "my-container" 8112 time: 1461943101 8113 400: 8114 description: "bad parameter" 8115 schema: 8116 $ref: "#/definitions/ErrorResponse" 8117 500: 8118 description: "server error" 8119 schema: 8120 $ref: "#/definitions/ErrorResponse" 8121 parameters: 8122 - name: "since" 8123 in: "query" 8124 description: "Show events created since this timestamp then stream new events." 8125 type: "string" 8126 - name: "until" 8127 in: "query" 8128 description: "Show events created until this timestamp then stop streaming." 8129 type: "string" 8130 - name: "filters" 8131 in: "query" 8132 description: | 8133 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 8134 8135 - `config=<string>` config name or ID 8136 - `container=<string>` container name or ID 8137 - `daemon=<string>` daemon name or ID 8138 - `event=<string>` event type 8139 - `image=<string>` image name or ID 8140 - `label=<string>` image or container label 8141 - `network=<string>` network name or ID 8142 - `node=<string>` node ID 8143 - `plugin`=<string> plugin name or ID 8144 - `scope`=<string> local or swarm 8145 - `secret=<string>` secret name or ID 8146 - `service=<string>` service name or ID 8147 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` 8148 - `volume=<string>` volume name 8149 type: "string" 8150 tags: ["System"] 8151 /system/df: 8152 get: 8153 summary: "Get data usage information" 8154 operationId: "SystemDataUsage" 8155 responses: 8156 200: 8157 description: "no error" 8158 schema: 8159 type: "object" 8160 title: "SystemDataUsageResponse" 8161 properties: 8162 LayersSize: 8163 type: "integer" 8164 format: "int64" 8165 Images: 8166 type: "array" 8167 items: 8168 $ref: "#/definitions/ImageSummary" 8169 Containers: 8170 type: "array" 8171 items: 8172 $ref: "#/definitions/ContainerSummary" 8173 Volumes: 8174 type: "array" 8175 items: 8176 $ref: "#/definitions/Volume" 8177 BuildCache: 8178 type: "array" 8179 items: 8180 $ref: "#/definitions/BuildCache" 8181 example: 8182 LayersSize: 1092588 8183 Images: 8184 - 8185 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8186 ParentId: "" 8187 RepoTags: 8188 - "busybox:latest" 8189 RepoDigests: 8190 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 8191 Created: 1466724217 8192 Size: 1092588 8193 SharedSize: 0 8194 VirtualSize: 1092588 8195 Labels: {} 8196 Containers: 1 8197 Containers: 8198 - 8199 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 8200 Names: 8201 - "/top" 8202 Image: "busybox" 8203 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8204 Command: "top" 8205 Created: 1472592424 8206 Ports: [] 8207 SizeRootFs: 1092588 8208 Labels: {} 8209 State: "exited" 8210 Status: "Exited (0) 56 minutes ago" 8211 HostConfig: 8212 NetworkMode: "default" 8213 NetworkSettings: 8214 Networks: 8215 bridge: 8216 IPAMConfig: null 8217 Links: null 8218 Aliases: null 8219 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 8220 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 8221 Gateway: "172.18.0.1" 8222 IPAddress: "172.18.0.2" 8223 IPPrefixLen: 16 8224 IPv6Gateway: "" 8225 GlobalIPv6Address: "" 8226 GlobalIPv6PrefixLen: 0 8227 MacAddress: "02:42:ac:12:00:02" 8228 Mounts: [] 8229 Volumes: 8230 - 8231 Name: "my-volume" 8232 Driver: "local" 8233 Mountpoint: "/var/lib/docker/volumes/my-volume/_data" 8234 Labels: null 8235 Scope: "local" 8236 Options: null 8237 UsageData: 8238 Size: 10920104 8239 RefCount: 2 8240 BuildCache: 8241 - 8242 ID: "hw53o5aio51xtltp5xjp8v7fx" 8243 Parent: "" 8244 Type: "regular" 8245 Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" 8246 InUse: false 8247 Shared: true 8248 Size: 0 8249 CreatedAt: "2021-06-28T13:31:01.474619385Z" 8250 LastUsedAt: "2021-07-07T22:02:32.738075951Z" 8251 UsageCount: 26 8252 - 8253 ID: "ndlpt0hhvkqcdfkputsk4cq9c" 8254 Parent: "ndlpt0hhvkqcdfkputsk4cq9c" 8255 Type: "regular" 8256 Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" 8257 InUse: false 8258 Shared: true 8259 Size: 51 8260 CreatedAt: "2021-06-28T13:31:03.002625487Z" 8261 LastUsedAt: "2021-07-07T22:02:32.773909517Z" 8262 UsageCount: 26 8263 500: 8264 description: "server error" 8265 schema: 8266 $ref: "#/definitions/ErrorResponse" 8267 tags: ["System"] 8268 /images/{name}/get: 8269 get: 8270 summary: "Export an image" 8271 description: | 8272 Get a tarball containing all images and metadata for a repository. 8273 8274 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. 8275 8276 ### Image tarball format 8277 8278 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 8279 8280 - `VERSION`: currently `1.0` - the file format version 8281 - `json`: detailed layer information, similar to `docker inspect layer_id` 8282 - `layer.tar`: A tarfile containing the filesystem changes in this layer 8283 8284 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 8285 8286 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. 8287 8288 ```json 8289 { 8290 "hello-world": { 8291 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 8292 } 8293 } 8294 ``` 8295 operationId: "ImageGet" 8296 produces: 8297 - "application/x-tar" 8298 responses: 8299 200: 8300 description: "no error" 8301 schema: 8302 type: "string" 8303 format: "binary" 8304 500: 8305 description: "server error" 8306 schema: 8307 $ref: "#/definitions/ErrorResponse" 8308 parameters: 8309 - name: "name" 8310 in: "path" 8311 description: "Image name or ID" 8312 type: "string" 8313 required: true 8314 tags: ["Image"] 8315 /images/get: 8316 get: 8317 summary: "Export several images" 8318 description: | 8319 Get a tarball containing all images and metadata for several image 8320 repositories. 8321 8322 For each value of the `names` parameter: if it is a specific name and 8323 tag (e.g. `ubuntu:latest`), then only that image (and its parents) are 8324 returned; if it is an image ID, similarly only that image (and its parents) 8325 are returned and there would be no names referenced in the 'repositories' 8326 file for this image ID. 8327 8328 For details on the format, see the [export image endpoint](#operation/ImageGet). 8329 operationId: "ImageGetAll" 8330 produces: 8331 - "application/x-tar" 8332 responses: 8333 200: 8334 description: "no error" 8335 schema: 8336 type: "string" 8337 format: "binary" 8338 500: 8339 description: "server error" 8340 schema: 8341 $ref: "#/definitions/ErrorResponse" 8342 parameters: 8343 - name: "names" 8344 in: "query" 8345 description: "Image names to filter by" 8346 type: "array" 8347 items: 8348 type: "string" 8349 tags: ["Image"] 8350 /images/load: 8351 post: 8352 summary: "Import images" 8353 description: | 8354 Load a set of images and tags into a repository. 8355 8356 For details on the format, see the [export image endpoint](#operation/ImageGet). 8357 operationId: "ImageLoad" 8358 consumes: 8359 - "application/x-tar" 8360 produces: 8361 - "application/json" 8362 responses: 8363 200: 8364 description: "no error" 8365 500: 8366 description: "server error" 8367 schema: 8368 $ref: "#/definitions/ErrorResponse" 8369 parameters: 8370 - name: "imagesTarball" 8371 in: "body" 8372 description: "Tar archive containing images" 8373 schema: 8374 type: "string" 8375 format: "binary" 8376 - name: "quiet" 8377 in: "query" 8378 description: "Suppress progress details during load." 8379 type: "boolean" 8380 default: false 8381 tags: ["Image"] 8382 /containers/{id}/exec: 8383 post: 8384 summary: "Create an exec instance" 8385 description: "Run a command inside a running container." 8386 operationId: "ContainerExec" 8387 consumes: 8388 - "application/json" 8389 produces: 8390 - "application/json" 8391 responses: 8392 201: 8393 description: "no error" 8394 schema: 8395 $ref: "#/definitions/IdResponse" 8396 404: 8397 description: "no such container" 8398 schema: 8399 $ref: "#/definitions/ErrorResponse" 8400 examples: 8401 application/json: 8402 message: "No such container: c2ada9df5af8" 8403 409: 8404 description: "container is paused" 8405 schema: 8406 $ref: "#/definitions/ErrorResponse" 8407 500: 8408 description: "Server error" 8409 schema: 8410 $ref: "#/definitions/ErrorResponse" 8411 parameters: 8412 - name: "execConfig" 8413 in: "body" 8414 description: "Exec configuration" 8415 schema: 8416 type: "object" 8417 properties: 8418 AttachStdin: 8419 type: "boolean" 8420 description: "Attach to `stdin` of the exec command." 8421 AttachStdout: 8422 type: "boolean" 8423 description: "Attach to `stdout` of the exec command." 8424 AttachStderr: 8425 type: "boolean" 8426 description: "Attach to `stderr` of the exec command." 8427 DetachKeys: 8428 type: "string" 8429 description: | 8430 Override the key sequence for detaching a container. Format is 8431 a single character `[a-Z]` or `ctrl-<value>` where `<value>` 8432 is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. 8433 Tty: 8434 type: "boolean" 8435 description: "Allocate a pseudo-TTY." 8436 Env: 8437 description: | 8438 A list of environment variables in the form `["VAR=value", ...]`. 8439 type: "array" 8440 items: 8441 type: "string" 8442 Cmd: 8443 type: "array" 8444 description: "Command to run, as a string or array of strings." 8445 items: 8446 type: "string" 8447 Privileged: 8448 type: "boolean" 8449 description: "Runs the exec process with extended privileges." 8450 default: false 8451 User: 8452 type: "string" 8453 description: | 8454 The user, and optionally, group to run the exec process inside 8455 the container. Format is one of: `user`, `user:group`, `uid`, 8456 or `uid:gid`. 8457 WorkingDir: 8458 type: "string" 8459 description: | 8460 The working directory for the exec process inside the container. 8461 example: 8462 AttachStdin: false 8463 AttachStdout: true 8464 AttachStderr: true 8465 DetachKeys: "ctrl-p,ctrl-q" 8466 Tty: false 8467 Cmd: 8468 - "date" 8469 Env: 8470 - "FOO=bar" 8471 - "BAZ=quux" 8472 required: true 8473 - name: "id" 8474 in: "path" 8475 description: "ID or name of container" 8476 type: "string" 8477 required: true 8478 tags: ["Exec"] 8479 /exec/{id}/start: 8480 post: 8481 summary: "Start an exec instance" 8482 description: | 8483 Starts a previously set up exec instance. If detach is true, this endpoint 8484 returns immediately after starting the command. Otherwise, it sets up an 8485 interactive session with the command. 8486 operationId: "ExecStart" 8487 consumes: 8488 - "application/json" 8489 produces: 8490 - "application/vnd.docker.raw-stream" 8491 responses: 8492 200: 8493 description: "No error" 8494 404: 8495 description: "No such exec instance" 8496 schema: 8497 $ref: "#/definitions/ErrorResponse" 8498 409: 8499 description: "Container is stopped or paused" 8500 schema: 8501 $ref: "#/definitions/ErrorResponse" 8502 parameters: 8503 - name: "execStartConfig" 8504 in: "body" 8505 schema: 8506 type: "object" 8507 properties: 8508 Detach: 8509 type: "boolean" 8510 description: "Detach from the command." 8511 Tty: 8512 type: "boolean" 8513 description: "Allocate a pseudo-TTY." 8514 example: 8515 Detach: false 8516 Tty: false 8517 - name: "id" 8518 in: "path" 8519 description: "Exec instance ID" 8520 required: true 8521 type: "string" 8522 tags: ["Exec"] 8523 /exec/{id}/resize: 8524 post: 8525 summary: "Resize an exec instance" 8526 description: | 8527 Resize the TTY session used by an exec instance. This endpoint only works 8528 if `tty` was specified as part of creating and starting the exec instance. 8529 operationId: "ExecResize" 8530 responses: 8531 200: 8532 description: "No error" 8533 400: 8534 description: "bad parameter" 8535 schema: 8536 $ref: "#/definitions/ErrorResponse" 8537 404: 8538 description: "No such exec instance" 8539 schema: 8540 $ref: "#/definitions/ErrorResponse" 8541 500: 8542 description: "Server error" 8543 schema: 8544 $ref: "#/definitions/ErrorResponse" 8545 parameters: 8546 - name: "id" 8547 in: "path" 8548 description: "Exec instance ID" 8549 required: true 8550 type: "string" 8551 - name: "h" 8552 in: "query" 8553 description: "Height of the TTY session in characters" 8554 type: "integer" 8555 - name: "w" 8556 in: "query" 8557 description: "Width of the TTY session in characters" 8558 type: "integer" 8559 tags: ["Exec"] 8560 /exec/{id}/json: 8561 get: 8562 summary: "Inspect an exec instance" 8563 description: "Return low-level information about an exec instance." 8564 operationId: "ExecInspect" 8565 produces: 8566 - "application/json" 8567 responses: 8568 200: 8569 description: "No error" 8570 schema: 8571 type: "object" 8572 title: "ExecInspectResponse" 8573 properties: 8574 CanRemove: 8575 type: "boolean" 8576 DetachKeys: 8577 type: "string" 8578 ID: 8579 type: "string" 8580 Running: 8581 type: "boolean" 8582 ExitCode: 8583 type: "integer" 8584 ProcessConfig: 8585 $ref: "#/definitions/ProcessConfig" 8586 OpenStdin: 8587 type: "boolean" 8588 OpenStderr: 8589 type: "boolean" 8590 OpenStdout: 8591 type: "boolean" 8592 ContainerID: 8593 type: "string" 8594 Pid: 8595 type: "integer" 8596 description: "The system process ID for the exec process." 8597 examples: 8598 application/json: 8599 CanRemove: false 8600 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 8601 DetachKeys: "" 8602 ExitCode: 2 8603 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 8604 OpenStderr: true 8605 OpenStdin: true 8606 OpenStdout: true 8607 ProcessConfig: 8608 arguments: 8609 - "-c" 8610 - "exit 2" 8611 entrypoint: "sh" 8612 privileged: false 8613 tty: true 8614 user: "1000" 8615 Running: false 8616 Pid: 42000 8617 404: 8618 description: "No such exec instance" 8619 schema: 8620 $ref: "#/definitions/ErrorResponse" 8621 500: 8622 description: "Server error" 8623 schema: 8624 $ref: "#/definitions/ErrorResponse" 8625 parameters: 8626 - name: "id" 8627 in: "path" 8628 description: "Exec instance ID" 8629 required: true 8630 type: "string" 8631 tags: ["Exec"] 8632 8633 /volumes: 8634 get: 8635 summary: "List volumes" 8636 operationId: "VolumeList" 8637 produces: ["application/json"] 8638 responses: 8639 200: 8640 description: "Summary volume data that matches the query" 8641 schema: 8642 $ref: "#/definitions/VolumeListResponse" 8643 500: 8644 description: "Server error" 8645 schema: 8646 $ref: "#/definitions/ErrorResponse" 8647 parameters: 8648 - name: "filters" 8649 in: "query" 8650 description: | 8651 JSON encoded value of the filters (a `map[string][]string`) to 8652 process on the volumes list. Available filters: 8653 8654 - `dangling=<boolean>` When set to `true` (or `1`), returns all 8655 volumes that are not in use by a container. When set to `false` 8656 (or `0`), only volumes that are in use by one or more 8657 containers are returned. 8658 - `driver=<volume-driver-name>` Matches volumes based on their driver. 8659 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 8660 the presence of a `label` alone or a `label` and a value. 8661 - `name=<volume-name>` Matches all or part of a volume name. 8662 type: "string" 8663 format: "json" 8664 tags: ["Volume"] 8665 8666 /volumes/create: 8667 post: 8668 summary: "Create a volume" 8669 operationId: "VolumeCreate" 8670 consumes: ["application/json"] 8671 produces: ["application/json"] 8672 responses: 8673 201: 8674 description: "The volume was created successfully" 8675 schema: 8676 $ref: "#/definitions/Volume" 8677 500: 8678 description: "Server error" 8679 schema: 8680 $ref: "#/definitions/ErrorResponse" 8681 parameters: 8682 - name: "volumeConfig" 8683 in: "body" 8684 required: true 8685 description: "Volume configuration" 8686 schema: 8687 $ref: "#/definitions/VolumeCreateOptions" 8688 tags: ["Volume"] 8689 8690 /volumes/{name}: 8691 get: 8692 summary: "Inspect a volume" 8693 operationId: "VolumeInspect" 8694 produces: ["application/json"] 8695 responses: 8696 200: 8697 description: "No error" 8698 schema: 8699 $ref: "#/definitions/Volume" 8700 404: 8701 description: "No such volume" 8702 schema: 8703 $ref: "#/definitions/ErrorResponse" 8704 500: 8705 description: "Server error" 8706 schema: 8707 $ref: "#/definitions/ErrorResponse" 8708 parameters: 8709 - name: "name" 8710 in: "path" 8711 required: true 8712 description: "Volume name or ID" 8713 type: "string" 8714 tags: ["Volume"] 8715 8716 delete: 8717 summary: "Remove a volume" 8718 description: "Instruct the driver to remove the volume." 8719 operationId: "VolumeDelete" 8720 responses: 8721 204: 8722 description: "The volume was removed" 8723 404: 8724 description: "No such volume or volume driver" 8725 schema: 8726 $ref: "#/definitions/ErrorResponse" 8727 409: 8728 description: "Volume is in use and cannot be removed" 8729 schema: 8730 $ref: "#/definitions/ErrorResponse" 8731 500: 8732 description: "Server error" 8733 schema: 8734 $ref: "#/definitions/ErrorResponse" 8735 parameters: 8736 - name: "name" 8737 in: "path" 8738 required: true 8739 description: "Volume name or ID" 8740 type: "string" 8741 - name: "force" 8742 in: "query" 8743 description: "Force the removal of the volume" 8744 type: "boolean" 8745 default: false 8746 tags: ["Volume"] 8747 8748 /volumes/prune: 8749 post: 8750 summary: "Delete unused volumes" 8751 produces: 8752 - "application/json" 8753 operationId: "VolumePrune" 8754 parameters: 8755 - name: "filters" 8756 in: "query" 8757 description: | 8758 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 8759 8760 Available filters: 8761 - `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. 8762 type: "string" 8763 responses: 8764 200: 8765 description: "No error" 8766 schema: 8767 type: "object" 8768 title: "VolumePruneResponse" 8769 properties: 8770 VolumesDeleted: 8771 description: "Volumes that were deleted" 8772 type: "array" 8773 items: 8774 type: "string" 8775 SpaceReclaimed: 8776 description: "Disk space reclaimed in bytes" 8777 type: "integer" 8778 format: "int64" 8779 500: 8780 description: "Server error" 8781 schema: 8782 $ref: "#/definitions/ErrorResponse" 8783 tags: ["Volume"] 8784 /networks: 8785 get: 8786 summary: "List networks" 8787 description: | 8788 Returns a list of networks. For details on the format, see the 8789 [network inspect endpoint](#operation/NetworkInspect). 8790 8791 Note that it uses a different, smaller representation of a network than 8792 inspecting a single network. For example, the list of containers attached 8793 to the network is not propagated in API versions 1.28 and up. 8794 operationId: "NetworkList" 8795 produces: 8796 - "application/json" 8797 responses: 8798 200: 8799 description: "No error" 8800 schema: 8801 type: "array" 8802 items: 8803 $ref: "#/definitions/Network" 8804 examples: 8805 application/json: 8806 - Name: "bridge" 8807 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 8808 Created: "2016-10-19T06:21:00.416543526Z" 8809 Scope: "local" 8810 Driver: "bridge" 8811 EnableIPv6: false 8812 Internal: false 8813 Attachable: false 8814 Ingress: false 8815 IPAM: 8816 Driver: "default" 8817 Config: 8818 - 8819 Subnet: "172.17.0.0/16" 8820 Options: 8821 com.docker.network.bridge.default_bridge: "true" 8822 com.docker.network.bridge.enable_icc: "true" 8823 com.docker.network.bridge.enable_ip_masquerade: "true" 8824 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 8825 com.docker.network.bridge.name: "docker0" 8826 com.docker.network.driver.mtu: "1500" 8827 - Name: "none" 8828 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 8829 Created: "0001-01-01T00:00:00Z" 8830 Scope: "local" 8831 Driver: "null" 8832 EnableIPv6: false 8833 Internal: false 8834 Attachable: false 8835 Ingress: false 8836 IPAM: 8837 Driver: "default" 8838 Config: [] 8839 Containers: {} 8840 Options: {} 8841 - Name: "host" 8842 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 8843 Created: "0001-01-01T00:00:00Z" 8844 Scope: "local" 8845 Driver: "host" 8846 EnableIPv6: false 8847 Internal: false 8848 Attachable: false 8849 Ingress: false 8850 IPAM: 8851 Driver: "default" 8852 Config: [] 8853 Containers: {} 8854 Options: {} 8855 500: 8856 description: "Server error" 8857 schema: 8858 $ref: "#/definitions/ErrorResponse" 8859 parameters: 8860 - name: "filters" 8861 in: "query" 8862 description: | 8863 JSON encoded value of the filters (a `map[string][]string`) to process 8864 on the networks list. 8865 8866 Available filters: 8867 8868 - `driver=<driver-name>` Matches a network's driver. 8869 - `id=<network-id>` Matches all or part of a network ID. 8870 - `label=<key>` or `label=<key>=<value>` of a network label. 8871 - `name=<network-name>` Matches all or part of a network name. 8872 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 8873 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 8874 type: "string" 8875 tags: ["Network"] 8876 8877 /networks/{id}: 8878 get: 8879 summary: "Inspect a network" 8880 operationId: "NetworkInspect" 8881 produces: 8882 - "application/json" 8883 responses: 8884 200: 8885 description: "No error" 8886 schema: 8887 $ref: "#/definitions/Network" 8888 404: 8889 description: "Network not found" 8890 schema: 8891 $ref: "#/definitions/ErrorResponse" 8892 500: 8893 description: "Server error" 8894 schema: 8895 $ref: "#/definitions/ErrorResponse" 8896 parameters: 8897 - name: "id" 8898 in: "path" 8899 description: "Network ID or name" 8900 required: true 8901 type: "string" 8902 - name: "verbose" 8903 in: "query" 8904 description: "Detailed inspect output for troubleshooting" 8905 type: "boolean" 8906 default: false 8907 - name: "scope" 8908 in: "query" 8909 description: "Filter the network by scope (swarm, global, or local)" 8910 type: "string" 8911 tags: ["Network"] 8912 8913 delete: 8914 summary: "Remove a network" 8915 operationId: "NetworkDelete" 8916 responses: 8917 204: 8918 description: "No error" 8919 403: 8920 description: "operation not supported for pre-defined networks" 8921 schema: 8922 $ref: "#/definitions/ErrorResponse" 8923 404: 8924 description: "no such network" 8925 schema: 8926 $ref: "#/definitions/ErrorResponse" 8927 500: 8928 description: "Server error" 8929 schema: 8930 $ref: "#/definitions/ErrorResponse" 8931 parameters: 8932 - name: "id" 8933 in: "path" 8934 description: "Network ID or name" 8935 required: true 8936 type: "string" 8937 tags: ["Network"] 8938 8939 /networks/create: 8940 post: 8941 summary: "Create a network" 8942 operationId: "NetworkCreate" 8943 consumes: 8944 - "application/json" 8945 produces: 8946 - "application/json" 8947 responses: 8948 201: 8949 description: "No error" 8950 schema: 8951 type: "object" 8952 title: "NetworkCreateResponse" 8953 properties: 8954 Id: 8955 description: "The ID of the created network." 8956 type: "string" 8957 Warning: 8958 type: "string" 8959 example: 8960 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 8961 Warning: "" 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)"]