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