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