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