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